--- imagepicker.admin.inc.org 2009-05-03 12:48:04.000000000 +0100 +++ imagepicker.admin.inc 2009-06-11 19:50:14.000000000 +0100 @@ -107,6 +107,9 @@ if (module_exists('lightbox2') && variable_get('imagepicker_lightbox2_enable', 1) ) { $linkoptions['lightbox'] = t('Lightbox'); } + if (module_exists('thickbox') && variable_get('imagepicker_thickbox_enable', 1) ) { + $linkoptions['thickbox'] = t('Thickbox'); + } $alignoptions = array('none' => t('None'), 'fleft' => t('Float Left'), 'fright' => t('Float right')); $form['imagepicker_insert_defaults']['imagepicker_insert_defaults_align'] = array( '#type' => 'radios', @@ -190,6 +193,22 @@ '#description' => t('Configure the default code inserted into the "rel" attribute.'), ); } + if (module_exists('thickbox')) { + // thickbox integration + $form['imagepicker_thickbox'] = array( + '#type' => 'fieldset', + '#title' => t('Thickbox integration'), + '#collapsible' => TRUE, + '#collapsed' => FALSE, + ); + $form['imagepicker_thickbox']['imagepicker_thickbox_enable'] = array( + '#type' => 'checkbox', + '#title' => t('Enable Thickbox in Imagepicker'), + '#return_value' => 1, + '#default_value' => variable_get('imagepicker_thickbox_enable', 1), + '#description' => t('Unsetting this option will disable Thickbox in Imagepicker.'), + ); + } // quota $form['imagepicker_quotas'] = array( '#type' => 'fieldset', @@ -218,6 +237,17 @@ '#collapsible' => TRUE, '#collapsed' => TRUE, ); + + if (module_exists('thickbox') && file_exists(drupal_get_path('module', 'thickbox') .'/thickbox_imagepicker.js')) { + $form['imagepicker_advanced']['imagepicker_advanced_thickbox'] = array( + '#type' => 'checkbox', + '#title' => t('Thickbox Iframe'), + '#return_value' => 1, + '#default_value' => variable_get('imagepicker_advanced_thickbox', 0), + '#description' => t('Use thickbox iframe instead of the builtin one.'), + ); + } + $form['imagepicker_advanced']['imagepicker_advanced_iframe_width'] = array( '#type' => 'textfield', '#title' => t('Iframe width'),