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)
"admins" : this is a list of key/value where key is the nickname and value is the password, then login as a listed nickname and type the /identify password to get admin rights
"proxys_cfg" -> "censor" : this is the bad words list, you can modify it (see the example bellow)
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; // uncomment this line to give admin rights to everyones
 $params["admins"] = array("toto" => "mypassword"); // login as toto and type /identify mypassword to get the admin rights
 $params["proxys_cfg"]["censor"]["words"] = array("fuck","sex","bitch"); // this is the list of words to banish
 $params["proxys_cfg"]["censor"]["replaceby"] = "*"; // this is the charactere to use when a censored word is found
 $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!

