Hi,
I am trying to code the message part of this
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2F0M4ViKR.png&hash=38baf4e0fcd21faa79f493a264f7280f7e66b633)
How can I achieve this? It also turns red when you receive a message, how can I do this as well?
Thanks in advance :)
would need to know what you have at the moment.
At the moment I have
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
echo $txt['msg_alert_you_have'], ' <a href="', $scripturl, '?action=pm">', $context['user']['messages'], ' ', $context['user']['messages'] != 1 ? $txt['msg_alert_messages'] : $txt['message_lowercase'], '</a>', $txt['newmessages4'], ' ', $context['user']['unread_messages'], ' ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '.<br />';
Which looks like this
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FM0sIbvV.png&hash=738332ddbf976015bba105866950c23865d63ab4)
try changing it to:
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
{
echo'
', $context['user']['unread_messages'], ' <a href="', $scripturl, '?action=pm"> ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '</a>.<br />';
}
Thats just changed it to "0 are new."
try
// Only tell them about their messages if they can read their messages!
if ($context['allow_pm'])
{
echo'
', $context['user']['unread_messages'], ' <a href="', $scripturl, '?action=pm"> ', $context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1'] , '</a> ', $txt['message_lowercase'], '.<br />';
}
you will also need to change some wording in if memory is correct index.english.php
Current I've got 0 new messages, but when i get a PM it says 1 new messages how can I get it to show 1 new message but then 2 new messages?