comment.tpl.php
- 7.x drupal-7.x/modules/comment/comment.tpl.php
- 7.x drupal-7.x/themes/garland/comment.tpl.php
- 7.x drupal-7.x/themes/bartik/templates/comment.tpl.php
- 6.x drupal-6.x/modules/comment/comment.tpl.php
- 6.x drupal-6.x/themes/bluemarine/comment.tpl.php
- 6.x drupal-6.x/themes/pushbutton/comment.tpl.php
- 6.x drupal-6.x/themes/garland/comment.tpl.php
comment.tpl.php Default theme implementation for comments.
Available variables:
- $author: Comment author. Can be link or plain text.
- $content: Body of the post.
- $date: Date and time of posting.
- $links: Various operational links.
- $new: New comment marker.
- $picture: Authors picture.
- $signature: Authors signature.
- $status: Comment status. Possible values are: comment-unpublished, comment-published or comment-preview.
- $submitted: By line with date and time.
- $title: Linked title.
These two variables are provided for context.
- $comment: Full comment object.
- $node: Node object the comments are attached to.
See also
1 theme call to comment.tpl.php
- theme_comment_view in drupal-6.x/
modules/ comment/ comment.module - Themes a single comment and related items.
File
drupal-6.x/modules/comment/comment.tpl.phpView source
- <?php
-
- /**
- * @file comment.tpl.php
- * Default theme implementation for comments.
- *
- * Available variables:
- * - $author: Comment author. Can be link or plain text.
- * - $content: Body of the post.
- * - $date: Date and time of posting.
- * - $links: Various operational links.
- * - $new: New comment marker.
- * - $picture: Authors picture.
- * - $signature: Authors signature.
- * - $status: Comment status. Possible values are:
- * comment-unpublished, comment-published or comment-preview.
- * - $submitted: By line with date and time.
- * - $title: Linked title.
- *
- * These two variables are provided for context.
- * - $comment: Full comment object.
- * - $node: Node object the comments are attached to.
- *
- * @see template_preprocess_comment()
- * @see theme_comment()
- */
- ?>
- <div class="comment<?php print ($comment->new) ? ' comment-new' : ''; print ' '. $status ?> clear-block">
- <?php print $picture ?>
-
- <?php if ($comment->new): ?>
- <span class="new"><?php print $new ?></span>
- <?php endif; ?>
-
- <h3><?php print $title ?></h3>
-
- <div class="submitted">
- <?php print $submitted ?>
- </div>
-
- <div class="content">
- <?php print $content ?>
- <?php if ($signature): ?>
- <div class="user-signature clear-block">
- <?php print $signature ?>
- </div>
- <?php endif; ?>
- </div>
-
- <?php print $links ?>
- </div>
-