comparison modules/comment/comment.tpl.php @ 0:ff03f76ab3fe

initial version
author danieleb <danielebarchiesi@me.com>
date Wed, 21 Aug 2013 18:51:11 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ff03f76ab3fe
1 <?php
2
3 /**
4 * @file
5 * Default theme implementation for comments.
6 *
7 * Available variables:
8 * - $author: Comment author. Can be link or plain text.
9 * - $content: An array of comment items. Use render($content) to print them all, or
10 * print a subset such as render($content['field_example']). Use
11 * hide($content['field_example']) to temporarily suppress the printing of a
12 * given element.
13 * - $created: Formatted date and time for when the comment was created.
14 * Preprocess functions can reformat it by calling format_date() with the
15 * desired parameters on the $comment->created variable.
16 * - $changed: Formatted date and time for when the comment was last changed.
17 * Preprocess functions can reformat it by calling format_date() with the
18 * desired parameters on the $comment->changed variable.
19 * - $new: New comment marker.
20 * - $permalink: Comment permalink.
21 * - $submitted: Submission information created from $author and $created during
22 * template_preprocess_comment().
23 * - $picture: Authors picture.
24 * - $signature: Authors signature.
25 * - $status: Comment status. Possible values are:
26 * comment-unpublished, comment-published or comment-preview.
27 * - $title: Linked title.
28 * - $classes: String of classes that can be used to style contextually through
29 * CSS. It can be manipulated through the variable $classes_array from
30 * preprocess functions. The default values can be one or more of the following:
31 * - comment: The current template type, i.e., "theming hook".
32 * - comment-by-anonymous: Comment by an unregistered user.
33 * - comment-by-node-author: Comment by the author of the parent node.
34 * - comment-preview: When previewing a new or edited comment.
35 * The following applies only to viewers who are registered users:
36 * - comment-unpublished: An unpublished comment visible only to administrators.
37 * - comment-by-viewer: Comment by the user currently viewing the page.
38 * - comment-new: New comment since last the visit.
39 * - $title_prefix (array): An array containing additional output populated by
40 * modules, intended to be displayed in front of the main title tag that
41 * appears in the template.
42 * - $title_suffix (array): An array containing additional output populated by
43 * modules, intended to be displayed after the main title tag that appears in
44 * the template.
45 *
46 * These two variables are provided for context:
47 * - $comment: Full comment object.
48 * - $node: Node object the comments are attached to.
49 *
50 * Other variables:
51 * - $classes_array: Array of html class attribute values. It is flattened
52 * into a string within the variable $classes.
53 *
54 * @see template_preprocess()
55 * @see template_preprocess_comment()
56 * @see template_process()
57 * @see theme_comment()
58 *
59 * @ingroup themeable
60 */
61 ?>
62 <div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
63 <?php print $picture ?>
64
65 <?php if ($new): ?>
66 <span class="new"><?php print $new ?></span>
67 <?php endif; ?>
68
69 <?php print render($title_prefix); ?>
70 <h3<?php print $title_attributes; ?>><?php print $title ?></h3>
71 <?php print render($title_suffix); ?>
72
73 <div class="submitted">
74 <?php print $permalink; ?>
75 <?php print $submitted; ?>
76 </div>
77
78 <div class="content"<?php print $content_attributes; ?>>
79 <?php
80 // We hide the comments and links now so that we can render them later.
81 hide($content['links']);
82 print render($content);
83 ?>
84 <?php if ($signature): ?>
85 <div class="user-signature clearfix">
86 <?php print $signature ?>
87 </div>
88 <?php endif; ?>
89 </div>
90
91 <?php print render($content['links']) ?>
92 </div>