diff options
-rw-r--r-- | misc/forum-closed.png | bin | 1075 -> 0 bytes | |||
-rw-r--r-- | misc/forum-default.png | bin | 962 -> 0 bytes | |||
-rw-r--r-- | misc/forum-hot-new.png | bin | 1296 -> 0 bytes | |||
-rw-r--r-- | misc/forum-hot.png | bin | 1171 -> 0 bytes | |||
-rw-r--r-- | misc/forum-icons.png | bin | 0 -> 1920 bytes | |||
-rw-r--r-- | misc/forum-new.png | bin | 1114 -> 0 bytes | |||
-rw-r--r-- | misc/forum-sticky.png | bin | 1099 -> 0 bytes | |||
-rw-r--r-- | modules/forum/forum-icon.tpl.php | 4 | ||||
-rw-r--r-- | modules/forum/forum.css | 22 | ||||
-rw-r--r-- | modules/forum/forum.module | 12 |
10 files changed, 32 insertions, 6 deletions
diff --git a/misc/forum-closed.png b/misc/forum-closed.png Binary files differdeleted file mode 100644 index 509fca6bc..000000000 --- a/misc/forum-closed.png +++ /dev/null diff --git a/misc/forum-default.png b/misc/forum-default.png Binary files differdeleted file mode 100644 index 4b84633c5..000000000 --- a/misc/forum-default.png +++ /dev/null diff --git a/misc/forum-hot-new.png b/misc/forum-hot-new.png Binary files differdeleted file mode 100644 index 418c61353..000000000 --- a/misc/forum-hot-new.png +++ /dev/null diff --git a/misc/forum-hot.png b/misc/forum-hot.png Binary files differdeleted file mode 100644 index 7e3991a67..000000000 --- a/misc/forum-hot.png +++ /dev/null diff --git a/misc/forum-icons.png b/misc/forum-icons.png Binary files differnew file mode 100644 index 000000000..66e025948 --- /dev/null +++ b/misc/forum-icons.png diff --git a/misc/forum-new.png b/misc/forum-new.png Binary files differdeleted file mode 100644 index cce21e627..000000000 --- a/misc/forum-new.png +++ /dev/null diff --git a/misc/forum-sticky.png b/misc/forum-sticky.png Binary files differdeleted file mode 100644 index 2b463c302..000000000 --- a/misc/forum-sticky.png +++ /dev/null diff --git a/modules/forum/forum-icon.tpl.php b/modules/forum/forum-icon.tpl.php index 9e8c653a8..4a43dd2ce 100644 --- a/modules/forum/forum-icon.tpl.php +++ b/modules/forum/forum-icon.tpl.php @@ -14,12 +14,14 @@ * @see theme_forum_icon() */ ?> +<div class="topic-status-<?php print $icon_class ?>" title="<?php print $icon_title ?>"> <?php if ($new_posts): ?> <a id="new"> <?php endif; ?> -<?php print theme('image', array('path' => "misc/forum-$icon.png")) ?> + <span class="element-invisible"><?php print $icon_title ?></span> <?php if ($new_posts): ?> </a> <?php endif; ?> +</div> diff --git a/modules/forum/forum.css b/modules/forum/forum.css index f56930d54..adcf7aa70 100644 --- a/modules/forum/forum.css +++ b/modules/forum/forum.css @@ -24,4 +24,24 @@ #forum div.indent { margin-left: 20px; } - +#forum .icon div { + background-image: url(../../misc/forum-icons.png); + background-repeat: no-repeat; + width: 24px; + height: 24px; +} +#forum .icon .topic-status-new { + background-position: -24px 0; +} +#forum .icon .topic-status-hot { + background-position: -48px 0; +} +#forum .icon .topic-status-hot-new { + background-position: -72px 0; +} +#forum .icon .topic-status-sticky { + background-position: -96px 0; +} +#forum .icon .topic-status-closed { + background-position: -120px 0; +} diff --git a/modules/forum/forum.module b/modules/forum/forum.module index f5d779a91..d89f25e7e 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -1135,18 +1135,22 @@ function template_preprocess_forum_topic_list(&$variables) { function template_preprocess_forum_icon(&$variables) { $variables['hot_threshold'] = variable_get('forum_hot_topic', 15); if ($variables['num_posts'] > $variables['hot_threshold']) { - $variables['icon'] = $variables['new_posts'] ? 'hot-new' : 'hot'; + $variables['icon_class'] = $variables['new_posts'] ? 'hot-new' : 'hot'; + $variables['icon_title'] = $variables['new_posts'] ? t('Hot topic, new comments') : t('Hot topic'); } else { - $variables['icon'] = $variables['new_posts'] ? 'new' : 'default'; + $variables['icon_class'] = $variables['new_posts'] ? 'new' : 'default'; + $variables['icon_title'] = $variables['new_posts'] ? t('New comments') : t('Normal topic'); } if ($variables['comment_mode'] == COMMENT_NODE_CLOSED || $variables['comment_mode'] == COMMENT_NODE_HIDDEN) { - $variables['icon'] = 'closed'; + $variables['icon_class'] = 'closed'; + $variables['icon_title'] = t('Closed topic'); } if ($variables['sticky'] == 1) { - $variables['icon'] = 'sticky'; + $variables['icon_class'] = 'sticky'; + $variables['icon_title'] = t('Sticky topic'); } } |