Here is a version of this module I have ported for Drupal 7. Tested and appears to work just fine with the latest version of IMCE (7.x-1.6).
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | imce_unzip-7.x-1.1.tar_.gz | 6.51 KB | ydahi |
| #4 | imce-unzip-500error.PNG | 32.93 KB | ydahi |
| #1 | imce_unzip-7.x-1.0.zip | 7.76 KB | Rory |
| imce_unzip-7.x-1.0.zip | 7.81 KB | Rory |
Comments
Comment #1
Rory commentedI accidentally left some stuff in for a custom public files directory I was running. Try this version instead.
Comment #2
steve.colson commentedWhy did you add new_file to _imce_unzip_scale_image, rather than relying on $file being passed in with the correct settings?
Comment #3
Rory commented$new_file just grabs what it needs from $file being passed in. Do you mean that during the function, we should just keep using $file and update it instead of using $new_file?
I introduced operating on a copy of the file instead of the original file and wrote in the variable $new_file as it made sense to visualise the path from the temporary files directory to replacing the original image.
Comment #4
ydahiHi Rory, thanks for the port.
I'm getting a 500 internal server error (screenshot attached). Running IMCE 7.x-1.7, IMCE Mkdir 7.x-1.0, and the module in #1 above.
Looking at the apache error logs I see
Function in question:
Any help would be greatly appreciated.
Comment #5
ydahiDid some digging around and it seems that file_directory_path() is no longer included in D7 (almost): http://drupal.org/node/930082
Replaced instances of file_directory_path() with file_stream_wrapper_get_instance_by_uri('public://')->getDirectoryPath();
Unzip working fine now.
Comment #6
Rory commentedThank you very much @ydahi! That was a much needed fix! I'll mark this issue as needing review.
I'm waiting on some elaboration from @stephen.colson. He has pointed out some further work is required, and I'm not quite sure what that is. Comments from anyone else are welcome to help me out.
Comment #7
shabbir commentedhi,
@ydahi thanks for the fix, i am using this module now. @Rory if any issue found i will surely mark it over here. Till then thanks both of you..
Cheers,
Shabs
Comment #8
steve.colson commentedI just stamped out a dev version for this issue. Sorry for the delay folks!
Comment #9
steve.colson commentedThanks Rory and Ydahi, marking fixed.