News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

New messages flashing mail

Started by edi67, April 07, 2004, 10:53:22 AM

Previous topic - Next topic

thenoss

I'll bump this instead of creating a new thread...

I'm using SMF 1.1.11 and having troubles trying to do something like this on a custom theme...

Anyone know how I can go about doing this? =S

xenovanis

Quote from: thenoss on September 25, 2010, 11:09:11 PM
I'll bump this instead of creating a new thread...

I'm using SMF 1.1.11 and having troubles trying to do something like this on a custom theme...

Anyone know how I can go about doing this? =S

Depends on the custom theme. What problems are you experiencing?
"Insanity: doing the same thing over and over again and expecting different results."

Maxine22

I am using the Ziyah Zemin theme. Anyone know how I can get this working as it doesn't have PM notifcation  :-[

xenovanis

Quote from: Maxine22 on November 14, 2010, 02:28:01 AM
I am using the Ziyah Zemin theme. Anyone know how I can get this working as it doesn't have PM notifcation  :-[

That's odd, isn't it. You'd want to know if you have new messages.

Well, this is how you could implement it. In the file index.template.php of this theme, look for

echo '
<strong>', $txt['hello_member_ndt'], ' ', $context['user']['name'] , '</strong><br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';


replace that part with

echo '
<strong>', $txt['hello_member_ndt'], ' ', $context['user']['name'] , '</strong>';
// 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=pm"><img src="' . $settings['images_url'] . '/newim.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '<br />
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';


Which will make it look like this
Hello username (1) {image here}
"Insanity: doing the same thing over and over again and expecting different results."

Maxine22

QuoteThat's odd, isn't it. You'd want to know if you have new messages.

Absolutely. The only way to know a PM is in the inbox is via email which isn't any help if the user doesn't access it on a regular basis.

Okay the code works but when you have read the PM, the notification disappears along with 'show last posts' and 'replies to posts' options......

Any suggestions?

Thanks

xenovanis

Sorry about that. Try this instead

   echo '
            <strong>', $txt['hello_member_ndt'], ' ', $context['user']['name'] , '</strong>';
            // 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=pm"><img src="' . $settings['images_url'] . '/newim.gif" border="0" />(' . $context['user']['unread_messages'] . ')</a> ' . $context['menu_separator'] . '<br />';
            echo '
            <a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a> <br />
            <a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
"Insanity: doing the same thing over and over again and expecting different results."

praveebook

If you are having too many problem with Dilber theme then you should go to the DilberMc thread and ask many problem u could confused.


------------------------------------------------------------------------------

Advertisement: