![]() |
No.
|
Well, there is one...I made it yesterday and it's not checked for absolute Cross Browser Compatibility yet. The implementation of this Hack isn't perfect yet, too...but it 's doing a fine job here on a vB 1.1.5(Hm, could be done with templates...some lines could be optimized...). This Hack doesn't only add the requested Popup - in the browser window itself, it can be moved or closed, it also changes the routine, the New PM's are counted. The problem I see here is that in the normal PM Hack they are counted based on $bblastvisit...hm, but if I read a New (yet unread) PM it will still show up as New PM in $pmloggedin...So I added an extra Field to fix this problem, it get's 1 - New PM - by default, now if you read the PM this field is set to 0 - Old PM. Now you see only unread PM's as new PM's in $pmloggedin...Because this field has 1 as default you should do a query (update privatercvd set pmnew=0 where pmnew=1) after you've installed my Hack to set all existing PM's to 0.
I've also included a new Option in the profile, so that each Member can choose if he likes to be notified by this Popup when New PM's are there. So, here are the instructions (hey, forgive me if they are not perfect;)): Insert new filed in Table privatercvd: newpm SMALLINT(1),DEAFULT(1) Insert new Filed in Table user: usepopup SMALLINT(1),DEFAULT(1) Now we gotta do some changes on the following files: private.php, member.php und index.php private.php: find: Code:
} #end show Code:
$DB_site->query("UPDATE privatercvd SET newpm=0 WHERE msgid=$msgid"); find: Code:
$newpmcounta = $DB_site->query_first("SELECT COUNT(msgid) AS msgid FROM privatercvd WHERE toid=$bbuserid AND UNIX_TIMESTAMP(datetime)>$bblastvisit"); Code:
$newpm = $DB_site->query_first("SELECT COUNT(msgid) AS msgid FROM privatercvd WHERE toid=$bbuserid AND newpm=1"); Code:
$lastuserlink = "<a href=\"private.php?action=show&msgid=$lastsent[msgid]&password=$bbpassword\">$lastuser</a>"; Code:
if ($usepopup==1 and $newpms>0) { find (will be found two times, do it for both!!!): Code:
$emailonpm=iif($emailonpm=="yes",1,0); Code:
//Popup Hack Code:
$DB_site->query("UPDATE user SET birthday='$birthday',password='".addslashes($password)."',email='".addslashes($email)."',homepage='".addslashes($homepage)."',icq='".addslashes($icq)."',aim='".addslashes($aim)."',yahoo='".addslashes($yahoo)."',biography='".addslashes($biography)."',signature='".addslashes($signature)."',adminemail=$adminemail,showemail=$showemail,invisible=$invisible,cookieuser=$cookieuser,daysprune=$prunedays,timezoneoffset=$timezoneoffset,emailnotification=$emailnotification,receivepm=$receivepm,emailonpm=$emailonpm Code:
,usepopup=$usepopup Code:
$userinfo=$DB_site->query_first("SELECT birthday,email,password,homepage,icq,aim,yahoo,biography,signature,adminemail,showemail,invisible,cookieuser,daysprune,timezoneoffset,emailnotification,receivepm,emailonpm Code:
,usepopup Code:
if ($userinfo[emailonpm]==1) { Code:
//Popup Hack Code:
$DB_site->query("INSERT INTO user (birthday,userid,username,password,email,homepage,icq,aim,yahoo,biography,signature,adminemail,showemail,invisible,usertitle,joindate,canpost,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,timezoneoffset,emailnotification,receivepm,emailonpm Code:
,usepopup Code:
('$birthday',NULL,'".addslashes($username)."','".addslashes($password)."','".addslashes($email)."','".addslashes($homepage)."','".addslashes($icq)."','".addslashes($aim)."','".addslashes($yahoo)."','".addslashes($biography)."','".addslashes($signature)."',$adminemail,$showemail,$invisible,'".addslashes($usertitle)."',".time().",1,$cookieuser,$prunedays,".time().",".time().",$newusergroupid,$timezoneoffset,$emailnotification,$receivepm,$emailonpm Code:
,$usepopup find: Code:
$newpmconut Code:
$newpms find: Code:
<TR bgcolor="#DEDEDE"> Code:
<!-- Popup Hack --> In your Head include the following script: Code:
<script language="JavaScript1.2"> And here's the pic for the close button: http://www.nt-wizards.de/close.gif |
All times are GMT. The time now is 08:33 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:
|