954,587 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to enable comment for feed items

in my admin i'm at feed item content type and i've set the comment settings to read/write, but when i load a specific feed item on my page such as mydomain.com/node/137941 there is no comments. i did some research and i came across some code that u can use to manually add in the comment form and comments to the page using the $node variable and the code looks like this

in my template filei i would put...

function phptemplate_preprocess_page(&$vars) {
  $vars['comments'] = $vars['comment_form'] = '';
  if (module_exists('comment') && isset($vars['node'])) {
    $vars['comments'] = comment_render($vars['node']);
    $vars['comment_form'] = drupal_get_form('comment_form', array('nid' => $vars['node']->nid));
  }
}

function phptemplate_preprocess_node(&$vars) {
  $vars['node']->comment = 0;
}

and in my page-node.tpl.php file i would put...

<?php print comment_render($node, $node->cid);?>


i tried this code and it doesn't work. i checked individual feed items from admin under content and they all have comment settings set to disabled. even if i click read/write for comment and save it and come back it's still set to disabled. i think this setting has to be selected to read/write to even use the code above otherwise comment parameters are not passed in the $node variable to bring out the comment form and comments. anyone has any ideas on how i can make the comments appear on my page?

gambit_1607
Newbie Poster
12 posts since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: