Ok.. Ive fumbled with this module and chat script for about three weeks now. Modified all the necessary files to allow it to run. And.. Finally, It works.. with exception of the clear chat log link at the bottom of the window. Ive read, and read, and read. I have modified the index.php parameters, I tried the egglog.class.php tip here: http://www.phpfreechat.net/forum/viewtopic.php?id=2192
I have /rehashed, /cleared, dumped my browser cache, run cron, flushed site cache, logged off, drank some beer, logged back in, tried every version up to 6.xdev, and on and on... I just cant figure it out!
There seems to be no documentation on this issue (that I have found). Surely im not the only one?
-Am i missing something simple and right in front of my eyes that is stiffling my every attempt to simply clear this log history?
To put it straight.. This is an awesome script! It has the functionality, look and feel of no other chat module available to Drupal at this point. I want to continue to use it.
-But im afraid that if I cant get this to work, ill have to move to another module (which I dont want)
The thoughtful side of me says that I wouldnt want my chat history recorded in a log, somwhere, in a cached folder, un-clearable by the administrator (it could be a violation ~of something~ somewhere too).
The site im using it on is a singles and dating site, so its almost a #1 priority to have this type of content enabled, working flawlessly and perfect.
~Im not yelling at the developers (you guys have done wonderfully) Im just asking anyone with an insight as to what I might need to look for, lend a hand... or lend a bit of code.
Heres the site if it helps: http://www.woosingles.com
Drupal: 6.13
phpfreechat (drupal) 6x1.1
phpfreechat version 1.2
Thanks..
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | clear_chat_log-568014-1.patch | 4.44 KB | gnat |
Comments
Comment #1
marcelduchamp commentedHello Nurrad,
I have the same issue ;
with Drupal 5.19 and Phpfreechat 5.1.3 ;
Don't understand why...
I hope there is a solution...
Thanx
Comment #2
Durran commentedThanks... I still have been looking into this for the last week to no avail.. I think that possibly I will be forced to move on.. Ugh!!
Maybe that new video chat module will have a better up-keep and maintenance schedule, or at least documentation.
But, (if ever) this module comes back to a usable state, I will look into it again.
Comment #3
mrfido commentedI have the same issue with Drupal 6.14 and phpfreechat 1.2
so bad..
Comment #4
MrGeek commentedehrm... i'm trying to find the clear chat-log link.. how/where to i get that?
Comment #5
Purple Lady commenteddid someone solved this problem? I have the same issue.
Comment #6
Durran commentedI have since abandoned this site project, but would still like to eventually come back to this issue and see that it has been resolved. It is still I think a great module and I could definitely find a use for it later on down the road
Comment #7
Owlbear commentedI figured out why this isn't working although I don't have the time or offer a full fix at the moment - the long and short it is this: I believe that latest version of phpfreechat itself is incompatible with this module.
Basically when the clear chat request is made (phpfreechat_nuke) the phpfreechat module is looking for a the folder containing the chat logs here in phpfreechat.inc:
From my observations (using phpfreechat 1.3) I've noticed to things: first of all these "messages.data" files don't exist. Secondly the name of the folder in which chat logs are maintained is NOT the id of the associated node (as the function shown above assumes) but some long non-human-readable name (e.g. "79577b5ccdaed1f174182290a96070d7").
I can only assume this previously worked but the naming scheme has been changed.
I'm sorry if this isn't very helpful to those without PHP knowledge but with any luck the maintainers of this module will find this helpful. I've updated this issue to a bug report since this is obviously an issue with the module.
Cheers,
Harry
Comment #8
gnat commentedThere are a lot of reasons that this link does not work. The hook_menu implementation was never passing the argument correctly to the nuke function, and it was passing the wrong argument. The nuke function was trying to delete files that (as far as I can tell) are not the chat log itself. The redirect was always going to the front page etc.
This patch is somewhat large and changes how the function works quite drastically. Instead of removing individual files, I am recursively removing all directories with the node's id hash as the directory in the 'files/phpfreechat/private' directory.
I have tested this a bunch of times, and it seems to get the job done.
The only side effect is that it disconnects any users currently connected to the chat room. They will need to reload the page.
This may not be the complete, or best solution. It may be that I have misinterpreted what this link was meant to accomplish, but that said, this patch does what I described..
Comment #9
jewseppi commentedOkay, so I have a solution to this which is very quick and dirty. The answer to your problem, similar to the patch posted by gnat, deals with removing files/directories to clear the cache. I haven't actually implemented this yet, but just thought of it, tested a few isolated cases and I am sure it will work.
The first thing you need to realize is that the md5 hash is conducted on the string "node[ID]", so for example, if your node is 14530, the hash is on "node14530".
You will find your chat logs under the md5 hash in /sites/default/files/phpfreechat/private/logs
You will find your actual chat messages under the /sites/default/files/phpfreechat/private/chat/s_[HASH]/channelid-to-msg/ch_[CHANNEL NAME]/
note, if your channel name has a space or some special character, the folder name may appear slightly different, for instance
%27 represents '
+ represents a space
All you need to do is remove the file in the logs folder that matches the hash (this is not required but if you don't want a record of the chat then remove it), and remove the files inside the channel folder you found under channelid-to-msg. Unlike gnat's solution above, users will not be kicked out of the chat room and their message history will remain unless they refresh the page, but new users will have a clean chat with no messages.
The only issue I see with this is that in the channelid-to-msg/ch_ folder, you will notice all messages are files from 1 to *
When we remove them, the numbering does not restart. I tested this and it doesn't seem to affect anything, however if you like things to be in order you could dig a little deeper and see if there are any other files that need to be removed.