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…
<marcel.waldvo...@googlemail.com> wrote: > 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…
> 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 padchatwasclear, new > entries go in starting at 1.
> So to summarize, best method for clearing padchatis 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
> <marcel.waldvo...@googlemail.com> wrote: > > 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…
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:
> > Then I tried changing "numChatMessages":2}} > > To "numChatMessages":0}}
> > Restarted server with the change made and the padchatwasclear, new > > entries go in starting at 1.
> > So to summarize, best method for clearing padchatis 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
> > <marcel.waldvo...@googlemail.com> wrote: > > > 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…
On Sat, Feb 6, 2010 at 3:49 AM, Raja <rajas...@gmail.com> wrote: > 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: > > 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:
> > > 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":
> > > Then I tried changing "numChatMessages":2}} > > > To "numChatMessages":0}}
> > > Restarted server with the change made and the padchatwasclear, new > > > entries go in starting at 1.
> > > So to summarize, best method for clearing padchatis 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
> > > <marcel.waldvo...@googlemail.com> wrote: > > > > 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…
> On Sat, Feb 6, 2010 at 3:49 AM, Raja <rajas...@gmail.com> wrote: > > 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: > > > 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:
> > > > 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":
> > > > Then I tried changing "numChatMessages":2}} > > > > To "numChatMessages":0}}
> > > > Restarted server with the change made and the padchatwasclear, new > > > > entries go in starting at 1.
> > > > So to summarize, best method for clearing padchatis 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
> > > > <marcel.waldvo...@googlemail.com> wrote: > > > > > 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…
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:
> 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:
> > Thanks Raja, I appreciate your efforts
> > On Sat, Feb 6, 2010 at 3:49 AM, Raja <rajas...@gmail.com> wrote: > > > 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: > > > > 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:
> > > > > 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.
> > > > > Then I tried changing "numChatMessages":2}} > > > > > To "numChatMessages":0}}
> > > > > Restarted server with the change made and the padchatwasclear, new > > > > > entries go in starting at 1.
> > > > > So to summarize, best method for clearing padchatis 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
> > > > > <marcel.waldvo...@googlemail.com> wrote: > > > > > > 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…
> 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:
> > 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:
> > > Thanks Raja, I appreciate your efforts
> > > On Sat, Feb 6, 2010 at 3:49 AM, Raja <rajas...@gmail.com> wrote: > > > > 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: > > > > > 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:
> > > > > > 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.
> > > > > > Then I tried changing "numChatMessages":2}} > > > > > > To "numChatMessages":0}}
> > > > > > Restarted server with the change made and the padchatwasclear, new > > > > > > entries go in starting at 1.
> > > > > > So to summarize, best method for clearing padchatis 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
> > > > > > <marcel.waldvo...@googlemail.com> wrote: > > > > > > > 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…