Closed (fixed)
Project:
Chatroom
Version:
master
Component:
Code
Priority:
Normal
Category:
Feature request
Reporter:
Created:
16 Jul 2006 at 02:07 UTC
Updated:
19 Jul 2006 at 09:36 UTC
Jump to comment: Most recent
Uppon entering a chat, all the old messages would be loaded and shown to the user. I like this feature. But it gets problematic when there are a LOT of messages in the chat(thousands), my CPU usage would peek up to 100%, and the browser would stall for a few seconds, whenever I enter the chat.
It would be nice if there is an option to specify the number of old messages to be shown.
Comments
Comment #1
Anonymous (not verified) commentedyes, i think this is good suggestion.
i'll try to implement it today.
cheers
justin
Comment #2
Anonymous (not verified) commentedi've added support for this - please test.
Comment #3
luperry commentedThank you for the speedy fix. But I was getting this warning when I tried to edit the chatroom:
warning: Wrong parameter count for range() in /*/modules/chatroom/chatroom.module on line 122.though I was able to get it working by changing it directly on the mysql database.
On the side note, I was having some issues with the "automaticaly archive when everyone leaves" feature as well, when I go to "chatrooms/archives/1" it always tells me "This chat contains no messages", even after everyone has left the chat, and I see no other way to archive the messages. So I'm not sure if I'm doing something wrong or if this hasn't been fully implemented yet.
Comment #4
Anonymous (not verified) commentedwarnings: did you update the database schema?
sorry i didn't mention it, but i added a column to the db to store the number of old messages to display. the change is reflected in the chatroom.install file.
until the module code stabilises, there might be a few more changes to the db schema.
let me know if you need some help manually updating the table.
automatic archives: yep, i just haven't implemented this yet.
cheers
justin
Comment #5
pacheco commentedgot that error too...
line 122 states:
range function's thirth param ("step") was introduced in php 5, so i've added a workaround to avoid it's use
please update from cvs
Comment #6
luperry commentedJustin,
yes, I did update the database. the problem persists.
Comment #7
luperry commentedpacheco,
I see. I'm using php4, I guess that was the problem.
Comment #8
luperry commentedit works great now.
Comment #9
Anonymous (not verified) commented