Index: imagefield_gallery.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagefield_gallery/imagefield_gallery.info,v
retrieving revision 1.1
diff -u -F^f -r1.1 imagefield_gallery.info
--- imagefield_gallery.info	20 Jan 2008 05:48:20 -0000	1.1
+++ imagefield_gallery.info	20 Jan 2008 18:45:46 -0000
@@ -3,4 +3,4 @@
 package = ImageField Gallery
 version = "5.x-1.beta"
 project = "ImageField Gallery"
-dependencies = imagefield imagecache lightbox2
+dependencies = imagecache lightbox2
Index: imagefield_gallery.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagefield_gallery/imagefield_gallery.module,v
retrieving revision 1.1
diff -u -F^f -r1.1 imagefield_gallery.module
--- imagefield_gallery.module	20 Jan 2008 05:48:20 -0000	1.1
+++ imagefield_gallery.module	20 Jan 2008 18:45:47 -0000
@@ -45,7 +45,7 @@ function imagefield_gallery_nodeapi(&$no
         switch ($op) {
           case 'view':
             $node->content[$type['name']] = array(
-              '#value' => theme('imagefield_gallery_lightbox2', $node->$type['name'], $node->nid, $node->type),
+              '#value' => imagefield_gallery_lightbox2($node->$type['name'], $node->nid, $node->type),
               '#weight' => $node->content[$type['name']]['#weight'],
             );
             break;
@@ -63,7 +63,7 @@ function imagefield_gallery_nodetypes() 
   $nt = array();
   foreach($types as $type) {
     foreach($type['fields'] as $field) {
-      if($field['type'] == 'image') {
+      if (in_array($field['type'], array('asset', 'imagefield'))) {
         $nt[$i]['type'] = $type['type'];
         $nt[$i]['name'] = $field['field_name'];
         $i++;
@@ -328,6 +328,25 @@ function imagefield_gallery_build_css() 
   }
 }
 
+function imagefield_gallery_lightbox2($images = array(), $nid, $type) {
+  // Alter the $images array to standardize on 'filepath' as the component
+  // that contains the path to the image.
+
+  foreach ($images as $key => $image) {
+    // Asset module.
+    if (isset($images[$key]['aid'])) {
+      $asset = asset_load($images[$key]['aid']);
+      dpr($asset);
+      $images[$key] = $asset->filepath;
+    }
+    else {
+      $images[$key] = $images[$key]['filepath'];
+    }
+  }
+  return theme('imagefield_gallery_lightbox2', $images, $nid, $type);
+}
+
+
 /* ---------- Theme Functions ----------- */
 
 function theme_imagefield_gallery_lightbox2($images = array(), $nid, $type) {
@@ -350,10 +369,10 @@ function theme_imagefield_gallery_lightb
 
       $thumbnail = _imagecache_preset_load($var[$type]['images']['thumbnail']);
       $preview = _imagecache_preset_load($var[$type]['images']['preview']);
-      $imagecache_path = base_path() . file_directory_path() .'/imagecache/'. $preview .'/'. $images[$i]['filepath'];
+      $imagecache_path = base_path() . file_directory_path() .'/imagecache/'. $preview .'/'. $images[$i];
       $output .= '<div class="image_field_thumbnail">';
       $output .= '<a href="'. $imagecache_path .'" rel="lightbox['. $nid .']">';
-      $output .= theme('imagecache', $thumbnail, $images[$i]['filepath']);
+      $output .= theme('imagecache', $thumbnail, $images[$i]);
       $output .= '</a>';
       $output .= '</div>';
       $i++;
