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)

Ninth Dimension 01-24-2002 01:33 AM

Quote:

Originally posted by TWTCommish
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?
No, i've attached the html as a txt file so you can see for yourself.

squawell 01-24-2002 01:40 AM

thankz all of u~~ :D

now it works~~~

TWTCommish 01-24-2002 12:54 PM

Quote:

Originally posted by danielhollands
No, i've attached the html as a txt file so you can see for yourself.
Hmmm. no onload attribute. Not that is odd...because that attribute should be there regardless of my hack if you have a new PM. Were your popups working fine before?

Ninth Dimension 01-24-2002 01:00 PM

oh yes, the pop-up was running fine before.

there is a small update to this, late last night it actually worked, completly out of a blue one of my members sent me a message, and low and behold I got it.

It was just strange that when I was testing it myself it did not work :?:

TWTCommish 01-24-2002 01:04 PM

Hmmmm. Perhaps the problem is your method of testing, then: I test it by having one window, like the Who's Online page, or the main forum page, open, and alongside it, a window to send myself a message with. The thing is that you have to close the window, or hit the back button, before it takes you back to your PM list after sending it...remember. the private.php doesn't pop those messages up. :)

Ninth Dimension 01-24-2002 01:25 PM

in that case I think you have solved the problem.

thank you very much for helping out, and for developing the hack, it's really cool :)

TWTCommish 01-24-2002 01:26 PM

If you have any problems, please let me know. And no, thank YOU for installing the hack. :) I'm just glad some people have found it to be useful.

Kumaro 01-24-2002 04:19 PM

I installed the hack and I now get this message at the top of everypage of my board.

Warning: extract() expects first argument to be an array in /usr/local/psa/home/vhosts/forums.411hype.com/httpdocs/global.php on line 274

???

Kumaro 01-24-2002 04:24 PM

sorry, got it fixed. ignore last message.

great hack

Lionel 01-24-2002 06:20 PM

I sill have a problem when receiving multiple pm. It is reading from single template (with blank name and subject) and is opening an error page about cannot find message. I checked the routine in global.php, it seems fine, exactly as posted.

Stretchr 01-24-2002 07:26 PM

Excellent hack, TWTCommish. Thank you!

TWTCommish 01-24-2002 08:46 PM

Lionel: can you PM me some of the full files and such? I'd be more than glad to go through them and try to figure things out. :)

Kumaro 01-24-2002 11:05 PM

TWTCommish, the following error occors when I am logged in. It just appears at the top of the page. when I log-out it goes away.

error: Warning: extract() expects first argument to be an array in /usr/local/psa/home/vhosts/forums.411hype.com/httpdocs/global.php on line 274

What's the problem?

TWTCommish 01-24-2002 11:10 PM

That's a very odd error. I think it implies that, for some reason, it's finding a PM without a matching username that it came from. You can email or PM me some specific code if you'd like me to try and debug it for you.

dimava 01-25-2002 07:35 PM

i'm still having problems, the box doens't popup when i get a new pm, and yes i do have it enabled in the user cp

please help

thanks,

Dimava

TWTCommish 01-25-2002 08:50 PM

A few things to check:

Make sure that, when you send the PM to yourself, you CLOSE the window before it finishes redirectin...otherwise it won't work...that's just the way the vB Popup is. Furthermore, make sure you set it up right...get rid of any unread messages and make sure it's all "clean" beforehand. It's a pain to test, but it's the only way.

dimava 01-25-2002 09:10 PM

o ok, thanks works great

Keta 02-14-2002 01:47 PM

i have double checked and trouble checked. the templated are right. the edit to global php is right but i am getting this error i attached. and nothing pops up

TWTCommish 02-14-2002 01:50 PM

Can you look at your HTML at line 88 and see what block of JS, specifically, is giving you problems? If I could take a look at the HTML output, I might be able to help.

Keta 02-14-2002 01:55 PM

this is what is around 88

<!-- BEGIN TEMPLATE: head_newpm -->
<script language="JavaScript">
<!--
function confirm_newpm() {
input_box = confirm("<!-- BEGIN TEMPLATE: pm_popup -->
You have a new private message from Keta entitled \"hjkk.\"\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?s=&action=show&privatemessageid=888
<!-- END TEMPLATE: pm_popup_url -->','pmnew','width=600,height=500,menubar=yes,scrol lbars=yes,toolbar=yes,location =yes,directories=yes,resizable=yes,top=50,left=50' );
} else {
window.location = "<!-- BEGIN TEMPLATE: pm_popup_url -->
private.php?s=&action=show&privatemessageid=888
<!-- END TEMPLATE: pm_popup_url -->";
}
} else {
// Output when Cancel is clicked
}
}
-->
</script>

<!-- END TEMPLATE: head_newpm -->
<!-- END TEMPLATE: headinclude -->
</head>
<body onload="Javascript:confirm_newpm()" background="images/apple/foot_bg.gif" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- BEGIN TEMPLATE: header -->

TWTCommish 02-14-2002 01:58 PM

I think the problem is the fact that you've chosen to add the template beginning/ending comments. Try turning them off...that might fix the problem.

Keta 02-14-2002 02:01 PM

and how do you turn that off?

edit: nvm i got it. it works! thanks !

TWTCommish 02-14-2002 02:04 PM

Under your vBulletin Options screen, click on Templates -- there's only one option, I believe, under that section. Set it to "no" instead of "yes," and you're there. :)

Kohhal 02-21-2002 07:37 PM

Just installed, took me a while to get rid of the errors but it's working now :D Cheers!

Note: I'm new to these hacks so for any other newbs : make sure when you copy text, especially javascript that each piece of code is on the correct line, otherwise you'll get all sorts of errors. Also, make sure to delete any extra lines(CRs) at the end of the .php files :)

ice!~neko 03-07-2002 06:46 PM

i dont realy have time to look through the whole thread to see if this has already been said but i'm having a problem...

everytime i add that code to the PHP file this error comes up...

Parse error: parse error in /home/virtual/site71/fst/var/www/html/forums/global.php on line 275

Fatal error: Call to undefined function: getpermissions() in /home/virtual/site71/fst/var/www/html/forums/index.php on line 10

TWTCommish 03-07-2002 06:50 PM

Can you post lines 270-280 here, then? That's a really odd error.

ice!~neko 03-07-2002 06:54 PM

its okay, i sorted it out... i think i made to many lines between the codes, to try and seperate the hack from the rest of it so i dont get confused =\

ice!~neko <--- is a newbie to vBB and hacking

TWTCommish 03-07-2002 06:59 PM

Okay then. :) I hope you like it.

Overgrow 03-10-2002 01:31 PM

Great hack.. it was an improvement over what I was doing already because it has the multiple pm option. One problem though, the query as posted runs very slow on my site (166k PMs stored). I've never understood the duplicate fields in the PM table, but changing around the WHERE clause helps alot:

PHP Code:

SELECT p.privatemessageid AS pm_popup_idp.title AS pm_popup_title
u.username AS pm_popup_username FROM privatemessage puser u 
WHERE messageread 
AND p.userid $bbuserinfo[userid] AND 
p.fromuserid u.userid ORDER BY dateline DESC 

That uses the indexed p.userid field instead of the unindexed p.touserid. It seems to work the same and is no longer a PITA query. Thanks for the hack.

TWTCommish 03-10-2002 01:38 PM

Thanks for pointing that out; I'll make the change shortly and update the instructions/file/etc. I appreciate it...and I'm honored that you'd find use for this. I'm a big admirer of your hacking, and the way you've put together your forums.

CeleronXL 05-11-2002 01:36 AM

I don't know if anyone's done this yet, but I need to keep tabs on all the hacks I install. The only directions in the directions file itself were the new templates, so I made this set of instructions that were included in the first post. If anyone else wants them to keep tabs on the whole thing, here's the entire set of instructions.

akowacko 06-06-2002 07:35 PM

i have the welcome panel hack. no i added your hack and the PM box is gone. i revert to my original files and the pm is still gone. can't see a thing. please help.

akowacko 06-06-2002 07:36 PM

i'm having trouble looking for the original head_newpm template. can someone check if this is the original one?

<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 $inboxname in the current window.)");
if (second_box==true) {
window.open('private.php?s=$session[sessionhash]','pmnew','width=600,height=500,menubar=yes,scroll bars=yes,toolbar=yes,location= yes,directories=yes,resizable=yes,top=50,left=50') ;
} else {
window.location="private.php?s=$session[sessionhash]";
}
} else {
// Output when Cancel is clicked
}
}
// -->
</script>

thanks!

TWTCommish 06-06-2002 07:51 PM

I don't think we're allowed to post entire templates.

Boofo 06-06-2002 09:56 PM

I tried installing this hack and all I could get where script errors. (Line 79). I realluy wanted it, but it doesn't look like it wants to work with my setup. If anybody has any updates that might make it work for me, I'm willing to try them. :)

TWTCommish 06-06-2002 10:08 PM

Check your vBulletin Options to make sure you do NOT have each template beginning and ending with an HTML comment. If you do, the hack won't work.

Boofo 06-06-2002 11:07 PM

I already checked that when you mentioned it in the other post. :) I reverted back to the standard popup and everything works like it should now. I'd like to get this one going if you can think of anything. :)

TWTCommish 06-06-2002 11:25 PM

Hmmm. What error do you get? I'm wondering if the title of the PM or the username of the person who sent it might be interfering...

Boofo 06-06-2002 11:42 PM

The title was Test and the name of the sender was Brandon. Normal stuff. :) It was the same kind of error that other user got at around line 88, only mine was 79. An object expected error, or something like that.

69-FLy-gUy 07-06-2002 12:57 PM

hmm. I am having a little problem.. the PM box won't Pop up....

when i view the source.. the js is there. and says the info, but it won't pop up.


All times are GMT. The time now is 08:40 PM.

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.02348 seconds
  • Memory Usage 1,820KB
  • 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
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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