Index: thickbox.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/thickbox/thickbox.info,v
retrieving revision 1.4
diff -u -r1.4 thickbox.info
--- thickbox.info	16 Jun 2007 10:14:21 -0000	1.4
+++ thickbox.info	26 Mar 2008 19:23:01 -0000
@@ -1,3 +1,4 @@
 ; $Id: thickbox.info,v 1.4 2007/06/16 10:14:21 frjo Exp $
 name = Thickbox
 description = Enables Thickbox, a jQuery plugin.
+core = 6.x
\ No newline at end of file
Index: thickbox.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/thickbox/thickbox.module,v
retrieving revision 1.17
diff -u -r1.17 thickbox.module
--- thickbox.module	21 Jun 2007 02:10:53 -0000	1.17
+++ thickbox.module	26 Mar 2008 19:23:45 -0000
@@ -14,7 +14,7 @@
 function thickbox_admin_settings() {
   $form['thickbox_options'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Thickbox options')
+    '#title' => t('Thickbox options'),
   );
   $form['thickbox_options']['thickbox_auto'] = array(
     '#type' => 'checkbox',
@@ -55,45 +55,46 @@
 /**
  * Implementation of hook_menu().
  */
-function thickbox_menu($may_cache) {
+function thickbox_menu() {
   global $user;
 
   $items = array();
+  
+  $items['admin/settings/thickbox'] = array(
+    'title' => t('Thickbox'),
+    'description' => t('Configure Thickbox behavior.'),
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('thickbox_admin_settings'),
+    'access callback' => 'user_access',
+    'access arguments' => array('administer site configuration'),
+    'type' => MENU_NORMAL_ITEM,
+  );
+  $items['thickbox_login'] = array(
+    'title' => t('Login'),
+    'page callback' => 'thickbox_login',
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
 
-  if ($may_cache) {
-    $items[] = array(
-      'path' => 'admin/settings/thickbox',
-      'title' => t('Thickbox'),
-      'description' => t('Configure Thickbox behavior.'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => 'thickbox_admin_settings',
-      'access' => user_access('administer site configuration'),
-      'type' => MENU_NORMAL_ITEM
-    );
-    $items[] = array(
-      'path' => 'thickbox_login',
-      'title' => t('Login'),
-      'callback' => 'thickbox_login',
-      'access' => !$user->uid,
-      'type' => MENU_CALLBACK
-    );
+  return $items;
+}
+
+/**
+ * Implementation of hook_init().
+ */
+function thickbox_init() {
+  // Code from the block_list funtion in block.module.
+  // If the path doesn't match any of the exeptions, load header files.
+  $path = drupal_get_path_alias($_GET['q']);
+  $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote(variable_get('thickbox_pages', ''), '/')) .')$/';
+  // Compare with the internal and path alias (if any).
+  $page_match = preg_match($regexp, $path);
+  if ($path != $_GET['q']) {
+    $page_match = $page_match || preg_match($regexp, $_GET['q']);
   }
-  else {
-    // Code from the block_list funtion in block.module.
-    // If the path doesn't match any of the exeptions, load header files.
-    $path = drupal_get_path_alias($_GET['q']);
-    $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote(variable_get('thickbox_pages', ''), '/')) .')$/';
-    // Compare with the internal and path alias (if any).
-    $page_match = preg_match($regexp, $path);
-    if ($path != $_GET['q']) {
-      $page_match = $page_match || preg_match($regexp, $_GET['q']);
-    }
-    if (!$page_match) {
-      _thickbox_doheader();
-    }
+  if (!$page_match) {
+    _thickbox_doheader();
   }
-
-  return $items;
 }
 
 /**
@@ -139,9 +140,13 @@
  * Implementation of hook_form_alter().
  * Reformat the login form.
  */
-function thickbox_form_alter($form_id, &$form) {
+function thickbox_form_alter(&$form, &$form_state, $form_id) {
   if ($form_id == 'user_login' && arg(0) == 'thickbox_login') {
-    $form['#action'] = url('user/login', 'destination='. $_GET['destination']);
+    $form['#action'] = url('user/login', array(
+      'query' => array(
+        'destination' => $_GET['destination']
+      )
+    ));
     $form['name']['#size'] = 25;
     $form['pass']['#size'] = 25;
   }
@@ -159,7 +164,7 @@
       $formatters['thickbox]['. $rulename] = array(
         'label' => 'Thickbox: '. $rulename,
         'field types' => array('image'),
-        );
+      );
     }
   }
 
@@ -193,5 +198,23 @@
   $imagecache_path = file_create_url(file_directory_path() .'/imagecache/'. $namespace .'/'. $path);
   $image = '<img src="'. $imagecache_path .'" alt="'. check_plain($alt) .'" '. $attributes .' />';
 
-  return l($image, file_create_url($path), array('title' => $title, 'class' => 'thickbox', 'rel' => $field['type_name']), NULL, NULL, FALSE, TRUE);
+  return l($image, file_create_url($path), array(
+    'attributes' => array(
+      'title' => $title,
+      'class' => 'thickbox',
+      'rel' => $field['type_name']
+    ),
+    'html' => TRUE,
+  ));
+}
+
+/**
+ * Implementation of hook_theme().
+ */
+function thickbox_theme() {
+  return array(
+    'imagefield_image_imagecache_thickbox' => array(
+      'arguments' => array('namespace', 'field', 'path', 'alt', 'title', 'attributes'),
+    ),
+  );
 }
Index: thickbox_auto.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/thickbox/thickbox_auto.js,v
retrieving revision 1.5
diff -u -r1.5 thickbox_auto.js
--- thickbox_auto.js	23 May 2007 06:00:39 -0000	1.5
+++ thickbox_auto.js	26 Mar 2008 20:24:17 -0000
@@ -7,7 +7,7 @@
 $(document).ready(function() {
 
   // 1. "mark" the category overview pictures.
-  $("ul.galleries a[img.image.image-thumbnail]").addClass("category");
+  $("ul.galleries a > img.image.image-thumbnail").parent().addClass("category");
 
   // 2. Group the images in specific contexts,
 
@@ -29,7 +29,7 @@
 
 function TB_drupal_rewrite(context, group) {
   // Process only images, that have not been rewritten (.thickbox) and that are not categories.
-  $("a[img.image.image-thumbnail]", context).not(".thickbox").not(".category").each(function(i) {
+  $("a > img.image.image-thumbnail", context).parent().not(".thickbox").not(".category").each(function(i) {
     var img = $(this).children("img");
     var title = $(this).attr("title") || img.attr("title") || img.attr("alt") || null;
 

