You are here

function chameleon_comment in Drupal 4

Same name and namespace in other branches
  1. 5 themes/chameleon/chameleon.theme \chameleon_comment()
  2. 6 themes/chameleon/chameleon.theme \chameleon_comment()

File

themes/chameleon/chameleon.theme, line 153
A slim, CSS-driven theme.

Code

function chameleon_comment($comment, $links = "") {
  $submitted = array(
    t('By %author at %date', array(
      '%author' => theme('username', $comment),
      '%date' => format_date($comment->timestamp, 'small'),
    )),
  );
  $output = "<div class=\"comment" . ($comment->status == COMMENT_NOT_PUBLISHED ? ' comment-unpublished' : '') . "\">\n";
  $output .= " <h3 class=\"title\">" . l($comment->subject, $_GET['q'], NULL, NULL, "comment-{$comment->cid}") . "</h3>\n";
  $output .= " <div class=\"content\">" . $comment->comment . "</div>\n";
  $output .= " <div class=\"links\">" . theme('links', array_merge($submitted, $links)) . "</div>\n";
  $output .= "</div>\n";
  return $output;
}