Needs review
Project:
Imagefield Crop
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Jun 2009 at 12:52 UTC
Updated:
18 Jun 2013 at 11:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
decipheredHi,
I think it would make more sense to have a hook_filefield_sources_support() or something similar so other modules can be supported without the need of making a change to FileField Sources.
But this is just my opinion.
Cheers,
Deciphered.
Comment #2
quicksketchMy long-term hope actually has been that modules like ImageField Crop *extend* the existing Image widget in the same way that FileField Sources extends FileField. But that's all dependent on #417122: Allow drupal_alter() on Field and Widget Settings, so that modules can extend a widget without actually creating a new one entirely.
RE: "Maybe the correct implementation would be to actually clone the file object and crop that instead?".
That sounds like a safer approach generally. Actually it might be interesting to make ImageField Crop *always* maintain the original image (enabling a functionality like "recrop" after the original save). This would require ImageField Crop to store extra data though... which makes things a bit more difficult.
Comment #3
karljohann commentedWell it sure worked for me. Thanks.
Comment #4
akaserer commentedit works - great job
Comment #5
alan d. commentedIt would be best having something more generic like #541220: Allow custom filefield widgets to use filefield sources to prevent the need to have this module patched every time a new widget comes out for FileField
Comment #6
robbertnl commentedExcellent! It works!
A suggestion: a setting for enabling and disabling Upload / filebrowser / reference existing / remote url
Comment #7
yhager commentedI'd like to continue tracking this in imagefield_crop issue queue
Comment #8
benone commentedis this patch really working for you guys ?
crop is working ?
when I save crop is not working, then I need to edit node, and save again. and then crop is working. what can be wrong ?
Comment #9
benone commentedoh, and I am using filefield_paths also.
Comment #10
YK85 commentedsubscribing
Comment #11
robbertnl commented#8: Did you choose the crop widget for your filefield?
Comment #12
akaserer commentedthe patch in this post worked.
but seems that a patch from
http://drupal.org/node/436174
was commited.
the function
function filefield_sources_elements()
was completely changed.
does anybody know how to implement the function?
Comment #13
akaserer commentedi guess changing
to
should solve the case
thanks
Comment #14
akaserer commentedcould somebody reconfirm and if its ok, commit?
Comment #15
yhager commented@akaserer: The correct solution to this is to use the new alter hooks implemented now in CCK.
Comment #16
robbertnl commentedI can confirm #13 works for the newest release, thank you
Comment #17
lolmaus commentedSubscribing
Comment #18
pixelsweatshop commentedSub
Comment #19
Fidelix commentedSuãwbiscruiaibingg
Comment #20
porg commentedSubscribing.
Comment #21
johnpitcairn commentedsub
Comment #22
perandre commentedIt's been a while since this patch was made; are there currently any new efforts to make imagefield_sources support sources?
Comment #23
yhager commentedThis patch cannot be used as it is, it needs to be rethinked.
Anyway, all of my (very little) time goes now to making a D7 release of imagefield_crop.
Comment #24
botrisSkip patch, use #13 works fine in D6
Comment #25
daveparrish commentedWhy not add the hook in Imagefield Crop? That worked fine for me:
Comment #26
Eugene Fidelin commented#25 works for me
Comment #27
juroon commented#25 worked for me too. Simple solution to a longstanding problem.
Thanks!
Comment #28
Fidelix commentedWhat about D7? Any efforts on making this patch work with it?
Comment #29
Greg Varga commented-
Comment #30
yhager commentedpatches are welcome
Comment #31
mediamash commentedshould add this to code, works like a charm
Comment #32
firfin commentedAs requested in #30 this patch contains the extra function from #25.
It is a patch against the 6.x-1.x branch.
The function itself is pretty well tested I think, if someone else could also apply it to see if it works (it does on my install.)
If this is gonna be committed, I will also write a patch for the readme.txt / documentation. The potential danger of cropping images already on server should be clarified.
Comment #33
daveparrish commentedFor those who are looking for a Drupal 7 patch. I've attached a patch which works on imagefield_crop-1.x-dev. I also made a patch and issue for filefield_sources which has a necessary change in order to get these two modules to work together.
The problem I experienced was, when I used imagefield_crop with filefield_sources, the sources select on the widget would not change the form options. So, if I clicked "Remote URL" nothing would happen. This is filefield_sources functionality but the fix was to modify the imagefield_crop HTML so that it was compatible to what filefield_sources is expecting.
The filefield_sources patch fixes and issue where the transfer URL wouldn't work. The filefield_sources issue is here:
#1414958: Filefield_sources not compatible with imagefield_crop [PATCH]
Comment #34
daveparrish commentedI fixed the D7 patch so that filefield_sources no longer needs to be patched for imagefield_crop to work with filefield_sources.
Comment #35
shaneonabike commentedRe: #32 thanks for rolling that it works for me. Can we push this into the module pleaszzz. Then peeps can test the D7 version and push that through.
Comment #36
firfin commentedComment #37
joetsuihk commentedThank you everyone. Committed to 7.x-1.x
http://drupalcode.org/project/imagefield_crop.git/commit/a2c696a
If anyone review #32, I can commit to 6.x branch also. Change issue status as stated.
Comment #38
d.sibaud commentedthe following part of the patch was lost somewhere in the process so the dev branch 7.x-1.x does not works, putting it back let it works again: