Closed (fixed)
Project:
Image Picker
Version:
6.x-2.2
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2009 at 16:21 UTC
Updated:
3 May 2010 at 23:34 UTC
I was wondering if there is a way to change where the Image Picker fieldset shows up on the content types that are using it. There doesn't seem to be any settings in the image picker options, and the image picker doesn't show up on the edit content type pages either. What determines where it shows up on the page? I love the module and use it on several content types, but would love to be able to move it to a more relevant area of the page. Thanks.
Comments
Comment #1
hutch commentedThe imagepicker fieldset is inserted by the function imagepicker_form_alter(), line 406 or thereabouts in imagepicker.module, it does it by searching the node add/edit form for "node_form", see the preg_match on line 431. You *could* change that but I would not like to predict what might happen ;-( Anyway this would get overwritten on the next update so that's not really the right way.
AFAIK this is not something that could be handled by a theme override, but it just *might* be possible to get jquery to do it, tricky stuff.
Comment #2
bdawg8569 commentedI see. Thanks for the info!
Comment #3
hutch commentedComment #4
Rustan commentedDoes this mean you need to use the body field to get a predictable behaviour? I had trouble with this, the image picker frame showed up in a random way when the body field was inactivated. When the body field is there it turns up just under it.
Comment #5
hutch commentedJust disable it for content types you don't want it in, under admin/settings/imagepicker. It uses Drupal's hook_form_alter function and exact placement can be tricky.
It is possible to use a lightbox for the imagepicker iframe, works well with the new colorbox module, you will need the latest dev of both imagepicker and colorbox.
Either way the insert goes into the textarea called 'edit-body', to make it go anywhere ese you will have to hack the javascript.