The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
On my homepage I have it display how many new private messages there are and how many total private messages they have. It works perfectly and displays the proper information. However, if you have pop-up notification turned on and then you visit the message board, there is no pop-up to notify you of the new private messages. I have included a few files such as global.php and wonder if the code for determining if it should pop-up or not is in one of those files.
Anyone know how I can get the pop-up to display on my homepage if the user has pop-ups turned on? Which files I need to include and the code. Thanks. |
#2
|
|||
|
|||
![]()
So far i have this:
Code:
chdir("./forums/"); require_once("./global.php"); chdir("../"); if (($bbuserinfo['pmpopup']) && ($bbuserinfo['pmunread'] > 0)) { echo "<script type=\"text/javascript\">"; echo " confirm(\"You have a new PM from $newpm[username] ... it's called $newpm[title]\");"; echo "</script>"; } |
#3
|
|||
|
|||
![]()
Well I have it down to this now. I found the variables are all in global.php.
Code:
if ($shownewpm && $bbuserinfo['userid'] == 1) { $pmpopupurl = "http://www.veteransresources.org/forums/private.php?$session[sessionurl_js]do=showpm&pmid=$newpm[pmid]"; echo " <script type=\"text/javascript\">\n"; echo " <!--\n"; echo " // script to show new private message popup\n\n"; echo " if (confirm(\"You have a new private message.\n\nSender: $newpm[username]\nTitle: '$newpm[title]'\n\nClick OK to view it, or cancel to hide this prompt.\"))\n"; echo " {\n"; echo " // Output when OK is clicked\n"; echo " if (confirm(\"Open the message in a new window?\n\n(Press cancel to open in the current window.)\"))\n"; echo " {\n"; echo " var winobj = window.open(\"$pmpopupurl\", \"pmnew\", \"menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50\");\n"; echo " if (winobj == null)\n"; echo " {\n"; echo " alert(\"Unable to open a new browser window,\n This might be due to a 'popup blocker'\");\n"; echo " }\n"; echo " }\n"; echo " else\n"; echo " {\n"; echo " window.location = \"$pmpopupurl\";\n"; echo " }\n"; echo " }\n\n"; echo " // end pm popup script\n"; echo " //-->\n"; echo " </script>\n"; } |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|