_forum_icon
- Versions
- 4.6
_forum_icon($new_posts, $num_posts = 0, $comment_mode = 0, $sticky = 0)
Code
modules/forum.module, line 923
<?php
function _forum_icon($new_posts, $num_posts = 0, $comment_mode = 0, $sticky = 0) {
$base_path = variable_get('forum_icon_path', '');
if ($base_path) {
if ($num_posts > variable_get('forum_hot_topic', 15)) {
$icon = $new_posts ? 'hot-new' : 'hot';
}
else {
$icon = $new_posts ? 'new' : 'default';
}
if ($comment_mode == 1) {
$icon = 'closed';
}
if ($sticky == 1) {
$icon = 'sticky';
}
// default
$file = variable_get('forum_icon_path', 'misc') ."/forum-$icon.png";
$output = theme('image', $file);
}
else {
$output = ' ';
}
if ($new_posts) {
$output = "<a name=\"new\">$output</a>";
}
return $output;
}
?>Login or register to post comments 