From e2967978f9b5a7ac7589fd09a412f4a58073f15d Mon Sep 17 00:00:00 2001 From: Nathan Phillip Brink Date: Mon, 8 Aug 2011 13:49:27 -0400 Subject: [PATCH] Fix issue #91052 by frjo, yaph: Add a "comment rss" using hook_link(). --- commentrss.module | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/commentrss.module b/commentrss.module index 477d8a0..1ec26c9 100644 --- a/commentrss.module +++ b/commentrss.module @@ -414,3 +414,18 @@ function commentrss_fetch_col($result) { } return $return; } + +/** + * Implementation of hook_link(). + */ +function commentrss_link($type, $object, $teaser = FALSE) { + if ($type == 'node' && $object->comment != COMMENT_NODE_DISABLED && variable_get('commentrss_node', FALSE)) { + $links = array( + 'commentrss_node_link' => array( + 'title' => t('comment RSS feed'), + 'href' => "crss/node/$object->nid", + ), + ); + return $links; + } +} -- 1.7.6