home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (forum-icon.tpl.php)

This example Drupal source code file (forum-icon.tpl.php) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

div, endif, first_new, id, php

The forum-icon.tpl.php Drupal example source code

<?php
// $Id: forum-icon.tpl.php,v 1.8 2010/11/22 08:07:57 webchick Exp $

/**
 * @file
 * Default theme implementation to 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'.
 * - $first_new: Indicates whether this is the first topic with new posts.
 *
 * @see template_preprocess_forum_icon()
 * @see theme_forum_icon()
 */
?>
<div class="topic-status-<?php print $icon_class ?>" title="<?php print $icon_title ?>">
<?php if ($first_new): ?>
  <a id="new"></a>
<?php endif; ?>

  <span class="element-invisible"><?php print $icon_title ?></span>

</div>

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal forum-icon.tpl.php source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.