News:

Wondering if this will always be free?  See why free is better.

Main Menu

You have [xx] messages, [x] are new

Started by Si6776, March 20, 2008, 07:21:34 PM

Previous topic - Next topic

Si6776

Hi Folks,

I have the above PM info enabled on my 1.4 board (Core theme), tried the same code for 2.0, but it won't work.  Can anyone help, please?

Simon.

http://pc-pals.com 

shadow82x

Can you show us  your index.template.php PM code or the entire file? (be sure to wrap it in code tags)
I custom coded mine and its working fine.

From index.template.php
// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
{
echo ((isset($current_action) && $curent_action == 'pm') || $context['browser']['is_ie4']) ? '' : '' , '
<a href="', $scripturl, '?action=pm">Private Messages</a>: ', $context['user']['unread_messages'], ' Unread, ', $context['user']['messages'], ' Total.<br />';
}
Colin B
Former Spammer, Customize, & Support Team Member

Si6776

This is how it is on the 1.4 board.  The 2.0 board currently remains unchanged - do you want to see that too?

// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
// Only tell them about their messages if they can read their messages!
                if ($context['allow_pm'])
                        echo ' ', $txt[152], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt[153] : $txt[471], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'];
                echo '';
echo ' <br /> ';

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

}
// Otherwise they're a guest - send them a lovely greeting...
else
echo $txt['welcome_guest'];

Si6776

Actually, yours worked wonderfully, so I'll use that, if that's OK.

Many thanks! 

Advertisement: