Posted by nasa51 on December 29, 2009 at 7:12pm
14 followers
| Project: | Image FUpload |
| Version: | 6.x-3.0-rc2 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
Current image_fupload module requires swfupload.swf, swfupload.js and swfupload.queue.js to be placed into /image_fupload/swfupload/... directory, but however the module already has swfupload directory it makes impossible to use drush make feature to build complete platforms.
The patch attached it's possible/quick solution using Libraries API http://drupal.org/project/libraries
| Attachment | Size |
|---|---|
| image_fupload-swfupload_as_library.patch | 7.17 KB |
Comments
#1
subscribing
#2
same as above, but applicable from image_fupload module root directory, i.e. works with drush make
#3
Sounds interesting. Will be checked.
#4
patch failed
patch -p0 --dry-run < image_fupload-swfupload_as_library_0.patch
patching file .//image_fupload_image/image_fupload_image.module
Hunk #1 FAILED at 34.
1 out of 1 hunk FAILED -- saving rejects to file .//image_fupload_image/image_fupload_image.module.rej
patching file .//image_fupload_imagefield/image_fupload_imagefield.module
Hunk #1 succeeded at 69 with fuzz 1 (offset 4 lines).
Hunk #2 FAILED at 98.
1 out of 2 hunks FAILED -- saving rejects to file .//image_fupload_imagefield/image_fupload_imagefield.module.rej
patching file .//image_fupload.info
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file .//image_fupload.info.rej
patching file .//image_fupload.module
Hunk #1 FAILED at 115.
1 out of 1 hunk FAILED -- saving rejects to file .//image_fupload.module.rej
patching file .//swfupload-settings.tpl.php
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file .//swfupload-settings.tpl.php.rej
#5
OK, I reworked this patch. A few notable changes:
1) not all files live in the root of libraries/swfupload/. For instance the .swf lives in Flash/ and the query.js lives in plugins/ so the new code reflects that. This means that when someone downloads the swfupload library, they don't have to move any files around.
2) The hook_requirements() has been updated to check for the files in libraries, with some clearer instructions I think, and it mentions that you have to dl the 2.2.x version. 2.5.x is out now and it doesn't look compatible yet.
#6
oh, and the other thing is that this patch will totally break existing sites, as it has new dependencies and the location sof files isn't the same so we may want to find a way to give people a very clear warning before they upgrade.
#7
Attached patch repeating the functionality of frankcarey's #5, but on top of 3.0-rc2. Just in case ;)
#8
Would be great to see this getting committed. Having to copy additional external libraries is a big hassle currently.
#9
Same, looking for this here.
#10
subscribing :P
#11
It's been almost a year since this much needed functionality was submitted as a patch. Is there any reason why it can't be committed?
#12
Agreed, looking forward to this being implemented with library functionality. Subscribing.
#13
+1
#14
+1 and subscribing
#15
Patch failed against RC2
patch < image_fupload-swfupload_as_library_1.patchpatching file image_fupload_image.module
Hunk #1 FAILED at 34.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload_image.module.rej
patching file image_fupload_imagefield.module
Hunk #1 FAILED at 65.
Hunk #2 FAILED at 93.
2 out of 2 hunks FAILED -- saving rejects to file image_fupload_imagefield.module.rej
patching file image_fupload.info
patching file image_fupload.install
patching file image_fupload.module
patching file swfupload-settings.tpl.php
And even worse with the latest dev release of image_fupload:
patch < image_fupload-swfupload_as_library_1.patchpatching file image_fupload_image.module
Hunk #1 FAILED at 34.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload_image.module.rej
patching file image_fupload_imagefield.module
Hunk #1 FAILED at 65.
Hunk #2 FAILED at 93.
2 out of 2 hunks FAILED -- saving rejects to file image_fupload_imagefield.module.rej
patching file image_fupload.info
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload.info.rej
patching file image_fupload.install
Hunk #1 FAILED at 49.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload.install.rej
patching file image_fupload.module
Hunk #1 FAILED at 115.
1 out of 1 hunk FAILED -- saving rejects to file image_fupload.module.rej
patching file swfupload-settings.tpl.php
Hunk #1 FAILED at 10.
1 out of 1 hunk FAILED -- saving rejects to file swfupload-settings.tpl.php.rej
Darn.
#16
Tried it with -p0 like frankcarey did and it worked against rc2
patch -p0 < image_fupload-swfupload_as_library_1.patchpatching file .//image_fupload_image/image_fupload_image.module
patching file .//image_fupload_imagefield/image_fupload_imagefield.module
patching file .//image_fupload.info
patching file .//image_fupload.install
patching file .//image_fupload.module
patching file .//swfupload-settings.tpl.php
except now the node edit pages with image_fupload widget are blank :(
#17
+1
#18
Subscribing.