HI guys!

Sometimes under a forum post I have too many comments, enough for my users to forget what they are writing on. Any ideas on what and where to add to print the title/name of the node in the post comment form (just to remind them).

Comments

WorldFallz’s picture

You could create your own comment.tpl.php file (copy the system default from modules/comment to the subdirectory of your theme) and then put <?php print $node->title; ?> anywhere in that file you like.

steven9’s picture

Thank you WorldFallz. Why I needed this was because I have some forum threads with +100 comments and the users divert the topic or simply forget what the main point was. With your solution I will print the node title in every comment (which could be +100 times). What I want is to post it in the "Add a comment form", not in every comment.

WorldFallz’s picture

ah ok-- i missed the form part. Theming a form is a little bit different. See http://drupal.org/node/290431 for a good video on how to do this.

steven9’s picture

WorldFallz, I watched the video. It was very useful but I couldn't find how to use the information for what I need. I looked again in the comment module and found the function the prints the form (function comment_form). I tried adding <?php print $node->title; ?> in different places but it doesn't work. I think I need a different syntax.

steven9’s picture

I think I did it. I just added it in a #description of the Comment field.