theme_comment_view

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 theme_comment_view($comment, $node, $links = array(), $visible = TRUE)

Theme a single comment block.

Übergabeparameter

$comment The comment object.

$node The comment node.

$links An associative array containing control links.

$visible Switches between folded/unfolded view.

Verwandte Themen

Code

modules/comment/comment.module, line 1811

<?php
function theme_comment_view($comment, $node, $links = array(), $visible = TRUE) {
  static $first_new = TRUE;
  $comment->new = node_mark($comment->nid, $comment->timestamp);
  $output = '';

  if ($first_new && $comment->new != MARK_READ) {
    // Assign the anchor only for the first new comment. This avoids duplicate
    // id attributes on a page.
    $first_new = FALSE;
    $output .= "<a id=\"new\"></a>\n";
  }

  $output .= "<a id=\"comment-$comment->cid\"></a>\n";

  // Switch to folded/unfolded view of the comment.
  if ($visible) {
    $comment->comment = check_markup($comment->comment, $comment->format, '', FALSE);
    // Comment API hook.
    comment_invoke_comment($comment, 'view');
    $output .= theme('comment', $comment, $node, $links);
  }
  else {
    $output .= theme('comment_folded', $comment);
  }

  return $output;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen