? thickbox-close-location-iframe.patch
Index: thickbox.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/thickbox/thickbox.info,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 thickbox.info
--- thickbox.info	16 Jun 2007 10:11:28 -0000	1.2.2.2
+++ thickbox.info	31 Jul 2007 17:48:26 -0000
@@ -1,3 +1,4 @@
 ; $Id: thickbox.info,v 1.2.2.2 2007/06/16 10:11:28 frjo Exp $
 name = Thickbox
 description = Enables Thickbox, a jQuery plugin.
+version = "$Name: DRUPAL-5 $"
Index: thickbox.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/thickbox/thickbox.js,v
retrieving revision 1.2.4.2
diff -u -p -r1.2.4.2 thickbox.js
--- thickbox.js	21 Jun 2007 02:19:44 -0000	1.2.4.2
+++ thickbox.js	31 Jul 2007 17:48:26 -0000
@@ -188,7 +188,15 @@ function tb_show(caption, url, imageGrou
 
 			if(url.indexOf('TB_iframe') != -1){
 					urlNoQuery = url.split('TB_');
-					$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='" + settings.close + "'>" + settings.close + "</a> " + settings.esc_key + "</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' onload='tb_showIframe()'> </iframe>");
+
+          if (settings.close_location == 'top') {
+            $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='" + settings.close + "'>" + settings.close + "</a> " + settings.esc_key + "</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' onload='tb_showIframe()'> </iframe>");
+          }
+
+          if (settings.close_location == 'bottom') {
+            $("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' onload='tb_showIframe()'> </iframe><div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='" + settings.close + "'>" + settings.close + "</a> " + settings.esc_key + "</div></div>");
+          }
+
 				}else{
 					if($("#TB_window").css("display") != "block"){
 						if(params['modal'] != "true"){
Index: thickbox.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/thickbox/thickbox.module,v
retrieving revision 1.9.2.6
diff -u -p -r1.9.2.6 thickbox.module
--- thickbox.module	21 Jun 2007 02:19:55 -0000	1.9.2.6
+++ thickbox.module	31 Jul 2007 17:48:27 -0000
@@ -16,6 +16,13 @@ function thickbox_admin_settings() {
     '#type' => 'fieldset',
     '#title' => t('Thickbox options')
   );
+  $form['thickbox_options']['thickbox_close_location'] = array(
+    '#type' => 'radios', 	
+    '#title' => t('Close link location for iframes'),
+    '#default_value' => variable_get('thickbox_close_location', 'top'),
+    '#options' => array('top'=> 'Top of thickbox', 'bottom' => 'Bottom of thickbox'),
+    '#description' => t('Where you want the close link to appear on iframe thickboxes?')
+  );
   $form['thickbox_options']['thickbox_auto'] = array(
     '#type' => 'checkbox',
     '#title' => t('Enable for image nodes'),
@@ -118,7 +125,8 @@ function _thickbox_doheader() {
     'prev' => t('< Prev'),
     'esc_key' => t('or Esc Key'),
     'next_close' => t('Next / Close on last'),
-    'image_count' => t('Image !current of !total')
+    'image_count' => t('Image !current of !total'),
+    'close_location' => variable_get('thickbox_close_location', 'top'),
   );
   drupal_add_js(array('thickbox' => $tb_msg), 'setting');
 
