root / drupal7 / themes / bartik / templates / comment.tpl.php @ 746ddf5a
1 |
<?php
|
---|---|
2 |
|
3 |
/**
|
4 |
* @file
|
5 |
* Bartik's 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 |
?>
|
60 |
<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>> |
61 |
|
62 |
<div class="attribution"> |
63 |
|
64 |
<?php print $picture; ?> |
65 |
|
66 |
<div class="submitted"> |
67 |
<p class="commenter-name"> |
68 |
<?php print $author; ?> |
69 |
</p>
|
70 |
<p class="comment-time"> |
71 |
<?php print $created; ?> |
72 |
</p>
|
73 |
<p class="comment-permalink"> |
74 |
<?php print $permalink; ?> |
75 |
</p>
|
76 |
</div>
|
77 |
</div>
|
78 |
|
79 |
<div class="comment-text"> |
80 |
<div class="comment-arrow"></div> |
81 |
|
82 |
<?php if ($new): ?> |
83 |
<span class="new"><?php print $new; ?></span> |
84 |
<?php endif; ?> |
85 |
|
86 |
<?php print render($title_prefix); ?> |
87 |
<h3<?php print $title_attributes; ?>><?php print $title; ?></h3> |
88 |
<?php print render($title_suffix); ?> |
89 |
|
90 |
<div class="content"<?php print $content_attributes; ?>> |
91 |
<?php
|
92 |
// We hide the comments and links now so that we can render them later.
|
93 |
hide($content['links']); |
94 |
print render($content); |
95 |
?>
|
96 |
<?php if ($signature): ?> |
97 |
<div class="user-signature clearfix"> |
98 |
<?php print $signature; ?> |
99 |
</div>
|
100 |
<?php endif; ?> |
101 |
</div> <!-- /.content --> |
102 |
|
103 |
<?php print render($content['links']); ?> |
104 |
</div> <!-- /.comment-text --> |
105 |
</div>
|