MyBB Community Forums

Full Version: POPUP on NEW PM
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have heavily integrated MyBB +CMS etc....so I have also modified index-page. I would like to have the POPUP for new PM to show up onload of this index-page already instead of having people to have to go to the forums to see it....how to go about it??

cheers,
Kimmo
surely this is not that difficult? What code should I include on my custom indexpage?
Well, if you've Integrated it properly you could use the same code as McDC++ is using.
global $loadpmpopup;
	if($loadpmpopup)
	{
		if(substr($_SERVER['PHP_SELF'], -strlen("private.php")) != "private.php")
		{
			$contents = str_replace("<body", "<body onload=\"Javascript:newPM()\"", $contents);
		}
	}
newPM is in the general.js.