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
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

Michelle - June 3, 2009 - 22:04
Title:Reuse $node->comment» Check $node->node_comment when nodecomment installed
Project:Node comments» Fasttoggle
Version:6.x-2.x-dev» 6.x-1.x-dev
Component:Comment module inconsistencies» Code
Category:task» feature request

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

 
 

Drupal is a registered trademark of Dries Buytaert.