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

hutch’s picture

The 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.

bdawg8569’s picture

I see. Thanks for the info!

hutch’s picture

Status: Active » Closed (fixed)
Rustan’s picture

Does 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.

hutch’s picture

Just 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.