web design and hosting
features and pricing my account customer support about ICG Link, Inc. contact ICG Link, Inc.

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>
Explanation:

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:
<! chat>
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.
<img src="http://www.icglink.net/picture.gif">
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:
<!--999999999-999.999.999.999-->
To see this information, you can simply view the source of your html page.

ADMINISTRATION

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.
/cgi-bin/chatadmin.pl/NameOfRoom
ENHANCEMENTS

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:
  • <input name="name">
  • <input name="email_address">
  • <textarea name="body" rows=2 cols=50 wrap=SOFT></textarea>
You must also include <post> and </post> tags to describe how each individual post will appear with information such as this:
<! post>
<B><! name> <! date> : <! location></B><BR>
<a href="mailto:<! email_address>"><! email_address></a><br>
<font face="arial" color="333999"><B><! body></B></font>
<! /post>
The following enhancements are available:
  • Send e-mail to an administrator every time a post is made.
    <input type="hidden" name="f_recipient" value="someone@someplace.com">
  • Add non-standard fields like "City". Don't forget to display the city between your post tags as <! city>.
    <input type="text" name="city">
  • Add the ability for an administrator to reply to a particular post.
    <! reply>
    <P>ADMIN REPLIES: <I><! text></I></P>
    <! /reply>
  • 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.
For an example try our guestbook...
ICG Link, Inc. 7003 Chadwick Drive, Suite 111, Brentwood, TN 37027