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