Once a user has read an entire comment thread, and scrolled all the way down a list of comments, it is bad usability to make them scroll all the way back up to the top of a page to add a comment. It also encourages them to click the "reply" link for the last poster, which results in unintentional nesting.

My solution (or at least what I hope to be a solution if I can do it) is to display another "add new comment" link at the bottom of the comment list. The problem is, I can't figure out how to do this within my theme (phptemplate). I know how to theme individual comments, and I know how to theme a node and page, but I can't figure out where the comments are added.

Somewhere along the way the comments are appended to the node but I'm having a hard time figuring out where. Can anyone help?

Am I the only one who thinks an additional "add new comment" link would benefit the average user?

I am posting this in theme dev forum, because I want to make sure it isn't a "theme" thing (which it seems like it should be) before I go trying to hunt this down on a deeper level.

Comments

greggles’s picture

Have you thought about using comment.tpl.php to get that effect? I'm not sure but it seems like there should be a solution in there. Or in page.tpl.php to put it after the comments if you are on a node (arg(0) == 'node' && is_numeric(arg(1))))

--
Knaddison Family | mmm Free Range Burritos

link0ff’s picture

Yes, this is a real usability problem. To put "add new comment" link below the comment list, I use the following function in template.php:

function phptemplate_comment_wrapper($content, $node) {
  if (!$content || $node->type == 'forum') {
    return '<div id="comments">'. $content .'</div>';
  }
  else {
    $output = '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
    $links = $node->links;
    if (count($links)) {
      $output .= '<div class="links">'. theme('links', $links, array('class' => 'links inline')) ."</div>\n";
    }
    return $output;
  }
}