Chat History

Why did I decide to make the Wikidot Chatroom?

Emails are needed for private conversations. Forums are required for group discussions. Chatrooms are necessary for live discussions. Wikidot needed a means of instant communication.

There's been many attempts to embed chatrooms in the Wikidot — each of them failing. But why?

  • They were 3rd party applications — Had a foreign appearance
  • You had to “sign in” or “create an account” to use them
  • Impossible to correspond individuals in the chatroom with the one's in the Wikidot community (risk of identity theft)
  • Some chatroom conversations are stored on the each user's local machine — newly logged in users can’t see the chat history
  • Supported by ads/pay to use

Because of these limitations, few people used these embedded chatrooms; it was a complete failure. Even so, we still needed a means of instant communication.

Development

In 2009, the idea that Wikidot could produce a chatroom was inconceivable — there’s no way Wikidot could do that!

So I set myself the challenge to build a Chat application for Wikidot. So to do this, what would I need:

  • A text editor send instant messages;
  • A server to store the messages, with metadata containing poster and date of post;
  • IMs need to be ordered chronologically;
  • The ability to post IMs simultaneously;
  • A means to display new posts as they're posted;
  • An alert noise to notify users when somebody has made a post.

“Hang on a second…” I thought, “Wikidot has all of these tools!!!”

So I immediately got to work and started programming a proof-of-concept Wikidot powered chatroom. The tricky part was making the conversation history refresh automatically, without disrupting what you have already typed into the text editor. So I placed the conversation in it's own individual iframe, and made it refresh every 30 seconds.

And that was it. I successfully built the proof-of-concept Wikidot chatroom.

Public Release

When I released it, I received a lot of feedback:

  • Why are there big gaps between posts?
  • Can you show us who's online right now?
  • Would it be possible to make the conversation refresh ONLY when there's a new post?
  • Is the conversation supposed to automatically scroll to random posts?

That last point is quite amusing actually. I had the conversation so that the newest message appeared at the bottom of the list, like most modern-day chatrooms. Whenever somebody added a new post, the scrolling mechanism I implemented would scroll to the bottom of the conversation automatically. Except there was one problem… it was faulty! It kept scrolling to random posts, which annoyed users greatly. To fix this, I simply made it so that the newest post appeared at the top of the conversation — no more scrolling!

Wikidot Guru leiger came up with the programming concept to show the “currently active users” (which gathers every post in the past hour, lists all of the authors and removes duplicate author entries).

Until this stage, I had thought that automatic new post refreshing would be the limitation of the chatroom, an impossibility. However, after weeks of thinking about the problem, I had an epiphany of how it could be done.

This feature alone had transformed the chatroom from an ‘emulation’ to an “application”, and almost instantaneously, the chatroom exploded with popularity.

Upgrade

In April 2011, I decided that it was time I cleaned up the chatroom code… long story short, I simplified the core framework into a Cross Site Include (CSI) framework. Additionally, the number of necessary pages to create was reduced from 8 to 4. I also took the opportunity to update the “new message alert” sound, which is much smoother and less obtrusive. Some visual aesthetic changes were also made to the user interface.

During this upgrading period, another Wikidot Guru tsangktsangk helped me with debugging errors. Without him, I would never have worked out what part of the code I had screwed up.

At the time, tsangk made the suggestion to ask another Wikidot Guru, bcammobcammo, for some CSS help with the “Saving Post” dialogue.

bcammo not only provided us with an outstanding solution to a beautiful “Saving Post” dialogue, but he also took the liberty to enhance the Chat framework's message scrolling mechanism. In the process, he fixed a scrolling bug, and now the Chat application is compatible amongst iOS devices.

Conclusion

So that's it! That's the history of the Wikidot Chat application!

If you're really curious about the details of what happened, why not read through the chat archive? There's only 4271 posts to read through!!!

~ James Kanjo

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