Jump to the post that solved this thread.
Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 10 Years, 1 Month, 2 Weeks ago Show more MP in than one global alert ..?
#1
Solved: 10 Years, 1 Month, 2 Weeks ago
Well I want to show more than one MP warning that just below the header .. As I leave this guide.

[Image: 550373-108201253622pm.png]

But it appears more of a bar if more MP.

I leave also modify the code in the file global.php still not working.

	$query = $db->query("
		SELECT pm.subject, pm.pmid, fu.username AS fromusername, fu.uid AS fromuid
		FROM ".TABLE_PREFIX."privatemessages pm
		LEFT JOIN ".TABLE_PREFIX."users fu ON (fu.uid=pm.fromid)
		WHERE pm.folder='1' AND pm.uid='{$mybb->user['uid']}' AND pm.status='0'
		ORDER BY pm.dateline DESC
		LIMIT 0,5
	");
	
	while($pm = $db->fetch_array($query))
	{
		$pm['subject'] = $parser->parse_badwords($pm['subject']);
	
		if($pm['fromuid'] == 0)
		{
			$pm['fromusername'] = $lang->mybb_engine;
			$user_text = $pm['fromusername'];
		}
		else
		{
			$user_text = build_profile_link($pm['fromusername'], $pm['fromuid']);
		}

		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")."\";");
	}

What can I do?
#2
Solved: 10 Years, 1 Month, 2 Weeks ago
What do you want to do?
#3
Solved: 10 Years, 1 Month, 2 Weeks ago
Hay says .. show more of a bar with the MP, ie not just one show, I put a limit of 5, but it does not work.
#4
Solved: 10 Years, 1 Month, 2 Weeks ago
So you want more than one notification bar?
#5
Solved: 10 Years, 1 Month, 2 Weeks ago
This:
eval("\$pm_notice = \"".$templates->get("global_pm_alert")."\";");

$pm_notice is being defined each time, it should be:
eval("\$pm_notice .= \"".$templates->get("global_pm_alert")."\";");

You will need to modify more that the LIMIT line to get this working smoothly.
#6
Solved: 10 Years, 1 Month, 2 Weeks ago
Thanks Omar G. Big Grin
Thought they already inside while kept repeating variables and assigned well.
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)