Community Documentation

forum-icon.tpl.php

  1. drupal
    1. 6 forum-icon.tpl.php
    2. 7 forum-icon.tpl.php
    3. 8 forum-icon.tpl.php

forum-icon.tpl.php Display an appropriate icon for a forum post.

Available variables:

  • $new_posts: Indicates whether or not the topic contains new posts.
  • $icon: The icon to display. May be one of 'hot', 'hot-new', 'new', 'default', 'closed', or 'sticky'.

See also

template_preprocess_forum_icon()

theme_forum_icon()

View source
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php

/**
 * @file forum-icon.tpl.php
 * Display an appropriate icon for a forum post.
 *
 * Available variables:
 * - $new_posts: Indicates whether or not the topic contains new posts.
 * - $icon: The icon to display. May be one of 'hot', 'hot-new', 'new',
 *   'default', 'closed', or 'sticky'.
 *
 * @see template_preprocess_forum_icon()
 * @see theme_forum_icon()
 */
?>
<?php if ($new_posts): ?>
  <a name="new">
<?php endif; ?>

<?php print theme('image', "misc/forum-$icon.png") ?>

<?php if ($new_posts): ?>
  </a>
<?php endif; ?>
Login or register to post comments