http://drupal.org/project/imagefield_zip

I'm willing to work together if you want to

Comments

steve.colson’s picture

Working together may make sense, but I think your project is more specific than this one. This module works on all filefields generically--yours seems to only work on imagesfields. I would love to eliminate duplicate code, but do you have a suggestion for how this would best work?

mikeytown2’s picture

I think getting mine working with filefields wouldn't take a lot of effort, but I could be very wrong... just depends on how messy the ahah stuff gets.

steve.colson’s picture

Yeah, I'm not the worlds biggest fan of AHAH. Would you consider co-creating a third module with code from mine and yours--an actual filefield_zip module?

mikeytown2’s picture

I'm not really sure what I would use from yours. I'm a big fan of uploading on the node add/edit page and not on a separate page.

Testing my code, if you remove the imagefield restrictions it works with a filefield. Functions to alter
imagefield_zip_form_alter() line 113
_imagefield_zip_fields() line 742

From there make it handle things other then images in the imagefield_zip_save_and_extract_upload() function. The ahah stuff works as is, which is nice. I would opt to bring in the changes and rename the project to include filefield in its name.

FranCarstens’s picture

I tried this... basically change "imagefield" in lines 113 and 742 for "filefield" - this didn't fix it for me. I assume the next step was important?

I wasn't sure how to change the "imagefield_zip_save_and_extract_upload()" function.

Do you have a working version of this I can download? Would love it! Thanks.

mikeytown2’s picture

I do not have a working version for you. Try this, in this order so the line numbers don't get messed up.

Remove lines 936-939 (image_get_info() function)
Change line 742 to if ($field['active'] && $field['multiple']) {
Remove lines 112 & 113

FranCarstens’s picture

Thanks. That worked. :D