Hello and thank you for the excellent module. I have a feature request that I don't think has come up before, and it has to do with integration with another image module.
My goal is simple:
1) Allow the users to batch-upload files using fupload, which works great.
2) In the 'edit captions' mode post-upload, allow the images to be cropped using the imagefield_crop module.
The challenge is that both image_fupload and imagefield_crop modules rely upon the 'widget type' setting in CCK. The imagefield can only have one type of widget assigned, so I either get #1 (uploading) or #2 (cropping) but not both. I am not sure where the appropriate place would be to implement this, but I am thinking it would have to be in fupload as that is the module performing the actual upload and caption editing functions.
Comments and thoughts are welcome. Thanks for listening.
Comments
Comment #1
peterjmag commentedI agree that this would be great to have. One thing to keep in mind, however, is the CPU load from the imagefield_crop JS being loaded for a large number of images on a single page. This probably wouldn't be a problem if you limit yourself to maybe 10 or so images per batch upload.
An alternative to the imagefield_crop module could be imagecrop, which I haven't actually played around with, but it may be easier to integrate: http://drupal.org/project/imagecrop
Comment #2
rjbrown99 commentedI actually found imagecrop after I added the ticket. I'm currently a few hours into trying to integrate the two but I can't yet get the imagecrop edit button to show up on the node edit page. I'm not sure yet if there is an integration issue but I will post back after I get further with testing.
Comment #3
blup commentedDid you get any further rjbrown?
Comment #4
rjbrown99 commentedNot yet - trying to solve this problem first: #426394: CCK Fields in Preview list not displayed. Cropping of the image will be next on the list after I have a proper preview/view working.
Comment #5
blup commentedActually, I found this thread after that other one, and I decided to go with your solution at the end. I haven't created it yet, but it sounds well in theory: create a redirect to a view that displays a list of the 'image' nodes created by a particular user within the last 5 minutes (now-5min), and make all the fields editable with the editable fields module. I'm trying to see if i could integrate either imagefield crop or the imagecache crop (which i'm leaning towards) to this view so that it leads you to the actual node edit screen where you can re-crop and go back to the view(possibly with thickbox or something so that the user isn't taken away from the view). Does this sound like it might work?
Comment #6
rjbrown99 commentedI have my view configured with the editable fields, now the challenge is making the "next step" button go to my view instead of the default preview. It seems like "Next Step" comes from some Javascript so it's a bit more than just a form override.
Comment #7
blup commentedOk, i'll take that as a jump-off point and i'll let you know if i have any progress. Thanks a lot!
Comment #8
grandcat commentedYou could overwrite the redirect path if you modify the JS file in the module directory. Just remove the "<?php..." thing.
Comment #9
frankcarey commentedInteresting idea using views. I also have the idea to change the upload widget using a hook_form_alter() for images that are already uploaded. (node edit form) You could even have an option in the fupload widget settings to select the fallback widget (in this case the crop one). Then users could just edit the node, and be presented with the appropriate widget.
Comment #10
terbs commentedModify this shit to reference imagefield_crop instead of just imagefield
Modify Lines 434-440 so they look like this.
function image_fupload_imagefield_elements() {
$elements = array();
$elements_imagefield_crop = module_invoke('imagefield_crop', 'elements');
$elements['image_fupload_imagefield_widget'] = $elements_imagefield_crop['imagefield_crop_widget'];
return $elements;
}
Comment #11
grandcat commentedThanks.
Nevertheless, not sure if this is working because of the preview imagelist.