This version of the phpFreeChat module for Drupal 5.x contains numerous bug fixes by permutations.
Download phpFreeChat module for Drupal 5.x (v5.x-1.3) (15/12/189/20/330) NEW (25-Dec-08)
Before installing a new version of the Drupal module for phpFreeChat, you must:
Download PurpleHeart theme for Drupal 5.x - phpFreeChat-compatible (v5.x-1.3) (309) (11-May-08)
With Internet Explorer 7, if phpFreeChat is embedded inside a table, the chat scrollbar keeps jumping up so you can't read new messages. You can use the chat only with Firefox, or you can use this theme, which uses CSS rather than tables for positioning. This clean and simple theme comes in blue or purple, displays primary links as buttons across the top, and supports all Drupal theme features and many different block areas.
Questions? Installation problems? Post them in a Drupal issue thread.
Admin panel settings stored internally as arrays did not work before. Now they do, with the exception of Proxies Cfg (a multidimensional array). The additional settings that now work are:
Probably you won't use most of these, but one in particular is handy. If you are having problems with too-aggressive noflood settings (the noflood feature was added in phpFreeChat 1.2), you can use skip_proxies to disable it. Just enter "noflood" in the admin panel skip_proxies box. If you want to also disable, for example, the feature that censors bad language, enter "censor,noflood" (no quotes). For all array fields, separate values with commas.
The other change in this version is important, but invisible. The module was saving a huge amount of user settings unnecessarily, resulting in gigantic queries that could bring down a shared server. This has been fixed.
Module works with phpFreeChat 1.2.
Negative number problem is now fixed within the Drupal module code so nothing has to be changed in phpFreeChat. (phpFreeChat 1.2 uses the correct time-out value of 35000 - see Version 5.x-1.1b notes for details on this.)
Code is formatted to according to Drupal conventions (except for the phpFreeChat customization files, which use phpFreeChat conventions).
The phpFreeChat customization files provide some additional features:
I backed out setting the default timeout to 35000 in the module. It's not working because the "negative number" error is still happening after clearing the cache (/rehash). The timeout needs to be changed to avoid disconnects, and the easiest way to do this is to change it directly in pfcglobalconfig.class.php. phpFreeChat has an integer check in there, and Drupal's form API doesn't have an integer type. I tried to identify the integer strings and change them and it worked in a test file, but not in the module.
pfcglobalconfig.class.php is in the phpFreeChat src directory (it's not a module file).
1. To change the default timeout, find this variable assignment and change the 20000 to 35000:
var $timeout = 35000;
2. To get rid of the negative number error, comment out this code in pfcglobalconfig.class.php:
/*
$numerical_positive_params = $this->_params_type["positivenumeric"];
foreach( $numerical_positive_params as $npp )
{
if (!is_int($this->$npp) || $this->$npp < 0)
$this->errors[] = _pfc("'%s' parameter must be a positive number", $npp);
}
*/
Bug in clearing the cache that caused phpFreeChat to periodically hang
Bug that caused a "negative number" error when numeric parameters were changed
Database bug: Required for blocks bug fix.
Scrolling bug in IE 7: Fix requires a compatible theme.
Rooms and other default settings bug
Admin form now includes all phpFreeChat 1.1 parameters, and all outdated 1.0 parameters were removed. I added all the 1.1 parameters without evaluating how useful they were in the Drupal context. You easily could crash the chat with the wrong settings, but that was true with the original module code, too.
The parameters update involved replacing the _phpfreechat_settings() function in phpfreechat.inc (I used generate-form.php with some changes, for this), and updating the phpfreechat_uninstall() function in phpfreechat.install. I changed how the uninstall function worked so that all the phpFreeChat variables were deleted (previously some were left).
Filename change: customize.js.php -> customize.js (located in the drupal theme directory - \phpfreechat\extras\themes\drupal)
The current version of phpFreeChat on Drupal does not contain the full set of fixes in this version. I've applied for a CVS account so I can be a co-maintainer on the project. When that's been approved and I've been able to incorporate all the fixes into the Drupal project, I will no longer maintain this separate download area.
phpFreeChat is a much better chat than either ChatRoom or ChatBlock (the two other chats for Drupal 5.x). The phpFreeChat download page says that phpFreeChat breaks jQuery, but I've had no problems.