Log in

View Full Version : pm pop-up?


Dribbles
06-01-2003, 05:32 AM
any help? was told that this was the place to post this:

http://www.vbulletin.com/forum/showthread.php?threadid=72436

Erwin
06-01-2003, 05:56 AM
What's the question? PM pop-up not working is not enough information to help you. What hacks have you installed?

Dribbles
06-01-2003, 08:09 AM
I have a lot of hacks installed. The hacks I have installed that have to do with PM's are: Firefly's Blink PM, Improved PM folder View, and the mass pm hack. I had all these installed on my old forum too without this pop-up problem. But then I upgraded to v2.3.0 and re-applied the hacks to the v2.3.0 php files. I'm pretty sure the problem is not template related because I used a pretty standard skin, just making some color changes as an alternative, and I have the same problem with that skin.

Whenever I don't have a PM, the page loads normally. But when I have a new PM, at the bottom of the page, it says something like "page loaded, but with errors" I think the little yellow triangle is a javascript error?

Erwin
06-01-2003, 09:31 AM
There you go, you have a javascript error.

Check this in order:

1) Make sure $headnewpm is in your header template.
If so,

2) Check your header and headinclude templates, and compare them with the default templates, and ensure there are NO NEW javascript codes at the top that may be interfering with the popup PM javascript.

3) Try this - save your header and headinclude templates, then revert them to default, and see if PM popup works - if so, it's one of those templates having some new javascript that is interfering with the pm popup javascript.

Dribbles
06-01-2003, 10:19 AM
Thanks for the help. $headnewpm Is not in the header template for me ... but it is all the way at the bottom of my headinclude template.

I believe the problem may be with one of the .php files as opposed to one of the templates. Is this possible? I see no java in the header or headinclude templates. But then again, I'm a newbie, lol :hurt:

Reverted and no change :(

WEForums
06-01-2003, 11:19 AM
I have the same problem.

When I fix it I'll post it. Right now I am too lazy to mess with the JavaScript...

Hmmm...looking at it now, the default for 'header' doesn't even include '$headnewpm'....?

EDIT: Nevermind, it isn't supposed to be.

I am not going to bother since the JavaScript interfering is for banners/pop-up ads.

Dribbles
06-01-2003, 10:54 PM
Any idea if anything is wrong with any of these javascripts? These are the scripts on my index.php (I sent myself a new Pm so I get the javascript error message, then pressed "view source", then looked for scripts.

<script language="JavaScript">
<!--
function confirm_newpm() {
input_box=confirm("You have a new private message. Click OK to view it, or cancel to hide this prompt.");
if (input_box==true) { // Output when OK is clicked
second_box=confirm("Open in new window?\n\n(Press cancel to open your Inbox in the current window.)");
if (second_box==true) {
window.open('private.php?s=','pmnew','width=600,he ight=500,menubar=yes,
scrollbars=yes,toolbar=yes,location=yes,directorie s=yes,resizable=yes,top=50,left=50');
} else {
window.location="private.php?s=";
}
} else {
// Output when Cancel is clicked
}
}
// -->
</script>

<body onload="java script:confirm_newpm()" bgcolor="#000000" text="#000000" id="all" leftmargin="10"
topmargin="10" marginwidth="10" marginheight="10" link="#000020" vlink="#000020" alink="#000020">

<script language="JavaScript">
<!-- Begin
pmBox.bgColor='#060B01" background="evimages/titlebg.gif';
setInterval("Timer()", 300);
x=1;
function Timer() {
set=1;
if(x==0 && set==1) {
pmBox.bgColor='#DEE3D7';
x=1;
set=0;
}
if(x==1 && set==1) {
pmBox.bgColor='#C0C0FF';
x=0;
set=0;
}
}
// End -->
</script>

Erwin
06-02-2003, 04:16 AM
Sorry, I meant headinclude. :)

Just try removing the extra JS, and see if popup works.

Dribbles
06-02-2003, 05:38 AM
I have tracked the problem down!!!! hehe. I re-uploaded an un-editted version of index.php ... nothing happened. So I uploaded the modded one again. Then I uploaded an un-editted version of functions.php ... and viola! The pop-ups have returned. Now I just have to figure out what I messed up in functions.php :)

WEForums
06-02-2003, 06:15 AM
Strange, my onLoad is the same as the default in functions.php, so I doubt it'd work for me.

Anyhow, I just got a PM at my forums and I was alerted when I viewed a profile, however, I was not when viewing a showthread, index, or forumdisplay.

Dribbles
06-02-2003, 06:49 AM
Problem solved! It was that damn microstats hack!!!

Boofo
06-02-2003, 07:05 AM
How would the microstats hack affect the java-script in any way? It doesn't even use java-script, does it?

This code could be your problem:

<body onload="java script:confirm_newpm()" bgcolor="#000000" text="#000000" id="all" leftmargin="10"
topmargin="10" marginwidth="10" marginheight="10" link="#000020" vlink="#000020" alink="#000020">

You need to take the space out of the java script and make it all one word.

Dribbles
06-02-2003, 07:08 AM
In the editting of the file functions.php, vbmicrostats v21 says to put in (among other codes):

$newtext = preg_replace("/<body/i", "<body onload=\"java script:confirm_newpm()\"", $newtext);

It was that little space between the words java and script that was causing this whole problem ... I changed it from java script to javascript and it worked. Man, was a pain in the butt for real!

Dribbles
06-02-2003, 07:09 AM
we posted at the same time, lol

Boofo
06-02-2003, 07:12 AM
Great minds think alike. ;)

WEForums
06-02-2003, 07:46 AM
My file (functions.php) has that same part with no space. However, doing a search for java down the page shows a few other parts of the script that have 'java script.' Is it supposed to ALWAYS (or nearly always) be javascript? (It would seem so but I don't want to edit it and try to find out.)

Boofo
06-02-2003, 07:52 AM
Yes, it should always be one word. Except in the 2 areas of functions.php that has it under $replacearray = array(. Then it should have the space.

msimplay
08-11-2003, 04:28 PM
curiosly the pm popup here at Vbulletin.org do not work

noppid
08-12-2003, 04:26 PM
Yesterday at 01:28 PM msimplay said this in Post #18 (https://vborg.vbsupport.ru/showthread.php?postid=425200#post425200)
curiosly the pm popup here at Vbulletin.org do not work

Always causes an error when I get a PM here at vb.org for me.

Erwin
08-13-2003, 12:17 AM
Stupid PM code... ;) It seems to cause an error for some people but not others - not for me anyway. In any case, we are not debugging it as we are going to move to vB3 once it goes RC. So we are busy trying to port hacks over for now.

Keith
01-06-2004, 04:23 AM
Just curious if any of you found out what some of the other issues might be. Been through most of the info found here and still no popups. Curiously though, I did find a load error described as an "Unterminated string constant" on Line 320, character 26, but have not had a chance to look at the file yet. It indicates it's in forums/private.php.

How would this affect someone hitting our site when visiting forums/index.php though? They get no popups. The only common factor is the global.php and admin/functions.php files. Both have been checked and re-checked. Ideas?

cbr929rrerion
02-25-2006, 02:13 AM
I am having the same problem, no pop up on new om and also no email notification.

I dont have a pop up blocker, i have it set to show pop up and email but get neither.

I have reverted the head include no luck, uploaded original functions.php no luck, and have no idea whats next..