As it is a beta release, I didn't wrote yet the documentation.
However, usefull parameters are :
"channels" : an array of string, one string by channel name
"isadmin" : set it to true if the connected user is an admin (you me have a authentification system to use this parameter)
Code example:
- Code: Select all
<?php
require_once dirname(__FILE__)."/trunk/src/phpfreechat.class.php";
$params = array();
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["nick"] = "guest".rand(1,100); // setup the intitial nickname
$params["channels"] = array("channel1", "channel2");
$params["isadmin"] = true;
$chat = new phpFreeChat( $params );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>phpFreeChat Sources Index</title>
<?php $chat->printJavascript(); ?>
<?php $chat->printStyle(); ?>
</head>
<body>
<?php $chat->printChat(); ?>
</body></html>
Notice: don't forget to chmod 777 data/private/ and data/public directories.
Tip: when you change something in the configuration, you need to manualy delete the data/private/cache/ directory content or type the /rehash command (but you need to be admin of the chat to run this command)
- Download it
- See the complete change log
Enjoy!