rewrite a option ?

Started by PS4DEV, April 10, 2011, 04:40:11 AM

Previous topic - Next topic

PS4DEV

For now, it looks on my forum like that:                Total Messages: 37 (0 New)
The code for that is the following:

if ($context['allow_pm'])
                        echo '
                           <li><a class="dot" href="', $scripturl, '?action=pm">', $txt['messages_total'], ' ', $context['user']['messages'], ' (', $context['user']['unread_messages'] , ' ', $txt['messages_new'], ')</a></li>';

                     echo '


Since I´ve no idea about php , how can I rewrite the code that there you can read the following ?

0 new messages


Illori

moved to coding discussion as this is not a graphics or templates issue.

PS4DEV

Ok guys, I did it myself.
This code displays the link to the Profile and the number of new messages. It looks like the way , phpbb does.
If anyone want it, cheers ^^

Example:

User Control Panel (2 new Messages)

echo '
<li><a class="dot" href="'.$scripturl.'?action=profile">User Control Panel</a><a href="'.$scripturl.'?action=pm">('.$context['user']['unread_messages'].' new Messages)</a></li>';

Advertisement: