? views_defaults.inc
Index: image.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/image.module,v
retrieving revision 1.259
diff -u -r1.259 image.module
--- image.module	13 Nov 2007 03:21:53 -0000	1.259
+++ image.module	16 Nov 2007 21:13:40 -0000
@@ -11,6 +11,7 @@
 
 if (module_exists('views')) {
   include(drupal_get_path('module', 'image') .'/views.inc');
+  include(drupal_get_path('module', 'image') .'/views_defaults.inc');
 }
 
 /**
Index: views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/views.inc,v
retrieving revision 1.4
diff -u -r1.4 views.inc
--- views.inc	27 Aug 2007 22:50:39 -0000	1.4
+++ views.inc	16 Nov 2007 21:10:40 -0000
@@ -112,3 +112,49 @@
   return $a;
 }
 
+/**
+ * Implementation of hook_views_style_plugins()
+ */
+function image_views_style_plugins() {
+  $items['bonus_grid'] = array(
+    'name' => t('Image: Gallery'),
+    'theme' => 'image_gallery_view',
+    'validate' => 'views_ui_plugin_validate_list',
+    'needs_fields' => true,
+  );
+  return $items;
+}
+
+/**
+ * Display the nodes of a view as an image gallery.
+ */
+function theme_image_gallery_view($view, $nodes, $type) {
+  drupal_add_css(drupal_get_path('module', 'image_gallery') .'/image_gallery.css');
+  
+  $fields = _views_get_fields();
+  
+  $content .= '<ul class="images clear-block">'; 
+  $count = 0;
+  $total = count($nodes);
+  foreach ($nodes as $node) {
+    $item = '';
+
+    foreach ($view->field as $field) {
+     //$item = print_r($field, 1);
+     if ($fields[$field['id']]['visible'] !== FALSE) {
+        if ($field['label']) {
+          $item .= "<div class='view-label view-label-$field[queryname]'>" . $field['label'] . "</div>";
+        }
+        $item .= "<div class='view-field view-data-$field[queryname]'>" . views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view) . "</div>";
+      }
+    }
+    $content .= "<li class=''><div class='view-item view-item-$view->name'>$item</div></li>\n"; 
+
+    $count++;
+  }
+  $content .= "</ul>\n";
+  
+  if ($content) {
+    return $content;
+  }
+}
Index: contrib/image_gallery/image_gallery.css
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_gallery/image_gallery.css,v
retrieving revision 1.7
diff -u -r1.7 image_gallery.css
--- contrib/image_gallery/image_gallery.css	18 Jul 2007 17:04:31 -0000	1.7
+++ contrib/image_gallery/image_gallery.css	16 Nov 2007 21:36:12 -0000
@@ -44,6 +44,13 @@
 
 ul.images li {
   float : left;
-  margin : 1em;
+  margin: 1em;
+  margin-left:0;
+  margin-right:2em;
+  padding:0;
   background: transparent;
 }
+/* gallery view in a block */
+.block ul.images li {
+  margin-top:0;
+}
\ No newline at end of file
Index: contrib/image_gallery/image_gallery.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_gallery/image_gallery.module,v
retrieving revision 1.20
diff -u -r1.20 image_gallery.module
--- contrib/image_gallery/image_gallery.module	7 Sep 2007 19:26:24 -0000	1.20
+++ contrib/image_gallery/image_gallery.module	16 Nov 2007 21:30:42 -0000
@@ -353,7 +353,7 @@
   }
 
   if (!empty($images)) {
-    $content .= '<ul class="images">';
+    $content .= '<ul class="images clear-block">';
     foreach ($images as $image) {
       $content .= theme('image_gallery_img', $image, $size);
     }
