When you enter the chat room, you can see that you have enter, it displays your guest number on the users side and in the chatroom, "02:57:14 * guest833 joins My room". But, when you type into the text box and hit enter, or click send, it does not display in the chatroom. I am, however, able to use the / parameters. I was able to switch the nick to admin, as well as identify and hash check. But, again, it won't display the text. Was wondering if I was missing something or did something wrong. TIA!
**EDIT
Ran in with debug true and when I send a message everything seems to respond alright.
- Code: Select all
handleResponse: send-ok-
sendRequest: /send Hello
***EDIT
Figured I should include my index.php for the chatroom code.
- Code: Select all
<?php
require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "TheRoom";
$params["nick"] = "Peon".rand(1,1000); // setup the intitial nickname
$params['firstisadmin'] = true;
//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = true;
$params['admins'] = array('admin' => 'password');
$params["refresh_delay"] = 2000; // 2000ms = 2s
$chat = new phpFreeChat( $params );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>phpFreeChat demo</title>
</head>
<body>
<p style="color:red;font-weight:bold;">Suffering from technical difficulties. Unable to display text, will be fixed....</p>
<?php $chat->printChat(); ?>
<div class="content">
<?php if (isset($params["isadmin"]) && $params["isadmin"]) { ?>
<p style="color:red;font-weight:bold;">Warning: because of "isadmin" parameter, everybody is admin. Please modify this script before using it on production servers !</p>
<?php } ?>
</div>
</body>
</html>