vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Improved PM Popup JavaScript (https://vborg.vbsupport.ru/showthread.php?t=34356)

Lionel 01-24-2002 12:13 AM

on the forum index page but I have to wait for one to test it on site index page, cause when I log in it takes me straight into forum index. Usually they popup when I get on site.

Lionel 01-24-2002 12:13 AM

thanks for help

Ninth Dimension 01-24-2002 12:35 AM

Ah good, an update, i'll be sure to change that :)

Ninth Dimension 01-24-2002 12:45 AM

Hi, eeerrrmmm, i'm not getting any pop-ups, come to think of it, I did not get any before either, any ideas?

Ninth Dimension 01-24-2002 12:48 AM

I've just checked, and the script is being called into the page when I get a new message, but it's not doing anything, here is the script:
Code:

<!-- BEGIN TEMPLATE: head_newpm -->
<script language="JavaScript">
<!--
function confirm_newpm() {
        input_box = confirm("<!-- BEGIN TEMPLATE: pm_popup -->
You have a new private message from ofDan entitled \"Re: test.\"\nClick OK to view it, or cancel to hide this prompt.
<!-- END TEMPLATE: pm_popup -->");
        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('<!-- BEGIN TEMPLATE: pm_popup_url -->
private.php?action=show&privatemessageid=674
<!-- END TEMPLATE: pm_popup_url -->','pmnew','width=600,height=500,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50');
                } else {
                        window.location = "<!-- BEGIN TEMPLATE: pm_popup_url -->
private.php?action=show&privatemessageid=674
<!-- END TEMPLATE: pm_popup_url -->";
                }
        } else {
        // Output when Cancel is clicked
        }
}
-->
</script>

<!-- END TEMPLATE: head_newpm -->


Ninth Dimension 01-24-2002 12:51 AM

I just saw a problem, I had my template tags turned on, which I believed might have been the cause of the problem, so I tuned them off, and it's still not working
Code:

<script language="JavaScript">
<!--
function confirm_newpm() {
        input_box = confirm("You have a new private message from ofDan entitled \"Re: test.\"\nClick 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?action=show&privatemessageid=676','pmnew','width=600,height=500,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50');
                } else {
                        window.location = "private.php?action=show&privatemessageid=676";
                }
        } else {
        // Output when Cancel is clicked
        }
}
-->
</script>


squawell 01-24-2002 01:12 AM

Quote:

Originally posted by TWTCommish

Any progress? I'd be glad to help if I can. Are you sure you've tried it with any new PMs? Sometimes the vBulletin PM popups don't popup, for no apparent reason. You might want to try it more than once.

it have the popup window but still the old one!! :dead:

now i change the head_pm template like ur first post say

but no popup window??any idea??

Lionel 01-24-2002 01:16 AM

go back to the first post for the fix (new template)

Lionel 01-24-2002 01:19 AM

If I get more than one PM, the popup says you have an email from (blank) entitled (blank) but that is not the problem... It gets confused an open me a page that says the message cannot be found... maybe we should redirect to PM box?

TWTCommish 01-24-2002 01:30 AM

Are you sure? You have more than one new PM, and yet it only acts as if there's one? Keep in mind that if you have 2 new PMs and get a popup, and then send yourself another, the popup will only "see" one. That's the way the system works.

Daniel: that looks like it should work. Does your <body> tag on that same page at the same time have an onload="" attribute calling the confirm_newpm() function?

squawell: as Lionel said, please replace your head_newpm template with the one now listed in the first post of this thread. :)


All times are GMT. The time now is 07:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01133 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete