Same name and namespace in other branches
  1. 4.7.x modules/comment.module \theme_comment()
  2. 5.x modules/comment/comment.module \theme_comment()
  3. 6.x developer/theme.php \theme_comment()
1 theme call to theme_comment()
theme_comment_view in modules/comment.module

File

modules/comment.module, line 1546
Enables users to comment on published content.

Code

function theme_comment($comment, $links = 0) {
  $output = "<div class=\"comment\">\n";
  $output .= '<div class="subject">' . l($comment->subject, $_GET['q'], NULL, NULL, "comment-{$comment->cid}") . ' ' . theme('mark', $comment->new) . "</div>\n";
  $output .= '<div class="moderation">' . $comment->moderation . "</div>\n";
  $output .= '<div class="credit">' . t('by %a on %b', array(
    '%a' => format_name($comment),
    '%b' => format_date($comment->timestamp),
  )) . "</div>\n";
  $output .= "<div class=\"body\">{$comment->comment}</div>\n";
  $output .= "<div class=\"links\">{$links}</div>\n";
  $output .= "</div>\n";
  return $output;
}