Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Possibly the name of the variable has changed? It appears that the correct name should now be $icon_class. Below, I have changed the two occurances of $icon to $icon_class in forum-icon.tpl.php and it appears to work just fine. The error had showed up when listing a forum which contained any content.
// $Id: forum-icon.tpl.php,v 1.4 2010/06/18 14:02:28 jarek 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_class: 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):
endif;
print theme('image', array('path' => $directory . "/images/forum-$icon_class.png", 'alt' => 'Default avatar'));
if ($new_posts):
endif;
Comments
Comment #1
Jarek Foksa CreditAttribution: Jarek Foksa commentedYup, there were some changes in core forum module recently. I will update forum-icon.tpl.php template in a moment.
Comment #2
Jarek Foksa CreditAttribution: Jarek Foksa commentedFixed in revision 7.x-1.8