Posted by yowzer on August 28, 2007 at 2:28pm
Jump to:
| Project: | phpfreechat |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Apart from the default chat screen and forcing users to use their username as their chat screen name, the other settings for phpfreechat do not seem to be implemented in the chat. I have tried the theme fields as well as some of the chat window size fields with no luck. I could not find any similar issues with it.
Otherwise, it looks great!
Comments
#1
Try entering in the chat /rehash after changing the parameters in admin/phpfreechat (you will need to do it as admin and enter first the command /identify in the chat)
#2
/rehash doesn't solve this problem
Nothing is written to the phpfreechat table in the Drupal database. Related? I'm running Drupal 5.7 and phpfreechat module 5.x-1.x-rc4.
#3
More investigation... You have to clear both the phpfreechat cach and your browser's cache to see the new settings. Here's now to clear the phpfreechat cache:
http://www.phpfreechat.net/faq#how-to-rehash-the-chat
The parameters in the module don't match 100% the current version of phpFreeChat (v1.1). I thought about updating it, but I don't use any of the parameters so it's more trouble than it's worth. I did get as far as pulling them out of the code, and reformatting them so generate-form.php would work on them. But then I didn't code it.
Here are links to other fixes I posted for phpfreechat:
Database bug (fix this first - blocks bug needs it):
http://drupal.org/node/250069
Blocks bug:
http://drupal.org/node/200962
Scrolling bug in IE 7:
http://drupal.org/node/225162
#4
Being compulsive, I did update the settings to match phpfreechat v1.1 (what I'm using). Nobody is responding here so I think I'm the only one using this - I won't bother to post it. It's an easy change to make. Don't forget to update the .install file, too.
#5
permutations, thanks for all the great work on this. I'm about to try to implement this again in the next few days (probably early next week). At this point, I'm wondering how much of the module code and other stuff I need to change. I know you posted a summary of four things at http://drupal.org/node/171169. Is that everything? I wonder if there's a way to re-roll the whole thing to get an rc5...
#6
These are all the changes I've posted:
Database bug (fix this first - blocks bug needs it):
http://drupal.org/node/250069
Blocks bug:
http://drupal.org/node/200962
Scrolling bug in IE 7:
http://drupal.org/node/225162
Rooms and other default settings bug:
http://drupal.org/node/187468
I also updated the admin form to use the phpfreechat v1.1 parameters, but I didn't post it because it's a lot of code. A lot of new parameters were added in v1.1, and I added them all without evaluating how useful they were in the Drupal context. You could easily crash the chat with the wrong changes, but that's true now, too.
The parameters update involved replacing the _phpfreechat_settings() function in phpfreechat.inc, and updating the $settings array in the phpfreechat_uninstall() function in phpfreechat.install. The original uninstall function didn't delete certain Drupal-specific variables and mine doesn't (yet) either. I'm going to fix that tonight.
I wrote to the developer of the phpfreechat integration module to tell him I fixed all the bugs and ask if he could incorporate the fixes into a new download, but he didn't answer. I could post the updated code on one of my own servers. It might generate more traffic than I want, or maybe not. People haven't been responding to my posts - there doesn't seem to be much interest. I don't know why not. phpFreeChat is a way better chat their either ChatRoom or ChatBlock. The phpFreeChat download page says something about it breaking jQuery, but I've had no problems.
#8
Awesome, permuations! I've downloaded it and will install it shortly and test it out... I'll let you know how i make out. :-)
#9
What version of Drupal are you running? I have 5.7 installed, and that's all I tested it on. But from what I can tell, all of 5.x uses the same API.
#10
I'm on 5.2 right now, so hopefully there will be no issues. If there are, then of course it will be a bigger effort, especially if i have to upgrade. I'll be doing a lot of testing then. :-)
#11
I can't think of any reason why it wouldn't work on 5.2. The changes I made were all bug fixes - nothing about the Drupal version. Let me know how it goes.
#13
I have a version of the phpFreeChat module on my Web site that fixes many different bugs. I just updated it today. If owahab makes me a module maintainer here on Drupal, I'll integrate the changes here and stop posting them separately:
http://permutations.com/drupal/phpfreechat.php
owahab - please stop deleting this link. It is not helpful to the community.
#14
I just uploaded a new version (http://permutations.com/drupal/phpfreechat.php).
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).
To change the default timeout, find this variable assignment and change the 20000 to 35000:
var $timeout = 35000;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);
}
*/
#15
The latest version is now on the Drupal site, and addresses all these problems. The negative number problem is now fixed within the module - no need to edit phpFreeChat. Download the latest phpFreeChat (1.2).