Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
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?
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.
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?
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.
Comments
Comment #1
steve.colson commentedWorking 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?
Comment #2
mikeytown2 commentedI 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.
Comment #3
steve.colson commentedYeah, 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?
Comment #4
mikeytown2 commentedI'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.
Comment #5
FranCarstens commentedI 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.
Comment #6
mikeytown2 commentedI 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
Comment #7
FranCarstens commentedThanks. That worked. :D