• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Announcements
  • Change font size
  • FAQ
  • Register
  • Login

New release 1.0-beta4

Check here for the latest news of phpfreechat.

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
1 post • Page 1 of 1

Postby phpfreechat » Tue Aug 01, 2006 10:26 pm

This release adds a lock proxy which make possible to disable the chat access dynamically users to a given url and fixes aand redirect all users to a given url and fixes a lot of annoying bugs: nick and frozen_nick parameters were broken, prototype js lib dependencies have been removed because it made the chat not compatible with other js libs, and many other small problems.

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>

Tip for the new lock proxy:
Add these parameter in order to lock the proxy dynamicaly and automaticaly redirect disconected users to google :
Code: Select all
$params["islocked"] = true;
$params["lockurl"] = "http://www.google.fr"; // this will redirect users to google when the chat is locked.

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!
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Post a reply
1 post • Page 1 of 1

Return to Announcements

Who is online

Users browsing this forum: No registered users and 4 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub