chatroom.wikidot.com

nav_first.pngFirst: thread:102
Marketplace
Edited: 1255961439|%e %b %Y by: pieterh
Comments: 5
Tags:

nav_prev.pngPrevious: thread:26
UrCheatz.com
Edited: 1255961439|%e %b %Y by: pieterh
Comments: 0
Tags:

James KanjoJames Kanjo wrote on 1252674512|%e %b, %H:%M (%O ago)

Aim: To create a chat room powered by Wikidot

Why: That is a really good question. Why would you use a chatroom over a forum discussion? Meh, we'll figure that out later.

Concept: At first I thought this would only be possible with use of AutoSaving in the NewPage module. That is:

[[module ListPages ...]]
Conversations so far
[[/module]]

[[module NewPage category="chat" autosave="partial" ...]]

That way, we can make the chat category automatically redirect to the conversation page (thus refreshing the conversation).

But… damn ! The autosave feature doesn't exist!


So today I decided waste my brainpower trying to create a chatroom despite this. I succeeded at building a proof-of-concept:

Chatroom.jpg

Please check it out so we can all work on improving it: Chatroom.Wikidot.com


Features:

  • Automatically refreshes the conversation every 30 seconds (twice per minute);
  • Refreshing the conversation doesn't disrupt a message you may be in the middle of writing;
  • Saving a message automatically refreshes the page;
  • The conversation automatically scrolls to the bottom with every refresh;
  • Previewing messages looks pretty.

Problem:
The conversation displays the conversation in Ascending order (oldest to newest), so the newest conversations are at the bottom. It only displays 50 messages (I have custom set this). The problem is that the ListPages module can't display the newest 50 pages in ascending order.

More explained, you can only have the newest pages ordered from newest to oldest. What we want is to display the 50 newest pages, but showing the newest page last.


So what do you think? Is it cool?

~ James


Start a new sub-thread

Comments: 10

Chatroom: Cross-domain errors!
James KanjoJames Kanjo 1252689017|%e %b %Y, %H:%M %Z|agohover

Damn cross-domain security errors!
Saving a message no longer automatically refreshes the page. But that's okay, because the conversation gets refreshed within 20 seconds anyway.

I also got rid of the “cancel” button, because it really had no purpose.

Nobody's tried to chat yet? C'mon! Give it a go!


λ James Kanjo | blog | photos | contact

unfold Chatroom: Cross-domain errors! by James KanjoJames Kanjo, 1252689017|%e %b %Y, %H:%M %Z|agohover
pieterhpieterh 1252703718|%e %b %Y, %H:%M %Z|agohover

So what do you think? Is it cool?

What I think is that you are (a) insane and (b) my kind of insane.

unfold by pieterhpieterh, 1252703718|%e %b %Y, %H:%M %Z|agohover
Re:
James KanjoJames Kanjo 1252719678|%e %b %Y, %H:%M %Z|agohover

I changed the refresh rate to 2 per minute, then I integrated the minimalistic editor, and I also created a class for the chat messages in the css. This way, previewing a message is much better.


λ James Kanjo | blog | photos | contact

unfold Re: by James KanjoJames Kanjo, 1252719678|%e %b %Y, %H:%M %Z|agohover
Re:
leigerleiger 1252728727|%e %b %Y, %H:%M %Z|agohover

I posted in the chat yesterday instead of here… but,

It's good ! Great work.

unfold Re: by leigerleiger, 1252728727|%e %b %Y, %H:%M %Z|agohover
Re:
RobElliottRobElliott 1252840919|%e %b %Y, %H:%M %Z|agohover

Very good work James.

Rob


ad5.png
unfold Re: by RobElliottRobElliott, 1252840919|%e %b %Y, %H:%M %Z|agohover
Chatroom Bug Fixes
James KanjoJames Kanjo 1252767794|%e %b %Y, %H:%M %Z|agohover

Okay, if you've already seen the chatroom, then you were looking at the proof-of-concept version.

I encourage you to return to the Chatroom so that you can see the big changes I've made. Essentially, I put in a nice structure which is explained on the homepage.

Previously, everything was stored in the chat:_template page. This was clumsy, non-user and non-wiki friendly — as most proof-of-concepts start out to be.


Changes include:

  • Saving a message refreshes the conversation;
  • Nice simplified structure;
  • Going to an individual message (i.e. chat:10) will automatically redirect to the chatroom.

That last one means that if you are watching the site, clicking on the links in your email notifications will take you to the chatroom (as opposed to forcing you to create a new message for the conversation).


Feel free to modify the chat-message class in the CSS page, if you want to change the look of the conversation messages.


Whilst it's possible to use forum comments to comment on people's chat messages, it doesn't work well. Because the conversation is ever-refreshing, whatever you have typed before the refresh will be lost after the refresh.

In addition to that problem, forum comments disrupt the page anchor. This means that the conversation doesn't automatically scroll to the bottom of the list — it scrolls to the active comment window.


Thanks guys for your support! But I still can't think of a reason to use a chatroom over a forum…


λ James Kanjo | blog | photos | contact

unfold Chatroom Bug Fixes by James KanjoJames Kanjo, 1252767794|%e %b %Y, %H:%M %Z|agohover
Re: Chatroom Bug Fixes
pieterhpieterh 1252850820|%e %b %Y, %H:%M %Z|agohover

But I still can't think of a reason to use a chatroom over a forum…

For me, the difference is one of presence and UI.

  1. We should in theory be able to know who is chatting
  2. The UI shows a fixed edit box, with a scrolling list of comments
  3. Comments are flattened, and shown in one line with <time><author><text>

I'm thinking that a Comments list and a chatoom could be different visualizations of the same internal structures. While I really like the concept here, it could be a lot simpler to make it work in the Comments module as a user-selected option, or an argument to the module.

unfold Re: Chatroom Bug Fixes by pieterhpieterh, 1252850820|%e %b %Y, %H:%M %Z|agohover
Why?
leigerleiger 1252921946|%e %b %Y, %H:%M %Z|agohover

Why: That is a really good question. Why would you use a chatroom over a forum discussion? Meh, we'll figure that out later.

  • Much less formal, more relaxed
  • No specific topic, so going "off topic" isn't a problem
  • Non-wikidot chat with the rest of the wikidot community (relates to first point)
unfold Why? by leigerleiger, 1252921946|%e %b %Y, %H:%M %Z|agohover
Chatroom: Wonderful improvements!
James KanjoJames Kanjo 1254848498|%e %b %Y, %H:%M %Z|agohover

Today I finally got around to “finishing” the Chatroom project… with impressive results!

Now the chatroom only refreshes when somebody contributes to the conversation ! ! !
And every time somebody writes a new message, a sound is played to notify you* ! ! !

Please visit and say ‘hello’ in the chat interface: Chatroom @ Wikidot


* In Safari, a sound is only played if the Chatroom tab is displayed, or when you switch to the Chatroom tab.


λ James Kanjo | blog | photos | contact

unfold Chatroom: Wonderful improvements! by James KanjoJames Kanjo, 1254848498|%e %b %Y, %H:%M %Z|agohover
pieterhpieterh 1254931981|%e %b %Y, %H:%M %Z|agohover

Some ideas:

  • click on user name to show posts by that user
  • the decoration still seems too heavy - I'd suggest very thin lines and less rounding on the corners
unfold by pieterhpieterh, 1254931981|%e %b %Y, %H:%M %Z|agohover
Add a new comment
page_revision: 7, last_edited: 1255961439|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License