MyBB Community Forums

Full Version: Change PM notification output
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

if you get a PM, you get this notification:

"You have one unread private message from {username} titled {title}";

If you get more than one PM, you get this notification:

"You have {X} unread private messages. The most recent is from {username} titled {title}";

This is the part of the code in the global.php that does this magic:
	if($mybb->user['pms_unread'] == 1)
	{
		$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, $user_text, $pm['pmid'], htmlspecialchars_uni($pm['subject']));
	}
	else
	{
		$privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], $user_text, $pm['pmid'], htmlspecialchars_uni($pm['subject']));
	}
	eval("\$pm_notice = \"".$templates->get("global_pm_alert")."\";");

I want to modify this code so that if you get more than one PM, you get this notification:

"You have {X} unread private messages.
{title} from {username}
{title} from {username}
{title} from {username}
{title} from {username}
etc.
";

Can anyone tell me how to accomplish this?
Thanks Smile
Anyone please?