Check $node->node_comment when nodecomment installed
Michelle - June 3, 2009 - 21:44
| Project: | Fasttoggle |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | DruBB |
Jump to:
Description
Currently NC uses its own $node->node_comment to hold the read/write | readonly | disabled settings. This confuses fasttoggle and possibly other modules that need to know if comments are available. If possible, this should reuse the $node->comment variable for consistancy.
Michelle

#1
After talking to merlinofchaos it seems there's no easy way for nodecomment to reuse the variable because it needs to keep comment from doing its thing. But having two variables means fasttoggle won't work because it's not looking for the new variable. Moving this over to that queue to ask for this to be added. I don't have a patch right now but can probably provide one at some point if no one beats me to it. In the mean time, this is what I did in Advanced Forum:
<?php
// Give nodecomment (if installed) first shot at the comment setting
$comment_setting = (empty($node->node_comment)) ? $node->comment : $node->node_comment;
if ($comment_setting == COMMENT_NODE_READ_WRITE) {
?>
It's working fine with nodecomment installed but I haven't tested without it, yet.
Michelle