Index: nodewords.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodewords/Attic/nodewords.module,v
retrieving revision 1.57.2.20
diff -u -p -r1.57.2.20 nodewords.module
--- nodewords.module	9 Feb 2009 08:29:20 -0000	1.57.2.20
+++ nodewords.module	10 May 2009 13:42:55 -0000
@@ -84,6 +84,33 @@ function nodewords_init() {
 }
 
 /**
+ * Implementation of hook_views_pre_render().
+ */
+function nodewords_views_pre_render(&$view) {
+  // Don't really do anything with the view. This is just a pretense to insert a breadcrumb.
+  $curpath = $_REQUEST['q'];
+  $curpath = drupal_get_normal_path($curpath);
+  // Check to see if the view path matches the current path.
+  $viewpage = FALSE;
+  foreach ($view->display as $display) {
+    $viewpath = $display->display_options['path'];
+    // if arguments have been passed to the view, include these
+    if ($view->args) {
+      $viewpath .= '/'. join('/', $view->args);
+    }
+    $viewpage = $viewpage || ($viewpath == $curpath);
+  } 
+  if ($viewpage) {
+    $tags = nodewords_get('views', array($view->vid));
+    foreach ($tags as $name => $content) {
+      if (!empty($content)) {
+        drupal_set_html_head('<meta name="'. $name .'" content="'. $content .'" />');
+      }
+    }
+  }
+}
+
+/**
  * Implementation of hook_nodeapi().
  */
 function nodewords_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
@@ -777,7 +804,8 @@ function _nodewords_detect_type_and_ids(
     }
   }
 */
-
+  
+/* TODO: Remove this since we are adding views support through hook_views_pre_render
   if (module_exists('views')) {
     $result = db_query("SELECT vid, display_options FROM {views_display} WHERE display_plugin = '%s'", 'page');
     while ($view = db_fetch_object($result)) {
@@ -788,7 +816,8 @@ function _nodewords_detect_type_and_ids(
       }
     }
   }
-
+*/
+  
   switch (arg(0)) {
     case 'node':
       // Node paths: node/$nid
