Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: boogiedown - maaliskuu 22, 2006, 04:56:48 IP

Otsikko: Adding "Username, you have 2 messages, 0 are new
Kirjoitti: boogiedown - maaliskuu 22, 2006, 04:56:48 IP
I am using the defaul theme and want to add, similar to what SMF has in the user area.

you have 2 messages, 0 are new
Show unread posts since last visit. | Show new replies to your posts.


what code do i need to change?
Otsikko: Re: Adding "Username, you have 2 messages, 0 are new
Kirjoitti: Kindred - maaliskuu 22, 2006, 05:14:52 IP

// 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 '.<br />';
echo '
<a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a>&nbsp;|&nbsp;<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a><br />';
}

Otsikko: Re: Adding "Username, you have 2 messages, 0 are new
Kirjoitti: boogiedown - maaliskuu 22, 2006, 07:49:25 IP
Perfect!
Otsikko: Re: Adding "Username, you have 2 messages, 0 are new
Kirjoitti: eriktm - maaliskuu 23, 2006, 04:00:14 AP
Great Kindered, also looked for this..

;) Found in a search...