MessageBoard.pl v1.2 Help File Copyright 2000 by Michael K. Goode Last Updated October 2000 You can find updates of this script and the help file at: http://www.mikegoode.com/web/scripts/ ******************************************************************************* This program is relatively easy to run. Here I explain the variables you need to configure in the script itself: $basedir='/data/domains/mikegoode.com/public_html'; --this is the absolute directory of your website. if you are on a virtual server, --your webhost should have provided you with this information. If not, you need to --find it out somehow. NO TRAILING SLASH $baseurl='http://www.mikegoode.com'; --this is the base URL of your website. It should be something like --http://www.yoursite.com or http://www.someplace.com/~yoursite/ --NO TRAILING SLASH @required=('realname','email'); --these are the sections that someone needs to fill out to post something --realname is their name, email is their email. You have either of those two, both, --or you can have neither required for completely anonymous posts. However, no --matter what is inputted by you here, a message is required. $program = 'http://www.mikegoode.com/cgi-bin/messageboard.pl'; --the URL location of this script $max_messages = '50'; --the maximum number of messages to be included on each page of the message board --this will also be the number of messages on a page in the archived pages $log = 'logfile.txt'; --enter name of log file (ex: logfile.txt) if you want to have a log. --If you do not want a log, leave as '' $bottom2 = 'bottom2.htm'; --if you want to print something below the archived message links, put it in a file --called bottom2.htm; if you dont, leave as '' ************************************************************************ After you have configured the variables, make sure the extension of the program is .pl or .cgi, then upload the script to your server's cgi-bin, and chmod it to world executable. You then must edit your html templates to the design that fits your site. you must keep the names top.htm and bottom.htm, whereas bottom2.htm is optional to use. Even if you use a wysiwig html editor, you must manually edit the html code of the bottom.htm, and change this line: change the value to the relative location of your messageboard directory from your main directory. For example, one of my messageboards is at www.mikegoode.com/messageboard/; so for that the value would be 'messageboard' if your messsageboard is at www.yoursite.com/misc/stuff/messageboard/, it would be 'misc/stuff/messageboard' Then upload all the html files to the directory that you want them to be in. I seriously recommend keeping them in a seperate 'messageboard' directory. Then, chmod that directory to world writeable. Then, you are all ready to use your new messageboard. Link to it like this: http://www.yoursite.com/path to messageboard.pl?path to messageboard directory for example, on my site, with my messageboard.pl program at www.mikegoode.com/cgi-bin/messageboard.pl and the path to one of my messageboard directories is www.mikegoode.com/web/scripts/messageboard so to link to the program, it would be www.mikegoode.com/cgi-bin/messageboard.pl?web/scripts/messageboard if you have multiple messageboards on your site, use just one script, but have multiple messageboard directories with the html files in them and just link to the program with the different paths in the query string (the stuff after the '?') ***************************************************************** Problems with running the program ***************************************************************** Problems: 1. Program will not run -- says "you do not have permission to access /cgi-bin/" or something like that -- you need to chmod the program to world executeable 2. Pretty much the only other problems you could have are if the $basedir or $baseurl are set wrong, or if the messageboard directory is not chmoded to world writeable, or if the 'board_directory' hidden input in the html form is not set right. --If the $basedir or $baseurl are set wrong, you will usually get an error message that says something like "cannot chdir to . . ." You will also get the same type of error message if the 'board_directory' input is set wrong, or you call the program with the wrong path the the messageboard directory in the query string --If the error message mentions something about being unable to open or create a file, you probably need to chmod the messageboard directory to world writeable 3. Also, if your server is running a brain-damage OS, such as anything by Microsoft, this program may not run. Sorry. Get UNIX or LINUX. 4. As an addendum to #3, this program requires little modification to work on Windows servers. The only thing I've had a problem with is having to hard code a chdir to the working directory at the beginning of the program. ************************************************************* As with all my programs, feel free to change the html look of the program, or anything else.