Premade Script: ChatterBox
Some of you might know this as a Tag Board or Shoutbox. This version is called ChatterBox. Here's an example of how it looks like:
This actually isn't a tutorial. Here, I already did all the dirty work and all you have to do is download the zip file and customize it to your liking. Isn't that convenient?
Now, aside from the features you see above, this also includes the following:
- Anti-spam. Will disallow double posting and posting for the people whose IP are banned. Visitors will also need to post a verification code before they can post.
- Admin panel. Delete ChatterBox entries and add/delete banned users.
Aren't you excited to be getting these? Let's proceed...
Requirements
You must have basic knowledge of how HTML, forms, iFrames and CSS work. Your server must also support PHP and you should have at least 1 mySQL database.
Terms Of Use
If you are going to use this ChatterBox, you must never remove the part where it says "Chatterbox by MikoReznor" and it must remain readable. If you want it off, you're required to send me a $10 Amazon Gift Certificate. Email it to this address: mikoreznor@gmail.com
You may not copy the source of the files in this program for use in another. Also, you may not redistribute this ChatterBox or any of its files. If you want to share this to people, direct them to Blinding-Light.COM.
This has been tried and tested and has been found working, however, I am not responsible if this ChatterBox causes any damages or security breaches to your server. Use this at your own risk.
Installation
Download ChatterBox and unzip it in a directory of your choice.
Open config.php and change the following variables (there are comments there to make it easy to locate the variables that need changing):
- $user - MySQL username.
- $password - MySQL password.
- $database - MySQL database.
- $AdminUsername - Your desired username for the ChatterBox admin panel.
- $AdminPassword - Your desired password for the ChatterBox admin panel.
- $chatter_limit - Number of entries you want to be displayed. Default is 20.
- $color_red, $color_green, $color_blue - Color for verification code to prevent spam. Format: R, G, B. Default is 0, 0, 0 which is black. Refer to the color picker tool of your favorite image editor to customize.
- $waiting_time - Number of seconds a visitor has to wait to post another message after the first one. Default is 600 or 10 minutes.
- $error_empty - Error message when visitor didn't fill in the required fields which are Name and Message. This error will also be displayed to bots.
- $error_ban - Error message when banned visitor is trying to post.
- $error_double - Error message when visitor is double posting.
- $error_wait - Error message when visitor is posting another message too soon after the first post.
To change the look and feel of your ChatterBox, open style.css and edit to your liking. I'm assuming you're familiar with CSS so I don't have to go through that in detail. There are comments there to make it easy for you to edit.
Modify form.html if you want to change the default values in the form fields.
When changing the smileys, make sure they have the same file name and are in the same directory as the ones available on the ZIP file.
After that, open index.html. Comments are also placed there for you to locate which values you can edit. You may copy and paste the code stated there to whatever part of your web site you want to put it in.
In order to avoid any complications, it is advised that you do not edit any other files other than what I've mentioned.
Once you've changed everything according to your preferences, upload the files (except uninstall.php) to your server. Make sure that the files are in their proper directories. Then, open install.php and read through the introduction and Terms Of Use (discussed earlier), click the agreement button to install. When the installation is finished, make sure you delete install.php for security purposes.
Go to the admin folder to get to the ChatterBox Admin Panel.
Uninstall ChatterBox
Why would you want to anyways? Oh, well. If you insist...
Upload uninstall.php to the same directory as the rest of the files included in the ZIP. Open it and click the "Yes, I want to remove ChatterBox" button. Once it tells you that the uninstallation is complete, delete all the ChatterBox files from your server and you're done. Bye-bye, ChatterBox!
ChatterBox History
December 6, 2005. Initial release.
December 12, 2005. Validated. Added to anti-spam feature: no double posting and will deny posting for bots by checking if the value for browser is empty or contains the words bot, crawl, find and spider. Updated config.php so now you can have the option to change the number of entries you want to be displayed.
December 13, 2005. Updated admin panel. There is now a login feature. You can also delete multiple ChatterBox entries instead of one at a time. Added file chatterbox_login.php.
December 29, 2005. Found a bug that an error message will appear for those who posts first. Fixed it. Now, instead of redirecting users to the ChatterBox, I've added error messages to be displayed (before redirecting) when visitors don't fill in the required fields or are either banned or double posting. Added a timer which will count how long a person can post another message. You must reinstall ChatterBox in order to get this feature. Added file uninstall.php. Uploading that file is optional.
January 4, 2006. Fixed major bug that doesn't record visitor posts.
November 14, 2006. Changed layout to include the form inside the iframe. Added a new anti-spam feature where your visitors need to type the verification code before they can post.
Support
Post any questions, comments, suggestions or bug reports in the ChatterBox above or you can use the contact form available on this site.
If you have any questions or if you want to discuss this tutorial, you may post at Blinding Light MB.