PM Popup won't show
#1
Hi,

I've been trying to solve why my board won't show a popup box when a new PM is received.

Javascript:
	newPM: function()
	{
		confirmReturn = confirm(newpm_prompt);
		if(confirmReturn == true) {
			settings="toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=500";
			NewWindow=window.open('private.php','pmPopup',settings);
		}
	},

class_sessions.php
		// Check if this user has a new private message.
		if($mybb->user['pmpopup'] == "new" && $mybb->settings['enablepms'] != "no")
		{
			$popupadd = ", pmpopup='yes'";
			$loadpmpopup = 1;
		}
		else
		{
			$popupadd = '';
			$loadpmpopup = 0;
		}

functions.php
	if($loadpmpopup)
	{
		if(my_substr($_SERVER['PHP_SELF'], -strlen("private.php")) != "private.php")
		{
			$contents = str_replace("<body", "<body onload=\"MyBB.newPM()\"", $contents);
		}
	}

How do I get the popup box to show up?
#2
this may sound basic but does your browser have a pop up blocker ?
#3
talisman Wrote:this may sound basic but does your browser have a pop up blocker ?

Yes, but Firefox usually tells me when a popup has been blocked, and in this case it isn't doing so.

Also, no users on the board can see these popups.
#4
Javascript enabled? Try clearing your cache?
#5
Tikitiki Wrote:Javascript enabled? Try clearing your cache?

I've cleared my Cache.

This appears when I view the source when viewing the forum index, but still no popup. Javascript is enabled in the browser.

<script type="text/javascript" src="jscripts/general.js?ver=121"></script>
<script language="Javascript" type="text/javascript">
<!--
	var cookieDomain = "";
	var cookiePath = "/";
	var newpm_prompt = "You have received a new private message. Click OK to view it, or Cancel to hide this prompt.";
	var deleteevent_confirm = "Are you sure you want to delete this event?";
	var removeattach_confirm = "Are you sure you want to remove the selected attachment from this post?";
	var loading_text = 'Loading. <br />Please Wait..';
	var saving_changes = 'Saving changes..';
// -->
</script>
#6
This might sound like a dumb question, but I just need to clarify this. Is UCP > Edit Options > 'Alert me with a popup box when I receive a Private Message.' checked?

If yes and it still doesn't work, may we have a link to your board?
[Need Smilies? Get Me Smileys!
#7
Christian Wrote:This might sound like a dumb question, but I just need to clarify this. Is UCP > Edit Options > 'Alert me with a popup box when I receive a Private Message.' checked?

If yes and it still doesn't work, may we have a link to your board?

That is indeed, checked.

http://www.bullrage.com/bb/
#8
This thread is over 1 year old! It may walk now by itself!!!:-p
#9
arashpour Wrote:This thread is over 1 year old! It may walk now by itself!!!:-p
No it isn't... December 7, 2006 was just two days ago.
jsoltesz.com - MyBB lead designer & team member since 2006
#10
arashpour Wrote:This thread is over 1 year old! It may walk now by itself!!!:-p

wth arashpour is going crazy..


Paul124897, are you getting any javascript errors? If you are using Firefox it's under Tools -> Error console.


Forum Jump:


Users browsing this thread: 1 Guest(s)