Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Clear chat
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John McLear  
View profile  
 More options Jan 10 2010, 10:03 am
From: John McLear <johnym...@gmail.com>
Date: Sun, 10 Jan 2010 07:03:42 -0800 (PST)
Local: Sun, Jan 10 2010 10:03 am
Subject: Clear chat
Does anyone have any code available to clear chat on a pad?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcel Waldvogel  
View profile  
 More options Jan 11 2010, 6:01 pm
From: Marcel Waldvogel <marcel.waldvo...@googlemail.com>
Date: Mon, 11 Jan 2010 15:01:53 -0800 (PST)
Local: Mon, Jan 11 2010 6:01 pm
Subject: Re: Clear chat
In the database, you probably need to do the following:

DELETE FROM t USING PAD_CHAT_TEXT AS t INNER JOIN PAD_CHAT_META AS m
ON t.NUMID = m.NUMID WHERE m.ID == "12345678"
(where 12345678 is the ID of the pad). Then, in the JSON string in
PAD_META where PAD_META.ID = "12345678" set "numChatMessages" to 0

I don't know what you need to trigger a UI refresh, but at least, it
is a start…


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John McLear  
View profile  
 More options Feb 4 2010, 11:35 am
From: John McLear <johnym...@gmail.com>
Date: Thu, 4 Feb 2010 08:35:09 -0800 (PST)
Local: Thurs, Feb 4 2010 11:35 am
Subject: Re: Clear chat
Quick update:

DELETE FROM t USING PAD_CHAT_TEXT AS t INNER JOIN PAD_CHAT_META AS m
ON t.NUMID = m.NUMID WHERE m.ID == "5"

UPDATE PAD_META where PAD_META.ID = "5" set "numChatMessages" = 0

Did that but when I restart etherpad I get

Oops! A server error occured. It's been logged.
Please email <supp...@etherpad.com> if this persists.

for that pad..

If I go in manually and just do:

UPDATE  `etherpad`.`PAD_CHAT_TEXT` SET  `DATA` =  '{"time":
1265300759870,"userId":"g.yv30ms68posnjjt8","lineText":"sdfsdfsvfxcvxcvxcv" }
{"time":
1265300762785,"userId":"g.yv30ms68posnjjt8","lineText":"wheeee1"}'
WHERE  `PAD_CHAT_TEXT`.`NUMID` =7 AND  `PAD_CHAT_TEXT`.`PAGESTART` =0
AND `PAD_CHAT_TEXT`.`OFFSETS` =  '84,72,,,,,,,,,,,,,,,,,,' AND
`PAD_CHAT_TEXT`.`DATA` =  '{"time":
1265300759870,"userId":"g.yv30ms68posnjjt8","lineText":"sdfsdfsvfxcvxcvxcv" }
{"time":
1265300762785,"userId":"g.yv30ms68posnjjt8","lineText":"wheeee"}'
LIMIT 1 ;

Restart the server & it breaks the pad..

Then

UPDATE  `etherpad`.`PAD_CHAT_TEXT` SET  `DATA` =  '{"time":
1265300759870,"userId":"g.yv30ms68posnjjt8","lineText":"sdfsdfsvfxcvxcvxcv" }
{"time":
1265300762785,"userId":"g.yv30ms68posnjjt8","lineText":"wheeee"}'
WHERE  `PAD_CHAT_TEXT`.`NUMID` =7 AND  `PAD_CHAT_TEXT`.`PAGESTART` =0
AND `PAD_CHAT_TEXT`.`OFFSETS` =  '84,72,,,,,,,,,,,,,,,,,,' AND
`PAD_CHAT_TEXT`.`DATA` =  '{"time":
1265300759870,"userId":"g.yv30ms68posnjjt8","lineText":"sdfsdfsvfxcvxcvxcv" }
{"time":
1265300762785,"userId":"g.yv30ms68posnjjt8","lineText":"wheeee1"}'
LIMIT 1 ;

Fixes the pad.

Then I tried changing "numChatMessages":2}}
To "numChatMessages":0}}

Restarted server with the change made and the pad chat was clear, new
entries go in starting at 1.

So to summarize, best method for clearing pad chat is just to change
the JSON string from numChatMessages:XX to numChatMessages:0

I will write a plugin and publish the changes on my blog, thanks for
the help Marcel

On Jan 11, 11:01 pm, Marcel Waldvogel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John McLear  
View profile  
 More options Feb 4 2010, 11:45 am
From: John McLear <johnym...@gmail.com>
Date: Thu, 4 Feb 2010 08:45:03 -0800 (PST)
Local: Thurs, Feb 4 2010 11:45 am
Subject: Re: Clear chat
Can anyone shed some light on how to tell the browser that the
numChatMessages is now 0?

On Feb 4, 4:35 pm, John McLear <johnym...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raja  
View profile  
 More options Feb 5 2010, 10:49 pm
From: Raja <rajas...@gmail.com>
Date: Fri, 5 Feb 2010 19:49:12 -0800 (PST)
Local: Fri, Feb 5 2010 10:49 pm
Subject: Re: Clear chat
John
From what I did earlier, the server pushes the chat messages to all
the clients, so if you are going to make numChatMessages = 0, then it
has to be told through the comet channel to all clients (like a chat
message) to clear all their chats.

On a individual node, this is maintained as an array of chat messages
which then gets printed onto the screen. I started going down the path
of creating a new command for clearing chat messages from any single
client, which then sends the message to all clients to clear all their
chats. Other things have come in the way and Im still working on it.
Ill try to see if I can finish up this weekend.

-- Raja

On Feb 4, 9:45 pm, John McLear <johnym...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John McLear  
View profile  
 More options Feb 6 2010, 9:32 am
From: John McLear <johnym...@gmail.com>
Date: Sat, 6 Feb 2010 14:32:00 +0000
Subject: Re: Clear chat

Thanks Raja, I appreciate your efforts


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John McLear  
View profile  
 More options Feb 10 2010, 10:24 am
From: John McLear <johnym...@gmail.com>
Date: Wed, 10 Feb 2010 07:24:36 -0800 (PST)
Local: Wed, Feb 10 2010 10:24 am
Subject: Re: Clear chat
Any luck over the wkend Raja?  I have made an interface (the JSP and
CSS) if you want my code for that as to simply integrate it?

On Feb 6, 2:32 pm, John McLear <johnym...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raja  
View profile  
 More options Feb 10 2010, 10:46 pm
From: Raja <rajas...@gmail.com>
Date: Wed, 10 Feb 2010 19:46:49 -0800 (PST)
Local: Wed, Feb 10 2010 10:46 pm
Subject: Re: Clear chat
Sorry John, haven't made much progress. I will provide a diff as soon
as I get to my home machine. Its not complete and the server bits for
pushing it to other clients is the one missing. Local chat clears were
done already (I thought I attached a patch to this group earlier but
havent).

On Feb 10, 8:24 pm, John McLear <johnym...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John McLear  
View profile  
 More options Feb 21 2010, 10:26 pm
From: John McLear <johnym...@gmail.com>
Date: Sun, 21 Feb 2010 19:26:03 -0800 (PST)
Local: Sun, Feb 21 2010 10:26 pm
Subject: Re: Clear chat
Any move yet Raja?

On Feb 11, 3:46 am, Raja <rajas...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »