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 |
Jump to:
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
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
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
Automatically closed -- issue fixed for 2 weeks with no activity.