Hi Phear
thank you for helping
this is the function that i have wrote in mod.forum.php ( file)
**
* Unread Private Message Box in header
*/
public function unread_private_messages()
{
$str = $this->load_element('unread_private_messages');
$pms = $this->EE->session->userdata('private_messages');
if ($pms == '' OR ! is_numeric($pms))
{
$pms = 0;
}
if ($pms > 0)
{
$str = $this->allow_if('private_messages', $str);
$str = $this->deny_if('no_private_messages', $str);
}
else
{
$str = $this->deny_if('private_messages', $str);
$str = $this->allow_if('no_private_messages', $str);
}
return $this->var_swap($str,
array(
'total_unread_private_messages' => $pms
)
);
}
what i mean by nod showing 0
in my forum the function above will display number of new private message if there is no new private message it show number 0 what i would like is to hide that 0 so it doesn show.
This is what my member currently ses when they login
user name: bob | 0 UNREAD MESSAGES
what i would like for them to see if there is no new messages
user name: bob
and this is what i would like to see if there is a message
user name: bob | 1 UNREAD MESSAGE
once they read message i would like it to go back to user name: bob
at the moment its actually showing user name: bob | 0 UNREAD MESSAGES after they read they message i want to hide that 0 UNREAD MESSAGES.
thanks heaps