Index: modules/commentrss/commentrss.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/commentrss/commentrss.module,v
retrieving revision 1.12
diff -U3 -r1.12 commentrss.module
--- modules/commentrss/commentrss.module  18 Dec 2006 11:42:56 -0000  1.12
+++ modules/commentrss/commentrss.module  3 Jul 2007 23:53:30 -0000
@@ -257,3 +257,23 @@
   }
   return $items;
 }
+
+/**
+ * Implementation of hook_nodeapi().
+ */
+function commentrss_nodeapi(&$node, $op, $arg = 0) {
+  if ($op == 'rss item') {
+    if ($node->comment != COMMENT_NODE_DISABLED) {
+      // Add a "wfw:commentRss" attribute to node feeds. The "wfw"
+      // namespace is added to each element since there is currently no
+      // easy way to add the namespace to the document from a module.
+      return array(array(
+        'key' => 'wfw:commentRss',
+        'attributes' => array('xmlns:wfw' => 'http://wellformedweb.org/CommentAPI/'),
+        'value' => url('comments/node/'. $node->nid .'/feed', NULL, NULL, TRUE)));
+    }
+    else {
+      return array();
+    }
+  }
+}
