I don't want to display the node on top the form comment. How can I do ?

bumathan - January 21, 2007 - 01:14

Hi !
The node it belongs to is displayed on top of the comment reply form. How can I remove it ?

Same thing for the forum reply page...

Thank you for your help.

no ideas ?

bumathan - January 22, 2007 - 03:42

no ideas ?

Ok

bumathan - January 24, 2007 - 06:36

So, for those who are interested, it's in fact really simple.

in comment.module, look for these lines in the function comment_reply

$output .= theme('comment_view', $comment);

$output .= node_view($node);

And comment them like that

// $output .= theme('comment_view', $comment);

// $output .= node_view($node);

The parent comment and the parent node won't be displayed anymore.

I don't know if there's a way to override this in template.php because I don't like to edit the CORE of Drupal but it works...

If you want to remove the comment at the bottom

bumathan - January 24, 2007 - 07:01

If you want to remove the comment or the node at the bottom of the form,
Find this line in comment.module

$form['#suffix'] = node_view(node_load($edit['nid']));

And comment it like that.

// $form['#suffix'] = node_view(node_load($edit['nid']));

Other way around

asimov - March 15, 2008 - 11:52

I would suggest doing this the other way around, and modify this in your template.php file, which is a theme file, not in the comments module, which is a core Drupal module. Otherwise the next time you upgrade your comments will be overwritten.

 
 

Drupal is a registered trademark of Dries Buytaert.