MyBB Community Forums

Full Version: Where is loadpmpopup set?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In functions.php, the following code is used to check wether to show a New PM Popup or not:

	if($loadpmpopup)
	{
		if(substr($PHP_SELF, -strlen("private.php")) != "private.php")
		{
			$contents = str_replace("<body", "<body onload=\"Javascript:newPM()\"", $contents);
		}
	}

Where is loadpmpopup set? I can't find it in the files I've checked, and I want to inform users if they have a new PM as they visit the root of my site, without having to goto the forum to check.

Any help woiuld be great Big Grin
		if($mybb->user['pmpopup'] == "new")
		{
			$popupadd = ", pmpopup='yes'";
			$loadpmpopup = 1;
		}
		else
		{
			$loadpmpopup = 0;
		}
In inc/class_session.php

You can set it there.
The code for it to popup is in general.js
I would be interested in setting this up in my template but don't know how to integrate it there...Dempsey did you manage to do it in the end and if yes, how did you exactly do it so I could perhaps replicate it...

cheers,
Kimmo