Kira's Simple Web Forums from CGI Programming 201 (http://www.cgi101.com/advanced) ----------------------------------------------------------------- Legal Stuff Written and copyright 2002 by Jacqueline D. Hamilton (kira@cgi101.com) You may use this code on your own website, however you may not publish or sell any copy or derivative work without permission of the author. If you didn't download this code from cgi101.com, please send mail to kira@cgi101.com with the URL of the site you downloaded it from. The author makes no expressed or implied warranty of any kind, and assumes no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising from the use of this software. This code is unsupported. If you have problems, buy the book, and/or visit our discussion board at http://www.cgi101.com/discuss/ for help. ----------------------------------------------------------------- Requirements You will need Perl, Unix, MySQL, and the Perl modules DBI.pm, CGI.pm, and HTML::TagFilter (all downloadable from http://search.cpan.org). If you aren't sure if these are already installed on your system, try doing 'perldoc modulename' to find out (e.g. 'perldoc HTML::TagFilter'). ----------------------------------------------------------------- Installing the forums 1. Be sure to chmod 755 all of the cgi programs. 2. Create a new MySQL database for your forums: mysqladmin -p create forumdb 3. Edit the MySQL privileges (or have your sysadmin do this) to create a new mysql user: mysql -p mysql insert into user(Host, User, Password) values ("localhost", "forumuser", password("forumpassword"); insert into db values("localhost", "forumname", "forumuser", "Y","Y","Y","Y","Y","Y","Y","Y","Y","Y"); flush privileges; quit 4. Create the MySQL tables by loading the enclosed sql file: mysql -u forumuser -p forumname < forumdbs.sql 5. Edit the configuration stuff below. ----------------------------------------------------------------- Customizing the forum code for your own site: 1. Edit MyBoard.pm and change the values for the configurable stuff - database name, db username and password, URL for your forum, and the name ($btitle) of your forum. If you want to change the look of your forum (page colors, background etc), you can also modify the do_header and do_footer subroutines. 2. cd to the admin directory. Edit .htaccess and change the path of AuthUserFile to the actual path of your .htpasswd file. 3. create a .htpasswd file in the admin directory: htpasswd -c .htpasswd yourusername 4. Log into the admin directory (using your web browser) and add one or more new forums. Now your forum should be ready to go.