Same filename and directory in other branches
  1. 7.x modules/forum/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()

1 theme call to forum-icon.tpl.php
template_preprocess_forum_topic_list in modules/forum/forum.module
Preprocess variables to format the topic listing.

File

modules/forum/forum-icon.tpl.php
View source
<?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()
 */
if ($new_posts) {
  ?>
  <a name="new">
<?php

}
?>

<?php

print theme('image', "misc/forum-{$icon}.png");
?>

<?php

if ($new_posts) {
  ?>
  </a>
<?php

}