forum-icon.tpl.php

  1. 7.x drupal-7.x/modules/forum/forum-icon.tpl.php
  2. 6.x drupal-6.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 drupal-6.x/modules/forum/forum.module
Preprocess variables to format the topic listing.

File

drupal-6.x/modules/forum/forum-icon.tpl.php
View source
  1. <?php
  2. /**
  3. * @file forum-icon.tpl.php
  4. * Display an appropriate icon for a forum post.
  5. *
  6. * Available variables:
  7. * - $new_posts: Indicates whether or not the topic contains new posts.
  8. * - $icon: The icon to display. May be one of 'hot', 'hot-new', 'new',
  9. * 'default', 'closed', or 'sticky'.
  10. *
  11. * @see template_preprocess_forum_icon()
  12. * @see theme_forum_icon()
  13. */
  14. ?>
  15. <?php if ($new_posts): ?>
  16. <a name="new">
  17. <?php endif; ?>
  18. <?php print theme('image', "misc/forum-$icon.png") ?>
  19. <?php if ($new_posts): ?>
  20. </a>
  21. <?php endif; ?>