--- modules/taxonomy_image/taxonomy_image.module	2007-10-21 03:10:55.000000000 -0700
+++ modules/taxonomy_image/taxonomy_image.module	2007-10-21 03:09:22.000000000 -0700
@@ -19,6 +19,11 @@
  * 
  * @return string  An html <img src> link.
  */
+
+//if (module_exists('views')) {
+//  include(drupal_get_path('module', 'taxonomy_image') .'/views_taxonomy_image.inc');
+//}
+
 function taxonomy_image_display($tid, $tags = NULL) {
   global $user;
   static $image = array();
@@ -441,4 +446,46 @@ function _taxonomy_image_exists($tid) {
   return 0;
 }
 
-?>
+function taxonomy_image_views_tables() {
+    $tables['term_node'] = array(
+      'name' => 'term_node',
+      'join' => array(
+        'left' => array(
+          'table' => 'node',
+          'field' => 'nid'
+        ),
+        'right' => array(
+          'field' => 'nid'
+        )
+      ),
+    );
+    $tables['term_image'] = array(
+      'name' => 'term_image',
+      'join' => array(
+        'left' => array(
+          'table' => 'term_node',
+          'field' => 'tid',
+        ),
+        'right' => array(
+          'field' => 'tid'
+        )
+      ),
+      'fields' => array(
+        'tid' => array(
+          'name' => t('Taxonomy Image: Image'),
+          'help' => t('The image associated with the node\'s taxonomy term.'),
+          'handler' => array(
+            'views_handler_image_path' => t('Image'),
+          )
+        )
+      ),
+    );
+  return $tables;
+}
+
+function views_handler_image_path($fieldinfo, $fielddata, $value, $data) {
+  if ($data->term_data_tid) {
+    return taxonomy_image_display($data->term_data_tid);
+  }
+}
+
