Projet

Général

Profil

Paste
Télécharger (3,64 ko) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / themes / busy / templates / comment.tpl.php @ 6c38d829

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
 * - $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
 * - $classes: String of classes that can be used to style contextually through
27
 *   CSS. It can be manipulated through the variable $classes_array from
28
 *   preprocess functions. The default values can be one or more of the following:
29
 *   - comment: The current template type, i.e., "theming hook".
30
 *   - comment-by-anonymous: Comment by an unregistered user.
31
 *   - comment-by-node-author: Comment by the author of the parent node.
32
 *   - comment-preview: When previewing a new or edited comment.
33
 *   The following applies only to viewers who are registered users:
34
 *   - comment-unpublished: An unpublished comment visible only to administrators.
35
 *   - comment-by-viewer: Comment by the user currently viewing the page.
36
 *   - comment-new: New comment since last the visit.
37
 * - $title_prefix (array): An array containing additional output populated by
38
 *   modules, intended to be displayed in front of the main title tag that
39
 *   appears in the template.
40
 * - $title_suffix (array): An array containing additional output populated by
41
 *   modules, intended to be displayed after the main title tag that appears in
42
 *   the template.
43
 *
44
 * These two variables are provided for context:
45
 * - $comment: Full comment object.
46
 * - $node: Node object the comments are attached to.
47
 *
48
 * Other variables:
49
 * - $classes_array: Array of html class attribute values. It is flattened
50
 *   into a string within the variable $classes.
51
 *
52
 * @see template_preprocess()
53
 * @see template_preprocess_comment()
54
 * @see template_process()
55
 * @see theme_comment()
56
 */
57
?>
58
<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
59
  <?php print render($title_prefix); ?>
60
  <h3<?php print $title_attributes; ?>><?php print $title ?></h3>
61
  <?php print render($title_suffix); ?>
62
  <div class="comment-inner clearfix">
63
    <div class="submitted">
64
      <?php print $permalink; ?>
65
      <?php
66
        print t('Submitted by !username on !datetime.',
67
          array('!username' => $author, '!datetime' => $created));
68
      ?>
69
    </div>
70
    <?php print $picture ?>
71
    <?php if ($new): ?>
72
    <span class="new"><?php print $new ?></span>
73
    <?php endif; ?>
74
    <div class="content"<?php print $content_attributes; ?>>
75
      <?php
76
      // We hide the comments and links now so that we can render them later.
77
      hide($content['links']);
78
      print render($content);
79
      ?>
80
      <?php if ($signature): ?>
81
      <div class="user-signature clearfix">
82
        <?php print $signature ?>
83
      </div>
84
      <?php endif; ?>
85
    </div>
86
    <div class="links">
87
    <?php print render($content['links']) ?>
88
    </div>
89
  </div>
90
</div>