News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Hack: new message flashing icon

Started by marten, January 12, 2006, 08:40:11 PM

Previous topic - Next topic

kizer

I love this mod. I often hit the front page and click the box saying cancel on the PM and now I simply can not forget that I did that with that annoying flashing images.

Thanks. ;)
Own a Jeep? Links4Jeeps.com

Jed C

i installed this mod a while ago and had no probs until now  ::)
i had my flashy icon flashing in the message tab (cannot remember how i did that)
but i have just centred my tabs and it is now flashing to the left again
i read reply to copfirearms but my code is not the same
any ideas  ???

Quoteglobal $context, $settings, $options, $scripturl, $txt;  // Show Flashy icon if user has new messages and it not a guest
if (!$context['user']['is_guest'] && $context['user']['unread_messages'])
                             echo '
<a href="' . $scripturl . '?action=im"><img src="' . $settings['images_url'] . '/newpm.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '';

TomW

Yes, I know that this is an OLD topic, but I would like to use this method for my 2.0 RC2 upgrade.  What changes are required ?

TomW

Quote from: TomW on January 24, 2010, 08:06:48 PM
Yes, I know that this is an OLD topic, but I would like to use this method for my 2.0 RC2 upgrade.  What changes are required ?

Bueller ?

waruna

Guys, what code for SMF2.0 RC2? Thanks in advance :D
Trust of Lust

balti27

#45
OK i made something and it worked for me.

As follows:

Copy the msg.gif file in the Main directory of your webspace.

Open Forum/Sources/Subs.php

Search for:
$context['menu_buttons'][$current_action]['active_button'] = true;

if (!$user_info['is_guest'] && $context['user']['unread_messages'] > 0 && isset($context['menu_buttons']['pm']))
{
$context['menu_buttons']['pm']['alttitle'] = $context['menu_buttons']['pm']['title'] . ' [' . $context['user']['unread_messages'] . ']';
$context['menu_buttons']['pm']['title'] .= ' [<strong>' . $context['user']['unread_messages'] . '</strong>]';
}
}


And Change it to:
$context['menu_buttons'][$current_action]['active_button'] = true;

if (!$user_info['is_guest'] && $context['user']['unread_messages'] > 0 && isset($context['menu_buttons']['pm']))
{
$context['menu_buttons']['pm']['alttitle'] = $context['menu_buttons']['pm']['title'] . ' [' . $context['user']['unread_messages'] . ']';
$context['menu_buttons']['pm']['title'] .= ' [<strong>' . $context['user']['unread_messages'] . '</strong>]&nbsp;&nbsp;<img src="' . $settings['images_url'] . '/msg.gif" border="0" />';
}
}

balti27

I hope thise mod is going to be updatet for smf rc3  ;D

Advertisement: