######################################
#
# Picture Frame 1.0 README FILE
# Written for the Web Page for Brian Wilson
# by Mike Wheeler
# mwheeler@gladstone.uoregon.edu
#
# Copyright 1996, Mike Wheeler, All Rights Reserved
#
######################################

Picture Frame is a script for displaying a series of thumbnail images 
in tables and then linking those images to full size versions of the 
images. It can display captions associated with the thumbnail images to
clarify what the image is or the size of the larger image. The larger
images will be displayed on an html page made by the script that has a
standard header and footer for every image, so it appears as if each 
image has it's own html page when in reality it's all contained within 
the script. 

This script is provided free of charge, though I will accept anything 
you care to offer for it. My address is:
   Mike Wheeler
   844 Mill St. Apt L
   Springfield, OR
         97477   USA

This script consists of two files:

   picture_frame.pl : the actual script.

   README : this file which helps you set things up.
   
Let's get down to business:

First of all you must put the script in your cgi-bin directory or if
your server allows it anywhere else in your area (if you place it
elsewhere you will likely need to call it "picture_frame.cgi"). Then 
you need to set the permissions for the script:

     chmod 755 picture_frame.pl
       or
     chmod 755 picture_frame.cgi
       depending on the name.

Setting the variables:

#!/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.


$title = "Brian Wilson Photo Gallery";
   This is the title of your images page. It will be within the <title>
   tags of the pages made by this script and nowhere else.

$bgcolor = "ffffff";
   This is the background color for the pages this script creates. These
   should follow hex numbers for colors. ffffff is white. With some
   browsers you can giver literal color names like white but not all 
   browsers will understand this.

$border = "6";
   This is the size of the border you want around the large images. Set it
   to 0 if you don't want any border.
   
$dir_url = "http://gladstone.uoregon.edu/~mwheeler/bb_pics";
   This is the url to the directory where the full size images are. If this
   is set incorrectly the large images will not be displayed.

$tn_dir_url = "http://gladstone.uoregon.edu/~mwheeler/bb_pics/tn";
   This is the url to the directory where the thumbnail images are.
   The thumbnail images MUST have the same name as the full size images 
   or else none of the links will work.

$tn_dir = "/ccserver/home23/mwheeler/public_html/bb_pics/tn";
   This is the full path to the directory where the thumbnail images are. 

$caption_file = "/ccserver/home23/mwheeler/public_html/cgi/picture_frame/captions";
   This is the full path (including the file name to the captions 
   file) of the caption file if you choose to use one. Only images 
   in the caption file will be displayed. If you don't want captions 
   leave this blank, and the script will display every image in the 
   $tn_dir and none will have captions. The caption file must follow 
   this format:
   
   image_1.gif:This is a picture of my friend Joe
   photo.jpg:This is me when I went to Hawaii
   
   In other words, the file name, a colon ":" and then the caption. 
   You may want to include the size of the full image in k in the
   caption.
   

$script_name = "picture_frame.cgi";
   This is the script name, as you have it on your server. It might
   be picture_frame.pl or picture_frame.cgi or whatever else you named
   the script.

$header = <<EOM;
<!-- begin header -->
<center><h1>Web Page for Brian Wilson</h1>
<h2>Photo Gallery</h2>
You can put whatever you want here, graphics, links, text, anything!
</center>
<!-- end header -->
EOM
1;

   This is where you put the html that goes in the header. Everything MUST
   be after <!-- begin header --> and before <!-- end header --> You DO NOT
   need to put a backslash (\) before quotation marks or @ symbols as you
   usually do in Perl (though things will work fine if you do put a backslash 
   in).

$footer = <<EOM;
<!-- begin footer -->
You can put whatever you want here, graphics, links, text, anything!<p>
Return to Brian Wilson <a href="$script_name"> Photo Gallery</a><p>
Return to the <a
href="http://gladstone.uoregon.edu/~mwheeler/beach_boys2.html">Web Page
for Brian Wilson</a><p>

<!-- end footer -->
EOM
1;
   This is where you put the html that goes in the footer. Everything MUST
   be after <!-- begin footer --> and before <!-- end footer --> You DO NOT
   need to put a backslash (\) before quotation marks or @ symbols as you
   usually do in Perl (though things will work fine if you do put a backslash 
   in). 

That's all you need to do, now just add a link to this script from wherever 
you want and it should do its thing.
