theme_comment_view

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/comment/comment.module, строка 1688

Версии
5
theme_comment_view($comment, $links = array(), $visible = 1)
6
theme_comment_view($comment, $node, $links = array(), $visible = TRUE)

▾ 8 функции вызывают theme_comment_view()

comment_form_add_preview in modules/comment/comment.module
Конструктор формы; Формирует и проверяет форму предпросмотра комментария.
comment_render in modules/comment/comment.module
Отображает комментарии.
comment_reply in modules/comment/comment.module
This function is responsible for generating a comment reply form. There are several cases that have to be handled, including: replies to comments replies to nodes attempts to reply to nodes that can no longer accept comments respecting access...
theme_comment_flat_collapsed in modules/comment/comment.module
theme_comment_flat_expanded in modules/comment/comment.module
Темизирует комментарий в раскрытом виде.
theme_comment_preview in modules/comment/comment.module
theme_comment_thread_collapsed in modules/comment/comment.module
theme_comment_thread_expanded in modules/comment/comment.module

Код

<?php
function theme_comment_view($comment, $links = array(), $visible = 1) {
  static $first_new = TRUE;

  $output = '';
  $comment->new = node_mark($comment->nid, $comment->timestamp);
  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, $links);
  }
  else {
    $output .= theme('comment_folded', $comment);
  }

  return $output;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему