/[drupal]/drupal/modules/comment/comment.tpl.php
ViewVC logotype

Contents of /drupal/modules/comment/comment.tpl.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.16 - (show annotations) (download) (as text)
Mon Oct 19 20:33:21 2009 UTC (5 weeks, 3 days ago) by dries
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10, HEAD
Changes since 1.15: +9 -5 lines
File MIME type: text/x-php
- Patch #493030 by effulgentsia: documentation improvements/additions for RDF support.
1 <?php
2 // $Id: comment.tpl.php,v 1.15 2009/10/19 01:30:06 dries Exp $
3
4 /**
5 * @file
6 * Default theme implementation for comments.
7 *
8 * Available variables:
9 * - $author: Comment author. Can be link or plain text.
10 * - $content: An array of comment items. Use render($content) to print them all, or
11 * print a subset such as render($content['field_example']). Use
12 * hide($content['field_example']) to temporarily suppress the printing of a
13 * given element.
14 * - $created: Formatted date and time for when the comment was created.
15 * Preprocess functions can reformat it by calling format_date() with the
16 * desired parameters on the $comment->created variable.
17 * - $changed: Formatted date and time for when the comment was last changed.
18 * Preprocess functions can reformat it by calling format_date() with the
19 * desired parameters on the $comment->changed variable.
20 * - $new: New comment marker.
21 * - $picture: Authors picture.
22 * - $signature: Authors signature.
23 * - $status: Comment status. Possible values are:
24 * comment-unpublished, comment-published or comment-preview.
25 * - $title: Linked title.
26 * - $contextual_links (array): An array of contextual links for the comment.
27 * - $classes: String of classes that can be used to style contextually through
28 * CSS. It can be manipulated through the variable $classes_array from
29 * preprocess functions. The default values can be one or more of the following:
30 * - comment: The current template type, i.e., "theming hook".
31 * - comment-by-anonymous: Comment by an unregistered user.
32 * - comment-by-node-author: Comment by the author of the parent node.
33 * - comment-preview: When previewing a new or edited comment.
34 * The following applies only to viewers who are registered users:
35 * - comment-unpublished: An unpublished comment visible only to administrators.
36 * - comment-by-viewer: Comment by the user currently viewing the page.
37 * - comment-new: New comment since last the visit.
38 *
39 * These two variables are provided for context:
40 * - $comment: Full comment object.
41 * - $node: Node object the comments are attached to.
42 *
43 * Other variables:
44 * - $classes_array: Array of html class attribute values. It is flattened
45 * into a string within the variable $classes.
46 *
47 * @see template_preprocess()
48 * @see template_preprocess_comment()
49 * @see template_process()
50 * @see theme_comment()
51 */
52 ?>
53 <div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
54 <?php if ($contextual_links): ?>
55 <?php print render($contextual_links); ?>
56 <?php endif; ?>
57
58 <?php print $picture ?>
59
60 <?php if ($new): ?>
61 <span class="new"><?php print $new ?></span>
62 <?php endif; ?>
63
64 <h3<?php print $title_attributes; ?>><?php print $title ?></h3>
65
66 <div class="submitted">
67 <?php
68 print t('Submitted by !username on !datetime.',
69 array('!username' => $author, '!datetime' => $created));
70 ?>
71 </div>
72
73 <div class="content"<?php print $content_attributes; ?>>
74 <?php
75 // We hide the comments and links now so that we can render them later.
76 hide($content['links']);
77 print render($content);
78 ?>
79 <?php if ($signature): ?>
80 <div class="user-signature clearfix">
81 <?php print $signature ?>
82 </div>
83 <?php endif; ?>
84 </div>
85
86 <?php print render($content['links']) ?>
87 </div>

  ViewVC Help
Powered by ViewVC 1.1.2