![]() |
Can you post that block of code you have (the code around it, too) in global.php? If you don't want to, that's okay...just wanna help. :) You're right, it is a simple hack, by most hack standards.
|
Quote:
|
$newpmmsg=0;
$headnewpm=''; if ($checknewpm and $bbuserinfo['userid']!=0 and $bbuserinfo['pmpopup']==2) { if ($noshutdownfunc) { $DB_site->query("UPDATE user SET pmpopup=1 WHERE userid=$bbuserinfo[userid]"); } else { $shutdownqueries[]="UPDATE LOW_PRIORITY user SET pmpopup=1 WHERE userid=$bbuserinfo[userid]"; } $newpmmsg=1; $latest_pm = $DB_site->query("SELECT p.privatemessageid AS pm_popup_id, p.title AS pm_popup_title, u.username AS pm_popup_username FROM privatemessage p, user u WHERE messageread = 0 AND touserid = $bbuserinfo[userid] AND p.fromuserid = u.userid ORDER BY dateline DESC"); $hack_pm_total = $DB_site->num_rows($latest_pm); if ($hack_pm_total > 1) { eval("\$pm_popup_text = \"".gettemplate('pm_popup_multiple')."\";"); eval("\$pm_popup_url = \"".gettemplate('pm_popup_url_multiple')."\";") ; } else { extract($DB_site->fetch_array($latest_pm)); eval("\$pm_popup_text = \"".gettemplate('pm_popup')."\";"); eval("\$pm_popup_url = \"".gettemplate('pm_popup_url')."\";"); } eval("\$headnewpm = \"".gettemplate('head_newpm')."\";"); } |
You should use the code tags next time -- the lack of formatting really hurts the legibility. :)
Anyway, the code looks good. Are you positive the templates are right? Do you get any JS errors? What I did to debug this the first time around was, if it didn't show up, I'd check the HTML on the page to see if the JS was actually there or not. If it's not, that means it hasn't detected a new PM at all. You might need to try it more than once to make sure it's not just a fluke, as it is now and then with vB's JS popup, it seems. |
no errors. It pops up normal like before. But does not tell me the details
|
Oh! I'm so very, very stupid. I forget the template change. Go back to the first post...I'll edit it as soon as I post this to include the last change needed.
|
I put the new part in head_pm. Should I remove old? cause I just got one with no details.
|
Yes, you're replacing your entire head_newpm template. That should do the trick.
|
ok, I just did and awaiting for nex pm... i'll let you know... thanks..
|
Well, if you want to know sooner, you can just send one to yourself. :) How do you think I tested it? I sure as heck didn't wait for someone to send me one each time. :D Anyway, I hope you like it.
|
All times are GMT. The time now is 06:17 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|