chatroom.wikidot.com
nav_first.pngFirst: thread:40
event-calendar.wikidot.com
Edited: 14 Dec 2011 22:51 by: GoVegan
Comments: 42
Tags:
nav_prev.pngPrevious: thread:26
UrCheatz.com
Edited: 19 Oct 2009 14:15 by: pieterh
Comments: 0
Tags:

James KanjoJames Kanjo wrote on 11 Sep 2009 13:08

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

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License