News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Need bold unread messages

Started by Aaron10, January 10, 2009, 05:15:43 PM

Previous topic - Next topic

Aaron10

Ok, take a look at this image:



Where it says 'Unread:' I want the following number to be bolded but only if its a number other than 0. eg. 3,4,7 but have it normal when its 0. Like these:

Unread: 3

Unread: 0

Heres the html for that area in my index.template.php:

// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
//echo  '<span class="8pt" style="font-weight: normal;">', $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 '<a href="', $scripturl, '?action=pm">Private Messages</a>: Unread ', $context['user']['unread_messages'], ', Total ', $context['user']['messages'], '.';
echo'</span>


Any help will be greatly appreciated!

Aaron10


[SiNaN]

Find:

', $context['user']['unread_messages'], '

Replace:

', $context['user']['unread_messages'] != 0 ? '<b>' : '', $context['user']['unread_messages'], $context['user']['unread_messages'] != 0 ? '</b>' : '', '
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: