Advertisement:

Author Topic: You have [xx] messages, [x] are new  (Read 5672 times)

Offline Si6776

  • Jr. Member
  • **
  • Posts: 184
You have [xx] messages, [x] are new
« on: March 20, 2008, 07:21:34 PM »
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 

Offline shadow82x

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,279
  • Gender: Male
    • cmblaber on LinkedIn
Re: You have [xx] messages, [x] are new
« Reply #1 on: March 20, 2008, 10:32:22 PM »
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
Code: [Select]
// 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

Offline Si6776

  • Jr. Member
  • **
  • Posts: 184
Re: You have [xx] messages, [x] are new
« Reply #2 on: March 21, 2008, 05:46:31 AM »
This is how it is on the 1.4 board.  The 2.0 board currently remains unchanged - do you want to see that too?

Code: [Select]
// 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'];

Offline Si6776

  • Jr. Member
  • **
  • Posts: 184
Re: You have [xx] messages, [x] are new
« Reply #3 on: March 21, 2008, 05:57:02 AM »
Actually, yours worked wonderfully, so I'll use that, if that's OK.

Many thanks!