 |
 |
 |
 |
#234891 - 02/01/03 11:50 PM
[6.2] Private Message Popup/Audio Notification 2.2
|
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Add to del.icio.us
Digg it
|
Mod Name / Version - Private Message Pop Up Notification 2.2 <br /> Version 2.2 fixes an issue with the popup script not displaying on some servers. <br /> <br /> Description - This pops up a little window when there are new Private Messages Waiting. The window tells how many messages, and gives a link to check them. The window will refresh periodically and update the total number of messages, and close when there are no more new messages to read. There is also an option to have an audio alert (with or without the popup window) when you have new private messages. Users can specify which option, or none or both in their profiles. <br /> <br /> Pre-requisites - none <br /> <br /> Author - JoshPet <br /> <br /> Credits - Definately couldn't have done this without help from JustDave and Gardener - Thanks Guys! Thanks to Chaos for helping to track down bugs and errors in my instructions for 6.2. <img src="/threads/php/images/graemlins/smile.gif" alt="" /> <br /> <br /> Files Altered - ubbt.inc.php, editbasic.php, changebasic.php, <br />/templates/default/editbasic.tmpl, /templates/default/ubbt_registerednav.tmpl, <br />/languages/english/online.php, /languages/english/generic.php, <br />/languages/english/editbasic.php <br /> <br /> Database Altered - Yes - 2 fields (U_PrivatePopup & U_PrivateAlert) are added to allow users the option to choose or disable either option <br /> <br /> New Files - messagepopup.php <br /> <br /> Any other info - I was pretty proud of myself for pulling this one off. <img src="/threads/php/images/graemlins/wink.gif" alt="" /> LOL <br /> <br /> Screenshot - Here is what the popup window looks like. I made it bright yellow, with red text (not stylesheet dependent) so that it will stand out. It inserts the name of the site (from config file), user's name, number of messages and link back to check private messages. Clicking the link or the flashing envelope icon will open the list of received messages back in the original threads window. <br />[]http://www.threadsdev.com/threads/php/uploads/59752-popupwindow.gif[/] <br /> <br />I also have included this sound file in the zip, but you can substitute any .wav file. I found a great source for "you have mail" type sound files at http://newmail.monsterserve.com <br /> <br />NOTE: Audio alert may not work in all browsers. <img src="/threads/php/images/graemlins/wink.gif" alt="" /> <br />
Attachments
67205-PrivateMessagePopUp2.2.zip (126 downloads)
Edited by JoshPet (08/14/03 12:51 AM)
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#234894 - 02/02/03 12:21 PM
Re: [6.2] Private Message Popup/Audio Notification 2.1
[Re: Daine]
|
Code Monkey
Registered: 11/15/02
Posts: 576
Loc: Great Northwest
|
nope still getting the same error <br /> <br />per your suggestion <br /> // ----------------------------------------------------------------- <br /> // We are automatically adding StyleSheet, Status, Privates and <br /> // FrontPage and Number to each SQL call because this information is needed by <br /> // every script that makes a call to authenticate <br /> else { <br /> if ($Query) { $Query .=","; } <br /> $Query .= "U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_PrivatePopup, U_PrivateAlert"; <br /> } <br />
Edited by JoshPet (02/02/03 01:44 PM)
_________________________
ChAoS Emerald Forest Gaming Servers Official STFU Thread
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#234896 - 02/02/03 01:04 PM
Re: [6.2] Private Message Popup/Audio Notification 2.1
[Re: Daine]
|
Code Monkey
Registered: 11/15/02
Posts: 576
Loc: Great Northwest
|
lines 1755-1790 <br /> // ----------------------------------------------------------------- <br /> // We are automatically adding StyleSheet, Status, Privates and <br /> // FrontPage and Number to each SQL call because this information is needed by <br /> // every script that makes a call to authenticate <br /> else { <br /> if ($Query) { $Query .=","; } <br /> $Query .= "U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_PrivatePopup, U_PrivateAlert"; <br /> } <br /> <br /> $Uid = addslashes(${$config['cookieprefix']."w3t_myid"}); <br /> <br /> $query = "SELECT $Query FROM {$config['tbprefix']}Users WHERE U_Number = '$Uid'"; <br /> $sth = $dbh -> do_query($query); <br /> $thisuser = $dbh -> fetch_array($sth); <br /> $dbh -> finish_sth($query); <br /> if ( ($thisuser['U_SessionId']) && ($thisuser['U_SessionId'] == ${$config['cookieprefix']."w3t_mysess"}) ) { <br /> return $thisuser; <br /> } elseif (${$config['cookieprefix']."w3t_key"} == md5("{$thisuser['U_Number']}{$thisuser['U_Password']}")) { <br /> srand((double)microtime()*1000000); <br /> $newsessionid = md5(rand(0,32767)); <br /> $newsessionid_q = addslashes($newsessionid); <br /> $query = " <br /> UPDATE {$config['tbprefix']}Users <br /> SET U_SessionId = '$newsessionid_q' <br /> WHERE U_Number = $Uid <br /> "; <br /> $dbh -> do_query($query); <br /> if ($config['tracking'] == "sessions") { <br /> session_register("{$config['cookieprefix']}w3t_mysess"); <br /> ${$config['cookieprefix']."w3t_mysess"} = $newsessionid; <br /> } <br /> else { <br /> setcookie("{$config['cookieprefix']}w3t_mysess","$newsessionid","0","{$config['cookiepath']}"); <br /> } <br /> return $thisuser; <br /> } <br /> <br />Thanks Josh-
Edited by JoshPet (02/02/03 01:44 PM)
_________________________
ChAoS Emerald Forest Gaming Servers Official STFU Thread
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#234898 - 02/02/03 01:35 PM
Re: [6.2] Private Message Popup/Audio Notification 2.1
[Re: Daine]
|
Code Monkey
Registered: 11/15/02
Posts: 576
Loc: Great Northwest
|
That solve the first problem now I am getting this <br /> <br /> <br />Parse error: parse error, unexpected T_STRING, expecting ',' or ')' in c:\wwwroot\ubbthreads\editbasic.php on line 74 <br /> <br />Lines 61-80 <br />// ---------------------------------------- <br />// Get the current profile for this username <br /> $Username_q = addslashes($Username); <br /> $query = " <br /> SELECT U_LoginName,U_Password,U_Email,U_Fakeemail,U_Name,U_Signature, <br /> U_Homepage,U_Occupation,U_Hobbies,U_Location,U_Bio,U_TextCols, <br />U_TextRows,U_Extra1,U_Extra2,U_Extra3,U_Extra4,U_Extra5,U_Picture, <br />U_Visible,U_AcceptPriv,U_OnlineFormat,U_PrivatePopup,U_PrivateAlert <br /> FROM {$config['tbprefix']}Users <br /> WHERE U_Username = '$Username_q' <br /> "; <br /> $sth = $dbh -> do_query($query); <br /> <br /> <br />// -------------------------------- <br />// Make sure we found this Username <br /> list($LoginName,$ChosenPassword,$Email,$Fakeemail,$Name,$Signature, <br />$Homepage,$Occupation,$Hobbies,$Location,$Bio,$TextCols, <br />$TextRows,$ICQ,$Extra2,$Extra3,$Extra4,$Extra5,$Picture, <br />$Visible,$AcceptPriv, $OnlineFormat,t,$PrivatePopup, $PrivateAlert) = <br />$dbh -> fetch_array($sth); <br /> $dbh -> finish_sth($sth); <br /> <br /> <br /> if (!$ChosenPassword){ <br /> $html -> not_right("{$ubbt_lang['NO_PROF']} '$Username'",$Cat); <br /> } <br />
Edited by JoshPet (02/02/03 01:47 PM)
_________________________
ChAoS Emerald Forest Gaming Servers Official STFU Thread
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|