|Chat / Guestbook Script
MINIMUM BASIC SETUP
To create a chatroom or guestbook, insert the following html into your web page:
<a href="/cgi-bin/chat.pl/NameOfRoom?20">link text</a>
NameOfRoom - This value is used to name the data files for the chat. You can use any name you want, just restrict it to less than 20 characters, and refrain from using special characters. To create multiple chat rooms, use different names.
20 - In the example, 20 is the number of posts to display. This can be any value from 1 to 500. Default is 20. When the chat/guestbook is full, it will delete the oldest messages. More than 500 entries are not allowed since html pages with more than 500 entries will load very slowly.
Page Format - When you first create the chatroom by clicking on its link, it will create "NameOfRoom.html" in your www/data/ directory. You may edit this html document to change the format of your chat page. In this document, you will see the following tag:
Do not alter or remove this tag. This tag tells the script where to place the chat data.
Images - If you wish to include images or background patterns on your chat page, reference your image files using full URLs.
Data Storage - Just as the template for your chat or guestbook is stored as "NameOfRoom.html", your data is stored in a file called "NameOfRoom.data" and your configuration file, should you choose to use one is stored in a file called "NameOfRoom.cfg". All three files are in your www/data folder. Should you choose to manually edit the .data file without using the Administration script, you are welcome to do so, but you must be aware that in order for the script to write to the data file, the file must have its permissions set to 770 (rwxrwx---).
Information Reported - At the beginning of each line of generated code in the html that is produced you will find a comment that includes a Time Stamp and the IP of the visitor in the following format:
To see this information, you can simply view the source of your html page.
You can edit, delete or even reply to a post from the administration area. Simply go to the following URL and click on the post you want to edit. You must have a .cfg called "NameOfRoom.cfg" in your www/data folder to use the reply option. You must have your admin password to use chatadmin.pl.
Enhancements are also accomplished through the addition of a configuration file called "NameOfRoom.cfg" in your www/data folder. This file can contain standard html including tables or other code to alter the layout of the information contained in
<! chat>. If you use this option, you must include at least the tags for "name", "email_address", and "body" similar to this:
You must also include
<textarea name="body" rows=2 cols=50 wrap=SOFT></textarea>
</post> tags to describe how each individual post will appear with information such as this:
The following enhancements are available:
<B><! name> <! date> : <! location></B><BR>
<a href="mailto:<! email_address>"><! email_address></a><br>
<font face="arial" color="333999"><B><! body></B></font>
For an example try our guestbook...
- Send e-mail to an administrator every time a post is made.
<input type="hidden" name="f_recipient" value="firstname.lastname@example.org">
- Add non-standard fields like "City". Don't forget to display the city between your post tags as
<input type="text" name="city">
- Add the ability for an administrator to reply to a particular post.
<P>ADMIN REPLIES: <I><! text></I></P>
- If you include
<! date> between your post tags as shown above, you will see the date and time in parentheses in the format: (6/4/01 19:11).
- Create special formatting or page layouts using tables, colors, fonts, etc.