TMS - The Message System
What is The Message System?
The Message System is a browser based chat system developed by me. It uses php for the user and administrator interfaces and postgreSQL to store the messages. The way it works is actually very simple: User inputs message, message is striped of HTML, message is stored in DB. User loads view page, all messages are retrieved and displayed. The administrator(s) also has/have the option of deleting messages trough the interface instead of having to use the command line. His/Her/Their messages ain't striped of HTML either, so they can post links, scripts, images and most important use color in their nicks, which distinguishes them from normal users.
What are the advantages of The Message System?
Well, for starters, it's VERY light. The maximum size messages can have is 5000 chars, which means a message will take a maximum of 5.1Kb. However, most users write messages that hardly exceed 500 bytes. Even if an admin posts an image, the actual size won't be the image size but the code's. And since an image code is something along the lines of
<img src="image.jpg" alt="some image" />
it will take less than 50 bytes.
Then, there's the easy use: TMS doesn't require a login, password, e-mail or anything for the normal users and uses a simple (though secure) login system for the administrator(s). Since all messages can be deleted on the spot by an admin, spam/content control is actually easy. TMS has 3 methods for deleting messages:
- A time delete in which the admin inserts the timestamp of the message and it's deleted. Since only one message is posted per second at most, a message's time stamp is allways unique;
- A delete content message: for example if an user is spamming the same thing over and over again, you can delete all his messages with one click;
- A delete nick system. For extreme cases only OR if you're wiping the database, you can delete all the messages posted by a specific nick. That means you can just delete a user that's being annoying or wipe a multi user conversation in a few clicks;
TMS is safe agains't exploits: All the nicks and messages are striped of HTML tags and handled in a way SQL injection isn't possible. That means no user can be a smart pants and post some nasty script or wipe the whole database. However, the admins' post interface doesn't do this so they can post links, images and format their messages (using bolds for example). This also allows them to colorize their nicks which is what distinguishes them from the remaining users.
TMS has a admin login system to prevent normal users to highjack the controls (and it is recommend the control panel is passworded trough .htaccess or similar)
TMS comes with a backup and retrieve function to easily backup a conversation that's going well or has some predifined messages you always want there. Later on, you can just use the retrieve to wipe that conversation and post the old one.
Finally, TMS comes with a bot which posts everytime a message is deleted to help keep track of what you did.
Where can I find The Message System?
Easy, you can download the code for use in your own site: tms.rar
Have fun with TMS and tell me what you think of it
The history of The Message System?
The message system has been developed since the end of November 2007 and was first released as a fully downloadable package on the 29th November 2007. It has been updated since, and is curently on version 0 (still experimental) sub version 3 (3 updates so far, 4 releases). Here's a complete history:
Version 0.0
Released 29/11/07
Content: Basic system, containing the add and view php's for users and the add view delete and bot php's for admins as well as a readme.txt
Version 0.1
Released 30/11/07
Content: Same as 0.0 plus the history.txt
-Minor unconsistency in the pg_connect() command fixed
-Changed the way admins nicks are colorized
Version 0.2
Released 2/12/07
Content: Same as before plus backup and retrieve functions.
-Backup and retrieve made.
-Delete by url in view.php instead of by form added
-Replacing of quotes added
-Auto admin nick color added
-Minor bug fixes here and there.
Version 0.3
Released 3/12/07
Content: Same as before plus password for the admin's add.php and view.php. Introduces cookies.
-Added the password system to view.php
-Added the password system to add.php
-Introduced cookies as a mean of storing log ins.