Closed (fixed)
Project:
Focal Point
Version:
8.x-1.x-dev
Component:
Image Presets
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2017 at 15:01 UTC
Updated:
21 Nov 2017 at 21:39 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
bleen commentedIf IMCE is adding this option to the normal image widget then they are making an assumption about the widget being used. Any module that provides an alternate widget for image fields (including focal point) will have this issue. I'm not convinced that this should be fixed in focal point (as opposed to the IMCE module supporting additional widgets)...
I'm happy to have the discussion though... :)
Comment #3
kiwimind commentedOk, fair point.
Would you like me to raise this on the IMCE module page, or move it to their queue?
Thanks for the quick response.
Comment #4
bleen commentedI would ...
Comment #5
kiwimind commentedOk, thanks, moving to IMCE queue...
Comment #6
kiwimind commentedI've now added the image_focal_point widget to the accepted widgets, which seems to work. Happy to accept other ideas.
Patch attached.
Comment #7
ufku commentedYou can add IMCE support for your widget by using hook_imce_supported_widgets_alter()
Comment #8
kiwimind commentedOk, thanks @ufku. Will do that.
Wasn't aware of that hook.
Comment #9
bleen commented@kiwimind ... sounds like a new feature request to me. If you want to make a patch, I'd review
Comment #10
kiwimind commentedOk, thanks. By way of a starter, how does this sit?
I'm unsure as to whether or not I need to test the existence of IMCE first and how to go about that...
Comment #11
bleen commentedI haven't actually tested #10 but I can say that you do not need to test the existence of the IMCE module since the hook is called by that module.
Can you please post the steps you are taking to test the patch...
Comment #12
kiwimind commentedPrior to applying the patch you'll notice the lack of "Imce enabled" as an option as well as the missing "Open file browser" when the Image - focal point widget is selected on the teaser image.
After applying the patch, they're both visible and working as expected.
I've got another slight issue where the focal point appears to be stored against the image, rather than its usage (so all instances of an image on a page e.g. a listing page using teaser images are all affected when you alter one of the focal points), but will see if that's going to affect me much and will raise as a separate issue as necessary.
Comment #13
bleen commentedLooks great! Thanks!
Comment #14
kiwimind commentedNo worries, thanks for the review (and the module!).