? .cvsignore
Index: shadowbox.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/shadowbox/shadowbox.module,v
retrieving revision 1.1.2.12.2.28.2.27.2.2
diff -u -p -r1.1.2.12.2.28.2.27.2.2 shadowbox.module
--- shadowbox.module	26 Mar 2010 16:41:26 -0000	1.1.2.12.2.28.2.27.2.2
+++ shadowbox.module	21 Feb 2011 00:32:59 -0000
@@ -132,6 +132,30 @@ function shadowbox_field_formatter_info(
         'label' => "SB G nid: $preset to original",
         'field types' => $types,
       );
+      $formatters["shadowbox_compact_gallery___original___$preset"] = array(
+        'label' => "SB G compact page: original to $preset",
+        'field types' => $types,
+      );
+      $formatters["shadowbox_compact_gallery___${preset}___original"] = array(
+        'label' => "SB G compact page: $preset to original",
+        'field types' => $types,
+      );
+      $formatters["shadowbox_compact_gallery_field___original___$preset"] = array(
+        'label' => "SB G compact field: original to $preset",
+        'field types' => $types,
+      );
+      $formatters["shadowbox_compact_gallery_field___${preset}___original"] = array(
+        'label' => "SB G compact field: $preset to original",
+        'field types' => $types,
+      );
+      $formatters["shadowbox_compact_gallery_nid___original___$preset"] = array(
+        'label' => "SB G compact nid: original to $preset",
+        'field types' => $types,
+      );
+      $formatters["shadowbox_compact_gallery_nid___${preset}___original"] = array(
+        'label' => "SB G compact nid: $preset to original",
+        'field types' => $types,
+      );
 
       foreach ($presets as $preset_alt) {
         if ($preset != $preset_alt) {
@@ -151,6 +175,18 @@ function shadowbox_field_formatter_info(
             'label' => "SB G nid: $preset to $preset_alt",
             'field types' => $types,
           );
+          $formatters["shadowbox_compact_gallery___${preset}___$preset_alt"] = array(
+            'label' => "SB G compact page: $preset to $preset_alt",
+            'field types' => $types,
+          );
+          $formatters["shadowbox_compact_gallery_field___${preset}___$preset_alt"] = array(
+            'label' => "SB G compact field: $preset to $preset_alt",
+            'field types' => $types,
+          );
+          $formatters["shadowbox_compact_gallery_nid___${preset}___$preset_alt"] = array(
+            'label' => "SB G compact nid: $preset to $preset_alt",
+            'field types' => $types,
+          );
         }
       }
     }
@@ -176,6 +212,7 @@ function shadowbox_theme() {
         'item' => NULL,
         'gallery_id' => array(),
         'field_type_names' => NULL,
+        'compact' => NULL,
       ),
     ),
     'shadowbox_image' => array(
@@ -206,6 +243,12 @@ function shadowbox_theme() {
       $theme["shadowbox_formatter_shadowbox_gallery_field___${source}___original"] = $formatter;
       $theme["shadowbox_formatter_shadowbox_gallery_nid___original___$source"] = $formatter;
       $theme["shadowbox_formatter_shadowbox_gallery_nid___${source}___original"] = $formatter;
+      $theme["shadowbox_formatter_shadowbox_compact_gallery___original___$source"] = $formatter;
+      $theme["shadowbox_formatter_shadowbox_compact_gallery___${source}___original"] = $formatter;
+      $theme["shadowbox_formatter_shadowbox_compact_gallery_field___original___$source"] = $formatter;
+      $theme["shadowbox_formatter_shadowbox_compact_gallery_field___${source}___original"] = $formatter;
+      $theme["shadowbox_formatter_shadowbox_compact_gallery_nid___original___$source"] = $formatter;
+      $theme["shadowbox_formatter_shadowbox_compact_gallery_nid___${source}___original"] = $formatter;
 
       foreach ($presets as $preset) {
         $destination = $preset['presetname'];
@@ -215,6 +258,9 @@ function shadowbox_theme() {
           $theme["shadowbox_formatter_shadowbox_gallery___${source}___$destination"] = $formatter;
           $theme["shadowbox_formatter_shadowbox_gallery_field___${source}___$destination"] = $formatter;
           $theme["shadowbox_formatter_shadowbox_gallery_nid___${source}___$destination"] = $formatter;
+          $theme["shadowbox_formatter_shadowbox_compact_gallery___${source}___$destination"] = $formatter;
+          $theme["shadowbox_formatter_shadowbox_compact_gallery_field___${source}___$destination"] = $formatter;
+          $theme["shadowbox_formatter_shadowbox_compact_gallery_nid___${source}___$destination"] = $formatter;
         }
       }
     }
@@ -237,7 +283,7 @@ function theme_shadowbox_image($path, $a
 /**
  * Implementation of theme_imagefield_image_imagecache_shadowbox().
  */
-function theme_imagefield_image_imagecache_shadowbox($source, $destination, $item, $gallery_id = '', $field_type_names) {
+function theme_imagefield_image_imagecache_shadowbox($source, $destination, $item, $gallery_id = '', $field_type_names, $compact) {
   $filepath = $item['filepath'];
   if ($filepath == '') {
     return;
@@ -269,7 +315,10 @@ function theme_imagefield_image_imagecac
     'html' => TRUE,
   );
 
-  if ($source == 'original') {
+  if (isset($compact) && $compact && $item['#delta']) {
+    $image = '';
+  }
+  elseif ($source == 'original') {
     $image = theme('shadowbox_image', $filepath, $alt, $title);
   }
   else {
@@ -305,6 +354,8 @@ function theme_shadowbox_formatter_image
 
   list($theme, $source, $destination) = explode('___', $formatter, 3);
 
+  $compact = FALSE;
+
   switch ($theme) {
     case 'shadowbox_gallery':
       $gallery_id = 'gallery';
@@ -315,6 +366,18 @@ function theme_shadowbox_formatter_image
     case 'shadowbox_gallery_nid':
       $gallery_id = "nid-{$element['#node']->nid}";
       break;
+    case 'shadowbox_compact_gallery':
+      $gallery_id = 'gallery';
+      $compact = TRUE;
+      break;
+    case 'shadowbox_compact_gallery_field':
+      $gallery_id = $field_name;
+      $compact = TRUE;
+      break;
+    case 'shadowbox_compact_gallery_nid':
+      $gallery_id = "nid-{$element['#node']->nid}";
+      $compact = TRUE;
+      break;
   }
 
   $presets = shadowbox_get_imagecache_presets();
@@ -323,7 +386,7 @@ function theme_shadowbox_formatter_image
   }
 
   if ($source == 'original' || in_array($source, $presets)) {
-    $output = theme('imagefield_image_imagecache_shadowbox', $source, $destination, $item, $gallery_id, $field_type_names);
+    $output = theme('imagefield_image_imagecache_shadowbox', $source, $destination, $item, $gallery_id, $field_type_names, $compact);
   }
 
   return $output;
@@ -423,7 +486,6 @@ function shadowbox_get_settings($overrid
     'modal' => !variable_get('shadowbox_overlay_listen', TRUE),
     'overlayColor' => '#' . variable_get('shadowbox_overlay_color', '000'),
     'overlayOpacity' => variable_get('shadowbox_overlay_opacity', 0.8),
-    'players' => $players,
     'resizeDuration' => variable_get('shadowbox_resize_duration', 0.55),
     'showMovieControls' => variable_get('shadowbox_show_movie_controls', TRUE),
     'slideshowDelay' => variable_get('shadowbox_slideshow_delay', 0),
