What I did was use the Flashing GIF mod and adapt it so that it's compatible with different styles and languages, plus (and this might interest some) as long as there are unread PMs the image for the PMs flashes (can't miss it anymore).OK, it still says there are zero unread messages but I couldn't be bothered with that.
In includes/page_header.php
FIND
- Code: Select all
//
// Obtain number of new private messages
// if user is logged in
//
AFTER ADD
- Code: Select all
$pm_name = "pm";
FIND
- Code: Select all
{
$s_privmsg_new = 0;
$icon_pm = $images['pm_new_msg'];
}
AFTER ADD
- Code: Select all
$pm_name="pm_new";
FIND
- Code: Select all
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
AFTER ADD
- Code: Select all
$pm_name="pm_new";
$icon_pm = $images['pm_new_msg'];
FIND
- Code: Select all
'PRIVMSG_IMG' => $icon_pm,
AFTER ADD
- Code: Select all
'PM_NAME' => $pm_name,
In templates\{template}\overall_header.tpl
FIND
- Code: Select all
<img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />
REPLACE BY
- Code: Select all
<img src="{PRIVMSG_IMG}" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />
For other templates the images have a different name and extra functions (js) have to be taken into account e.g. Aeolus where the extra variable comes into play and
- Code: Select all
ShowImage("{PRIVATE_MESSAGE_INFO}", "{U_PRIVATEMSGS}", "pm");
becomes
- Code: Select all
ShowImage("{PRIVATE_MESSAGE_INFO}", "{U_PRIVATEMSGS}", "{PM_NAME}");
In templates\{template}\{template}.cfg
ADD
- Code: Select all
$images['pm_new_msg'] = "$current_template_images/icon_mini_message.gif";
$images['pm_no_new_msg'] = "$current_template_images/icon_mini_no_message.gif";
(notice that icon_mini_message.gif is the flashing one) - for templates where the image contains text you'ld have to add the {Lang} variable in the path like this $images['pm_new_msg'] = "$current_template_images/{LANG}/btn_pm_new.gif";

