Okay i been trying out some of the different Live Chat module created for PHPNuke and the HTML based ones run pretty bad and the refresh thing is irritating.. Anyways to my point.. i started searching for some other ones made out of PHP and FLash and tried a couple and i found a Flash one that works good and easy to install.. ZZ:FlashChat 2.2 you can check out a working demo there..
i would like to make this index.php into a block as wondering if it could be done?? here is the code.
Code:
<?
header("Expires: ".gmdate("D, d M Y H:i:s")."GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
include('./inc/inc.config.php'); # Read Configuration-Data
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
$sql = "SELECT status FROM $userdat WHERE user='admin'";
$result = mysql_query($sql, $db);
$row = mysql_fetch_array($result, MYSQL_NUM);
if ($row[0] == '0') { # -- if chat is open
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
include('./inc/func.user.php'); # Get User-Management-Function
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
$sql = 'SELECT * FROM '.$userdat.' WHERE user!=\'admin\' and status=\'0\''; # -- get user currently online
$result = mysql_query($sql, $db);
$number = mysql_num_rows($result);
$number = "There are $number persons in the chat at the moment:";
$link = '<a href="#" onClick="openchat();">[ open ZZ:FlashChat ]</a>';
} else { #- if chat is closed
$number = 'The chat is closed at the moment !';
}
@mysql_close($db);
} else {
$number = '<b>MySQL Connection failed !</b><br>
One of the following variables $server, $user or $password in the config file <br>is incorrect for your connection !';
}# END IF CONNECT
} else {
$number = 'The Variable $server, $user or $password was NOT specified in the config file !';
}# END IF SERVER + USER + PASSWORD
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ZZ:FlashChat - Start</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="author" content="download.zehnet.de">
<meta name="description" content="ZZ:FlashChat is a simple MySQL-based Chat Program with Flash-Interface,
No annoying page refreshes, No cookies, No applets are required ! (http://download.zehnet.de)">
<meta name="keywords" content="download.zehnet.de, Chat, Flash, PHP, MySQL, Script, Free">
<link href="inc/styles.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript"><!--
function openchat() {
window.open('login.php','chat','resizable=yes,scrollbars=no,width=650,height=500');
}
//--></SCRIPT>
</head>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum