forum-icon.tpl.php

  1. 7.x drupal/modules/forum/forum-icon.tpl.php
  2. 6.x drupal/modules/forum/forum-icon.tpl.php

Displays an appropriate icon for a forum post.

Available variables:

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

See also

template_preprocess_forum_icon()

theme_forum_icon()

1 theme call to forum-icon.tpl.php
template_preprocess_forum_topic_list in drupal/modules/forum/forum.module
Preprocesses variables for forum-topic-list.tpl.php.
3 string references to the theme hook from forum-icon.tpl.php

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

forum_theme in drupal/modules/forum/forum.module
Implements hook_theme().
hook_theme in drupal/modules/system/system.api.php
Register a module (or theme's) theme implementations.
template_preprocess_forum_topic_list in drupal/modules/forum/forum.module
Preprocesses variables for forum-topic-list.tpl.php.

File

drupal/modules/forum/forum-icon.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Displays 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_class: The icon to display. May be one of 'hot', 'hot-new', 'new',
  9. * 'default', 'closed', or 'sticky'.
  10. * - $first_new: Indicates whether this is the first topic with new posts.
  11. *
  12. * @see template_preprocess_forum_icon()
  13. * @see theme_forum_icon()
  14. *
  15. * @ingroup themeable
  16. */
  17. ?>
  18. <div class="topic-status-<?php print $icon_class ?>" title="<?php print $icon_title ?>">
  19. <?php if ($first_new): ?>
  20. <a id="new"></a>
  21. <?php endif; ?>
  22. <span class="element-invisible"><?php print $icon_title ?></span>
  23. </div>

Related topics