disable feeds for node types without comments

BenStallings - November 10, 2008 - 18:14
Project:Comment RSS
Version:5.x-2.0
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I only allow comments on certain types of nodes, and not others, but Comment RSS provides a feed even on the nodes that will never have comments. Would it be possible to only show the feed icon on nodes that can have comments? Thanks in advance!

#1

Gábor Hojtsy - November 10, 2008 - 18:23
Category:feature request» bug report
Status:active» postponed (maintainer needs more info)

The code is supposed to only show / provide the feed if the node has commenting turned on. The button for example is displayed as a result of this code:

<?php
   
if ((arg(0) == 'node') && is_numeric($nid = arg(1)) && is_null(arg(2)) &&
       
variable_get('commentrss_node', TRUE) && ($node = node_load($nid)) &&
        (
$node->comment != COMMENT_NODE_DISABLED)) {
       
     
drupal_add_feed(
       
url('crss/node/'. $node->nid),
       
t('Comments for "@title"', array('@title' => $node->title))
      );
    }
?>

The last condition checks whether the code has comments disabled or not.

Are you sure this is misbehaving?

#2

Dave Reid - July 17, 2009 - 17:18
Status:postponed (maintainer needs more info)» fixed

I tested this and confirmed when a node has comments disabled, there is no link added for the crss/node/nid feed. I think you are seeing just the /crss feed since you've set it to be added on every page. Marking as fixed.

#3

System Message - July 31, 2009 - 17:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.