# Perl/Mysql Based Slide Show Program # Version 1.0 # README File # By Mike Calabrese # http://www.mikecalabrese.com # 10-25-2003 # This program is available for free on an AS-IS basis. I am not # responsible for consequential damages, loss of income or whatever # else that may happen as a result of the use of this program. Please note that some images on the internet are copyrighted and should not be shown through this viewer without obtaining permission from the owner. This program is an image viewer using the Perl scripting language and a MySQL database. You can view images from your web site or from all over the internet using this viewer. The viewer has a manual as well as an automatic mode. PLEASE NOTE- You must have Perl 5 or newer AND MySQL 3.23 or newer installed and running on your web server in order for these scripts to work. As far as particular questions about Mysql are concerned I would recommend the book: MySQL by Paul DuBois The way the application works is that the viewer always starts with the first image and, if the manual mode is selected, shows a different picture in sequential order. If the auto mode is chosen, a different random picture is chosen each time. The user can switch between manual and auto mode as well as exit the program at any time. The following configuration changes need to be made in order to successfully run this program: 1) Within your MySQL database create a table called slide_show with the following attributes: +------------------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+------------------+------+-----+---------+----------------+ | reference_number | int(10) unsigned | | PRI | NULL | auto_increment | | image_url | varchar(255) | YES | | NULL | | | description | varchar(255) | YES | | NULL | | +------------------+------------------+------+-----+---------+----------------+ The reference numbers should start at 1 and be sequential. The image url should be the exact image url along with alt/title tags to the image that you want to view. Use 'single quotes' for the url, alt and title tags since MySQL requires "double quotes" around the elements. The description gets placed below the image on the resulting HTML forms and can be whatever you like. You can also customize the font and size of the description within the 2 forms. You should load 5 or 10 images intitially to test the app. Then load as many as you want afterwards. 2) Within your cgi-bin directory on your web server, create a directory called slide_show. Chmod that directory to 755. You can obtain the files auto_slide_show.pl and manual_slide_show.pl from the website mikecalabrese.com either via email or by cutting and pasting the code. Place these files in the directory slide_show that you just created. Chmod the Perl scripts to 755. Within manual_slide_show.pl, make the following configuration changes: Line 70: Change 'yourdatabasename' to the name of your database. If your MySQL database is on the same machine as your webserver, leave the location as 'localhost'. If the database is on another machine, replace 'localhost' with the path to that machine. Line 71: Change 'yourusername' with your MySQL login name. Line 72: Change 'yourpassword' to your MySQL password. Within auto_slide_show.pl, make the following configuration changes: Line 34: Change 'yourdomain' to the name of your domain for the HTML redirect. Line 46: Change 'yourdatabasename' to the name of your database. If your MySQL database is on the same machine as your webserver, leave the location as 'localhost'. If the database is on another machine, replace 'localhost' with the path to that machine. Line 47: Change 'yourusername' with your MySQL login name. Line 48: Change 'yourpassword' to your MySQL password. If the directory paths are correct within the Perl scripts and the images are correctly referenced within the MySQL database, you should be viewing these images with no problem through the viewer.