php forum
php mysql forum
php mysql smarty
 
Page 1 of 4 1 2 3 4 >
Topic Options
#234891 - 02/01/03 11:50 PM [6.2] Private Message Popup/Audio Notification 2.2
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC

   [6.2] Private Message Popup/Audio Notification 2.2 to Del.icio.us Add to del.icio.us
  Digg [6.2] Private Message Popup/Audio Notification 2.2 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)
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234892 - 02/02/03 06:50 AM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
Josh after installing this (I checked it twice so I think I have done it correctly) I get this<br /><br />Parse error: parse error, unexpected T_ELSE in c:\wwwroot\ubbthreads\ubbt.inc.php on line 1759<br /><br />Fatal error: Call to undefined function: getmicrotime() in C:\wwwroot\ubbthreads\main.inc.php on line 16<br />
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#234893 - 02/02/03 11:47 AM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
OK - think I got a little happy with Cut and Paste. <img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />Look for the line in ubbt.inc.php that starts like this:<br /><br />    if ($Query) { $Query .=","; }<br />    $Query .= "U_Username,U_Password,U_SessionId, .....<br /><br /><br />Below it, add:<br /><br />    }<br /><br />That should fix it.<br /><br />I'll update my instructions and zip. <img src="/forum/images/graemlins/wink.gif" alt="" /> Thanks.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234894 - 02/02/03 12:21 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
ChAoS_dup1 Offline
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
#234895 - 02/02/03 12:59 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
What's around your line 1759 where it seems to be having trouble?
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234896 - 02/02/03 01:04 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
ChAoS_dup1 Offline
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
#234897 - 02/02/03 01:16 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Doah... I don't know what happened to my copy paste at that part of the instructions.... must have hit or pasted the wrong thing.<br /><br />At the very top....<br /><br />where it says "else {"<br />That line should be unchanged from the original... we are only changing the query line.<br /><br />So change the else { line to this:<br /><br /> if ($Query != "*") {<br /><br /><br />Sorry for the trouble. I am fixing my zip. <img src="/forum/images/graemlins/tongue.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234898 - 02/02/03 01:35 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
ChAoS_dup1 Offline
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
#234899 - 02/02/03 01:48 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
OK I see the problem <br /> <br />Find this: <br /> <br />$OnlineFormat,t,$PrivatePopup,$PrivateAlert) <br /> <br />Remove that stray "t" like this: <br /> <br />$OnlineFormat,$PrivatePopup,$PrivateAlert) <br /> <br />Sorry you've had so much trouble. Guess it was too late when I pulled together my instructions. Or they were messed up from before. I had posted this under 6.1 but just got around to updating it (at my user's request) last night. <img src="/forum/images/graemlins/tongue.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234900 - 02/02/03 01:52 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
This might be a good basis to use as a start onto an instant message hack where this window would pop up with the message you send them from a list of choosable users online at that moment.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#234901 - 02/02/03 01:59 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
<br />Ok we are one step closer to the promised land. <br />The pop up window now comes up but I am getting a server 500 error within it <br />And I was up pretty late too as you can see by my 4:50 am post and my uhh..other posts on the forum <img src="/forum/images/graemlins/crazy.gif" alt="" /> <br /> <br />*edit-my badd...the privatemessage.php and the sound file got extracted with its dir folder instead of directly to my UBBThreads directory.-told ya I was up late <img src="/forum/images/graemlins/tongue.gif" alt="" />* <br /> <br />Thanks Josh


Edited by ChAoS (02/02/03 02:06 PM)
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#234902 - 02/02/03 02:03 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I'm not sure about a server 500 error.<br />Anyone know what kind of error that is? <img src="/forum/images/graemlins/tongue.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234903 - 02/02/03 02:07 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
^see above edit^
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#234904 - 02/02/03 02:10 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Cool! <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234905 - 02/02/03 02:28 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
Josh does this function check for Private Message automatically or does it rely on me refreshing the page I am viewing? I dont seem to be getting notification until I refresh and it sees the flashing envelope icon <br /> <br />Also when hovering above the flashing envelope in the pop up box the numerical value is missing for amount of posts <br />"You have _ new message(s)


Edited by ChAoS (02/02/03 02:31 PM)
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#234906 - 02/02/03 02:31 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Yeah, it works the same as the flashing envelope icon... threads doesn't check for new PMs until you refresh the page.<br /><br />The popup will keep refreshing and close itself when there are no PMs left.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234907 - 02/02/03 02:34 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Doah... this one was just all dusty. <img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />In the messagepopup.php file.....<br /><br />Look for this:<br /><br />alt=\"{$ubbt_lang['WEL_PRIV2']} $Privates {$ubbt_lang['WEL_PRIV3']}\" <br /><br /><br />Change $Privates to $Messages<br /><br /><img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />I'll update the zip.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234908 - 02/02/03 02:36 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Updated the zip with what *should* be the last of the tweaks and fixes.<br /><br />Added Chaos to the Credits list for tracking down all the bugs and errors in the directions. Hadn't fooled with this mod since 6.1 so I guess it was dusty. <img src="/forum/images/graemlins/tongue.gif" alt="" /><br /><br />Thanks Chaos. <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#234909 - 02/02/03 02:36 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: Daine]
ChAoS_dup1 Offline
Code Monkey

Registered: 11/15/02
Posts: 576
Loc: Great Northwest
LOL great work..I hope ya dont mind me keeping ya jumping this afternoon <br />and believe me if there is a bug I am usually apt to find it lol
_________________________
ChAoS
Emerald Forest Gaming Servers
Official STFU Thread


Top
#234910 - 02/02/03 02:37 PM Re: [6.2] Private Message Popup/Audio Notification 2.1 [Re: barbiro]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
No better to track it down early.... blaze the trail. Now everyone else can try, now that you've found all the bugs. <img src="/forum/images/graemlins/smile.gif" alt="" /> <br /><br />It's safe now. LOL
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
Page 1 of 4 1 2 3 4 >


Who's Online
0 Registered (), 39 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Blogs, love em or hate em?
by Ian_W
Yesterday at 03:47 PM
What do you use to edit the files
by Ian_W
Yesterday at 03:33 PM
BeyondCompare v3.00
by Ian_W
Yesterday at 03:32 PM
Glossy Black Theme with Image Reflection
by Gizmo
Yesterday at 02:17 PM
ShareThis
by Gizmo
09/28/08 05:06 AM
[7.3] Viewing MySQL logfiles made easier
by AllenAyres
09/27/08 09:57 PM
Looking for a simple upload script
by Murphdog
09/26/08 08:45 PM
New Mods
[7.3] Viewing MySQL logfiles made easier
by blaaskaak
09/24/08 05:39 PM
[7.3] Language file checker
by blaaskaak
09/09/08 12:56 AM
[7.3.1] add search to showmembers page
by blaaskaak
09/07/08 04:50 AM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
ghengis317, NitroX, Dogan, EliYah-, W-D
13344 Registered Users