No clicking sound.. Great!!.. You have to wait on the cookie to clear to be shown as logged out of the chat. I found an alternative and that was to add a popup on exit to the frameset. Then I created another php file I named chat_logout.php ..
The frameset looks like this:
<html>
<head>
<title>Site Title.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function leave() {
window.open('http://www.Your-Site.com/chat_logout.php','','toolbar=no,menubar=no,locatio n=no,height=204,width=700');
}
// End -->
</SCRIPT>
</head>
<frameset onUnload="leave()" rows="1,*" frameborder="NO" border="0" framespacing="0">
<frame name="topFrame" scrolling="NO" noresize src="mainchat_top.php" >
<frame name="mainFrame" src="main_chat.php">
</frameset>
<noframes><body bgcolor="#FFFFFF" text="#000000">
</body></noframes>
</html>
The new php file looks like this:
<?php
require("global.php");
if( $bbuserid ) {
$DB_site->query("UPDATE user SET inchat='0' WHERE userid='$bbuserinfo[userid]'");
$DB_site->query("UPDATE user SET lastchatactivity=$ourtimenow WHERE userid='$bbuserinfo[userid]'");
} else {
} // end if
?>
<head>
<title>Chat Log-Out</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<BODY onLoad="setTimeout(window.close, 5000)"
</body>
</html>
The chat_logout.php is the pop up. The settings above are for 5 seconds. You can customize the body of the pop up to look like you want.. I made mine match my vb and it basically says that you have succesfully logged out of chat. The pop up above is blank. This logs you straight out of the chat with no waiting on cookies and will do me till I see a better solution.
|