
########################################### README ############################################

LICENSE AGREEMENT
By installing ChatPro ("Software") or setting the permissions so it is
executable or altering the Software in anyway, Licensee agrees to
be bound by the terms of this License Agreement ("Agreement").
If Licensee does not agree to all terms of this Agreement, Licensee
must promptly destroy all copies of the Software and accompanying
documentation and files ("Documentation").
I. GRANT OF LICENSE
Command-O Software ("Command-O") hereby grants to Licensee a
non-exclusive license to use the Software and Documentation on
the following terms:
A. No part of this software package can be reproduced or
transmitted in any form or by any means: electronic, mechanical,
or otherwise, without prior written permission of Command-O
Software. You are allowed to upload the Software to your server for
use as designated. The script may not be uploaded such that the
script source code is readable to the world.
B. No part of the programming can be altered unless permission is
granted by Command-O Software. Exceptions to this include the
variables set in the configuration and language files that accompany
the script.
C. The included program cannot be used in any unlawful manner or
in a way that would be construed as unlawful by the government or
equivalent.
D. No part of the program can be copied and re-sold under another
name.
E. Licensee cannot run more than the one copy of the program
specified unless prior arrangements have been made with
Command-O Software.
II. TITLE
Title, ownership rights and intellectual property rights in and to the
Software and Documentation shall remain in Command-O. The
Software is protected by the copyright laws of the United States
and international copyright treaties.
III. LIMITED WARRANTY
Achieve the functionality described in the Documentation.
Command-O does not warrant, however, that the Licensee's use of
the Software will be uninterrupted or that operation of Software will
be error-free or secure.
IV. CUSTOMER REMEDIES
Command-O's sole liability for any breach of this warranty shall be,
in Command-O's sole discretion: (i) to advise Licensee how to
achieve substantially the same functionality with the Software as
described in the Documentation or through a procedure different
than set forth in the Documentation. (ii) if the above remedy is
impracticable, to refund the license fee Licensee paid for the
Software.
NO OTHER WARRANTIES: TO THE MAXIMUM EXTENT PERMITTED
BY APPLICAPLE LAW, COMMAND-O DISCLAIMS ALL OTHER
WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE WITH REGARD TO THE
SOFTWARE, AND THE ACCOMPANYING WRITTEN MATERIALS.

################################################################################

              SETTING UP CHATPRO

First of all you must put the script in your cgi-bin directory or
ifyour server allows it anywhere else in your web area (if you place
it elsewhere you will likely need to call it "chatpro.cgi"). If the
server runs on Windows NT it will need to be called chatpro.pl no
matter where it is located.
Now choose a location for the three directories the script will put
files in. One directory is for storing the chat that goes on in the
rooms, the lists of people in each room, and other important
information. Another directory is for the personal files containing
one on one messages and other information regarding each
participant. The third directory contains the optional ChatPro
plugins. It is highly recommended that these directories are not in
an area directly accessible through the web, in otherwords an area
out of the "htdocs" or "public_html" (or similarly named)
directories. In most cases it's OK to have them in the cgi-bin. If
they are in an accessible area people will be able to read other
people's one on one messages (by accessing the file directly).
Then if your server runs UNIX you need to set the permissions for
the script and the directories the script uses. At a Unix prompt
while in the directory with the script (if you have telnet access to
the server) type:
chmod 755 chatpro.cgi
Where "chatpro.cgi" is the name of the script.
Then go to the directory which has the three directories you just
created(it may be the same directory as the script). And type the
following:
chmod 777 chatfiles
chmod 777 chatvis
chmod 777 chatplugins
Where "chatfiles", "chatvis", and "chatplugins" are the names of the
directories.
If you don't have telnet access you can set permissions with FTP
Software. Fetch for the Macintosh and Winsock FTP for Windows are
both able to do it. If you do FTP, be sure to upload the script, .conf
files, and plugins as ASCII text and not as a binary files.

               SCRIPT CHANGES:

The following settings must be set to your server for the script to
work.
#!/usr/local/bin/perl
This is on the very first line of the script and must point to where
Perl is on your server. Another common place for it is
#!/usr/bin/perl If you don't know where Perl is on your server
type whereis perl at a UNIX prompt. If this is set wrong the
error_log on your server will list an "errno 2". This script runs
under perl4 or perl5. If your server runs Windows NT you do not
need to set this line.
There are only two other things you must set in the script itself,
and those are the locations of the configuration and language files.
$conf_file = "chatpro.conf";
If the configuration file is called chatpro.conf and is in the same
directory as the script, you can leave it set as is. Otherwise change
it to the path to the file.
$lang_file = "chatpro.lang";
If the language file is called chatpro.lang and is in the same
directory as the script, you can leave it set as is. Otherwise change
it to the full path to the file.
The above few changes are all you need to do to the script itself.
The rest of your modifications will be to the configuration and
language files. The changes to the configuration file are described
below. The changes to the language file are described in Language
Documentation page.
In order to call the script you only need to place a link on your webpage, that calls the
script directly, something like:
<a href=http://yourhost.com/cgibin/chatpro.pl>CHAT</a>.

             CONFIGURATION FILE:

A couple guidelines, if you use a quotation mark ("); at symbol (@);
or dollar sign ($) in any of these variables, you MUST put a
backslash (\) immediately before that character. The text should
all be on the same line as $variable =.  The text must be
enclosed by quotes. There must be a semicolon at the end of the
line.
$conf_file = "chatpro.conf";
If the configuration file is called chatpro.conf and is in the same
directory as the script, you can leave it set as is. Otherwise change
it to the path to the file.
$lang_file = "chatpro.lang";
If the language file is called chatpro.lang and is in the same
directory as the script, you can leave it set as is. Otherwise change
it to the full path to the file.
The above few changes are all you need to do to the script itself.
The rest of your modifications will be to the configuration and
language files. The changes to the configuration file are described
below. The changes to the language file are described in Language
Documentation page.
In order to call the script you only need to place a link on your webpage, that calls the
script directly, something like:
<a href=http://yourhost.com/cgibin/chatpro.pl>CHAT</a>.
CONFIGURATION FILE:
A couple guidelines, if you use a quotation mark ("); at symbol (@);
or dollar sign ($) in any of these variables, you MUST put a
backslash (\) immediately before that character. The text should
all be on the same line as $variable =.  The text must be
enclosed by quotes. There must be a semicolon at the end of the
line.

            THE LOOK:

The following variables control the look of your Chat page.
$page_title = "ChatPro 2.5 by Command-O";
This is the title of your chat. It will appear as the title of a visitor's
browser window and near the top of pages the script generates if
you don't have a title graphic.
$bgcolor = "ffffff";
This is the background color of all pages the script generates. It
should be a hex number as is standard of html.
$text_color = "000000";
$link_color = "0000ff";
$vlink_color = "660099";
These are the text, link, and viewed link colors (respectively) and
should also follow the hex number standard of html.
$oldcolor = "444444";
This is the color of messages the person viewing chat has already
seen. It should be a hex number as is standard of html.
$one_color = "cc0000";
This is the color of one on one messages sent to or from the person
viewing the chat. It should be a hex number as is standard of html.
$font_face = "";
This is the font face for the text of the chat. Leave it blank to use
the default font of the user's web browser.
$title_graphic = "http://www.command-o.com/chatpro/chatpro.jpg";
$background = "";
These are the URLs to the images to use for the title and the
background. They are URLs, so they should begin with http:// If
you leave either blank no image will be used. Title graphics should
be about 270 pixels wide and 30 pixels tall.
$include_date = 0;
If this is set to 0 the date will not be included with any posts, only
the time. If this is set to 1 the date will be included in all posts. If
this is set to 2 the date will not be included in posts shown in the
live chat but will be included in the archive of the chat if you are
archiving the room using the admin.pl plugin.
$new_message = "<FONT COLOR="red">NEW!</FONT>";
This will preceed every message the person has not seen before.
You can make it an <img src=\"new.gif\"> tag, but BE SURE TO
PUT backslashes before quote marks.
$border = 5;
This is the width of the border around the table in the chat page.
$textarea_rows = 4;
This is the number of rows in the textarea field on the chat page.
$textarea_cols = 50;
This is the number of columns in the textarea field on the chat
page.

                       THE FEEL:

The following variables control the feel of your Chat page.
$schedule_file = "";
This is the URL of a page detailing when chats are scheduled to
meet. A link will be made to this page from the registration page if
you put a URL in here. If there is no URL, no link will be made.
$help_file = "http://www.command-o.com/chatpro/help.shtml";
This is the URL of a help page explaining how to use ChatPro for
users. A link will be made to this page from the almost every page
if you put a URL in here. If there is no URL, no link will be made.
Feel free to leave it set to Command-O's help file.
@public_rooms = ("Lobby","Living Room","Family
Room","Kitchen","Bedroom");
These are the names of the public rooms in your chat. Make as
many as you like. Each room is enclosed by quotes and separated
with a comma.
$entry = "Lobby";
This is the default room people will enter when they first register to
chat.
$allow_private = 1;
Set this to 1 if you want to allow people to create their own private
rooms. Set it to 0 and private rooms will not be available.
$allow_one_on_one = 1;
Set this to 1 if you want chatters to be able to send each other one
on one messages. Set this to 0 to disable one on one messages.
$allow_html = 0;
Set this to 1 to allow chatters to post HTML in the chat. Set this to
0 to disallow HTML.
$show_status = 1;
If this is set to 1 messages about people entering and leaving the
room will be posted. If this is set to 0 these messages will not be
posted. These messages will never be posted in rooms setup as
message board rooms using the message.pl plugin.
$out_link = "http://www.command-o.com";
This is the default URL people will be sent to when they leave the
script.
$time_zone = 0;
This allows you to change the time shown in the chat relative to the
time on the server. If you are in New York, but the server is in
California it will be 7:30 in New York while the chat is showing the
time as 4:30. In this case setting this to 3 would solve this
problem. If the locations were reversed setting it to -3 would work.
This is the number of hours different from the server time you want
the chat time to be.
$visitors_time = 10;
This is the time in minutes that a person will remain listed as being
in a room since their last reload.
$chat_time = 60;
This is the time in minutes that a room's chat file will remain on the
server after having not been changed. This insures that the files
associated with private rooms and unused public rooms are not left
to clutter up your server.
$lock_sec = 5;
The script creates a lock file when someone begins execution of the
script and deletes it when the script finishes. If the file is there
when the script tries to create the file the script will wait until this
file is gone. This insures that two people can't run the script
simultaneously, thereby corrupting the discussion in a room. If the
script encounters a problem before it finishes the lock file will be
left behind. This variable is the time in seconds that the script will
wait with the lock file present before proceeding. Leave it set to 5.
$max_mes = 40;
This is the maximum number of messages that can be displayed. It
is also the maximum number of messages that will be saved in a
room of personal file. The larger the number the more memory the
script will need to run (and hence a heavier load on the server) and
the larger the files.
$def_mes = 20;
This is the default number of messages to display. When somone
enters this will be the number of messages shown.
$all_nummes = "all";
This is the text people can type into the "Display [ ] messages"
input to see all messages for the room and their personal file.
$new_nummes = "new";
This is the text people can type into the "Display [ ] messages"
input to see only new messages. The script will then display
messages posted since their last reload. It will also display
messages of a certain age prior to the reload (as set in the next
variable).
$new_time = 120;
This is the time in seconds that already seen messages will be
shown if the user chooses to see only new messages (as outlined
above).
This concludes the setup instructions. By now you should have a
functioning and customized version of ChatPro on your server.
or virtually anything else you could imagine.
