Imagepicker patch

hutch - June 11, 2009 - 22:24
Project:Thickbox
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:hutch
Status:active
Description

The attached patch and file will enable thickbox to be used as a replacement for the existing inline iframe in the imagepicker module
The patch is on thickbox.module and adds code to enable thickbox_imagepicker..js before thickbox.js is called.
thickbox_imagepicker_js.txt will need to be renamed to thickbox_imagepicker.js and placed in the thickbox folder

I will be posting matching patches on http://drupal.org/project/issues/imagepicker shortly
Feedback welcome

AttachmentSize
thickbox_imagepicker_js.txt619 bytes
thickbox_imagepicker.patch624 bytes

#1

hutch - July 2, 2009 - 09:45
Version:6.x-1.4» 6.x-1.x-dev

These patches are now redundant, a better way to integrate thickbox with other modules is to use 'module_invoke_all'
patch attached, copy to the thickbox folder and apply with the following command

patch -p0 < thickbox_addhook.patch

Alternately add the following line to function _thickbox_doheader() in thickbox.module

  module_invoke_all('thickbox_js');

immediately above
  drupal_add_js($path .'/thickbox.js');

To see how this works have a look in the imagepicker module 2.x-dev, imagepicker.module function imagepicker_thickbox_js() and imagepicker_thickbox.js

This patch will extend thickbox without in any way interfering with existing functionality.

AttachmentSize
thickbox_addhook.patch 274 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.