Needs review
Project:
Chatroom
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2010 at 04:01 UTC
Updated:
10 Apr 2011 at 23:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedyes, this seems reasonable.
Comment #2
jct commentedThis may be a bit of a hack (I'm no programmer), but i was able to achieve this end by changing the $i = 1 to $i = 0 for both the chat room and chat (lines 113 and 362).
Before
After
Comment #3
jct commentedSorry for the double post. Decided after the fact to try to create a patch (my first try). If something's not right, please let me know. I'm eager to learn.
Comment #4
truyenle commented@ jct, the patch does work with FF, Safari, and Chrom but not with IE.
When setting the Old message to 0 => 'offset().top' is null or not an object. see images
Truyenle
Comment #5
glitz commentedunfortunatly this is not working for me. was there anything else changed in chatroom.module. Im primairly focusing on changing this feature for chats only( as i do not use chatrooms)
thanks! :)
Comment #6
jct commented@truyenle I tested it a bit in IE and didn't get that error. Can you provide a bit more information like your IE version and what caused the error (saving a new chat, using a chat, etc.)? Thanks.
@glitz The patch should have changed the setting for both chats and chatrooms. It's my first attempt at a patch, so perhaps I didn't do something correctly.
As I was testing things more, I realized that a more elegant solution would be to have 0 old chats show up that are older than a few minutes. That's beyond my programming abilities, unfortunately.
Comment #7
glitz commented"As I was testing things more, I realized that a more elegant solution would be to have 0 old chats show up that are older than a few minutes. That's beyond my programming abilities, unfortunately."
this feature would actually be perfect...
Comment #8
glitz commentedI attempted to apply the patch and it did not take for me for some reason. Is there maybe a line hack in the chatroom.form file that I could edit?
Comment #9
jct commentedTake a look at the code change in http://drupal.org/node/864600#comment-3486554 and be sure to do it for both lines 113 and 362.
Comment #10
glitz commentedhmm. didnt work for me. this is how i saved it:
line 113:
$old_msg_range = array();
for ($i = 0; $i <= 20; $i++) {
$old_msg_range[$i] = $i * 10;
line 362:
$previous_msg_range = array();
for ($i = 0; $i <= 20; $i++) {
$previous_msg_range[$i] = $i * 10;
I will try my hand at the patch again. I am new to applying patches so it may be my fault...
Thanks,
Chris
Comment #11
truyenle commented@jct: Sorry, for the late reply. I test it both in IE7 and IE8.
When setting the Old message to 0 => "'offset().top' is null or not an object" message is shown up when you visit the chat node and do chatting.
Thanks
Comment #12
truyenle commentedAny update on this jct? I means the patch doesn't work in IE.
Thanks.
Comment #13
truyenle commentedjct or anyone? please. Thanks
Comment #14
jct commentedAfter a bit of Googling, my hunch is there's a problem in how IE is interpreting the Javascript (here is a lead). It might be possible to make some changes to the JS code, but that's beyond my means. I did some testing in IE 8 and wasn't able to replicate the problem. Is anyone else seeing it? Sorry I'm unable to help more.
Comment #15
davidag commentedI've been doing some research on how to fix the IE error you mentioned. After some testing I've been able to avoid the error and keep the rest of the functionalities working (I think).
Please, be aware that I have no experience programming with jQuery nor using the Drupal 6 API. This was just a quick fix.
Just change line 12 of chatroom.js as follows:
I hope it works for you :-)
PD: Btw, you have to apply the patch on message 3 in order to select 0 old messages...
Comment #16
truyenle commentedThank davidag, that pretty much cool!.
Actually, StuartEngelhardt just also help me to create this patch for a fix.
Thanks
Comment #17
jct commentedHere's a patch against 6.x-2.x-dev (April 10) that combines both of the above patches. Since I didn't experience the issue in IE, could someone test?
Comment #18
jct commentedThis time with the attachment :P