Index: commentrss.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/commentrss/Attic/commentrss.admin.inc,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 commentrss.admin.inc
--- commentrss.admin.inc	17 Jul 2009 15:56:31 -0000	1.1.2.3
+++ commentrss.admin.inc	27 Aug 2009 07:06:58 -0000
@@ -34,6 +34,14 @@ function commentrss_admin_settings() {
     '#description' => t('Feeds will be accessible at @url type of URLs. Only supports one term, no composition.', array('@url' => url('crss/term/...', array('absolute' => TRUE)))),
     '#default_value' => variable_get('commentrss_term', FALSE),
   );
+  if (module_exists('og')) {
+    $form['commentrss_og'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Enable individual comment feeds for each organic group (og) on the website'),
+      '#description' => t('Feeds will be accessible at @url type of URLs. Only supports one group, no composition.', array('@url' => url('crss/og/...', array('absolute' => TRUE)))),
+      '#default_value' => variable_get('commentrss_og', FALSE),
+    );
+  }

   return system_settings_form($form);
 }
Index: commentrss.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/commentrss/commentrss.module,v
retrieving revision 1.12.2.2.2.6.2.4
diff -u -p -r1.12.2.2.2.6.2.4 commentrss.module
--- commentrss.module	17 Jul 2009 15:56:31 -0000	1.12.2.2.2.6.2.4
+++ commentrss.module	27 Aug 2009 07:06:59 -0000
@@ -129,6 +129,18 @@ function commentrss_init() {
         t('Comments for category "@title"', array('@title' => $term->name))
       );
     }
+
+    // Expose og feed on group pages.
+    if (module_exists('og') && (arg(0) == 'node') && is_numeric($nid = arg(1)) && is_null(arg(2)) &&
+        variable_get('commentrss_og', FALSE) && ($group = node_load($nid))) {
+
+      if (og_is_group_type($group->type)) {
+        drupal_add_feed(
+          url('crss/og/'. $group->nid),
+          t('Comments for group "@title"', array('@title' => $group->title))
+        );
+      }
+    }
   }
 }

Index: commentrss.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/commentrss/Attic/commentrss.pages.inc,v
retrieving revision 1.1.2.4
diff -u -p -r1.1.2.4 commentrss.pages.inc
--- commentrss.pages.inc	25 Jul 2009 14:39:00 -0000	1.1.2.4
+++ commentrss.pages.inc	27 Aug 2009 07:06:59 -0000
@@ -101,6 +101,36 @@ function commentrss_feed_term($tid = NUL
   return FALSE;
 }

+/**
+ * Publish a feed for all comments from a specified organic group (og).
+ */
+function commentrss_feed_og($gid = NULL) {
+  if (module_exists('og') && isset($gid) && is_numeric($gid) && ($group = node_load($gid))) {
+    // Filter with specific term ID.
+    $items = commentrss_format_items(
+      'DISTINCT(n.nid)',
+      'INNER JOIN {og_ancestry} oa ON n.nid = oa.nid',
+      'oa.group_nid = %d AND',
+      $group->nid
+    );
+    // Fill channel information based on group details.
+    $channel = array(
+      'title' => t(
+        '@site - Comments for "@group"',
+        array(
+          '@site' => variable_get('site_name', 'Drupal'),
+          '@group' => $group->title
+        )
+      ),
+      'description' => t('Comments for the group "@group"', array('@group' => $group->title)),
+      'link' => url('node/'. $group->nid, NULL, NULL, TRUE),
+    );
+    commentrss_format_feed($items, $channel);
+    return TRUE;
+  }
+  return FALSE;
+}
+
 // == API functions ============================================================

 /**
