home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 18 / amigaformatcd18.iso / +look_here_1st!+ / af_on_the_web / websites / weirdscience / weird-cgi / picframe.txt < prev    next >
Text File  |  1997-06-16  |  5KB  |  137 lines

  1. ######################################
  2. #
  3. # Picture Frame 1.0 README FILE
  4. # Written for the Web Page for Brian Wilson
  5. # by Mike Wheeler
  6. # mwheeler@gladstone.uoregon.edu
  7. #
  8. # Copyright 1996, Mike Wheeler, All Rights Reserved
  9. #
  10. ######################################
  11.  
  12. Picture Frame is a script for displaying a series of thumbnail images 
  13. in tables and then linking those images to full size versions of the 
  14. images. It can display captions associated with the thumbnail images to
  15. clarify what the image is or the size of the larger image. The larger
  16. images will be displayed on an html page made by the script that has a
  17. standard header and footer for every image, so it appears as if each 
  18. image has it's own html page when in reality it's all contained within 
  19. the script. 
  20.  
  21. This script is provided free of charge, though I will accept anything 
  22. you care to offer for it. My address is:
  23.    Mike Wheeler
  24.    844 Mill St. Apt L
  25.    Springfield, OR
  26.          97477   USA
  27.  
  28. This script consists of two files:
  29.  
  30.    picture_frame.pl : the actual script.
  31.  
  32.    README : this file which helps you set things up.
  33.    
  34. Let's get down to business:
  35.  
  36. First of all you must put the script in your cgi-bin directory or if
  37. your server allows it anywhere else in your area (if you place it
  38. elsewhere you will likely need to call it "picture_frame.cgi"). Then 
  39. you need to set the permissions for the script:
  40.  
  41.      chmod 755 picture_frame.pl
  42.        or
  43.      chmod 755 picture_frame.cgi
  44.        depending on the name.
  45.  
  46. Setting the variables:
  47.  
  48. #!/usr/local/bin/perl
  49.    This is on the very first line of the script and must point to where
  50.    Perl is on your server. Another common place for it is #!/usr/bin/perl
  51.    If you don't know where Perl is on your server type "whereis perl" at
  52.    a UNIX prompt.
  53.  
  54.  
  55. $title = "Brian Wilson Photo Gallery";
  56.    This is the title of your images page. It will be within the <title>
  57.    tags of the pages made by this script and nowhere else.
  58.  
  59. $bgcolor = "ffffff";
  60.    This is the background color for the pages this script creates. These
  61.    should follow hex numbers for colors. ffffff is white. With some
  62.    browsers you can giver literal color names like white but not all 
  63.    browsers will understand this.
  64.  
  65. $border = "6";
  66.    This is the size of the border you want around the large images. Set it
  67.    to 0 if you don't want any border.
  68.    
  69. $dir_url = "http://gladstone.uoregon.edu/~mwheeler/bb_pics";
  70.    This is the url to the directory where the full size images are. If this
  71.    is set incorrectly the large images will not be displayed.
  72.  
  73. $tn_dir_url = "http://gladstone.uoregon.edu/~mwheeler/bb_pics/tn";
  74.    This is the url to the directory where the thumbnail images are.
  75.    The thumbnail images MUST have the same name as the full size images 
  76.    or else none of the links will work.
  77.  
  78. $tn_dir = "/ccserver/home23/mwheeler/public_html/bb_pics/tn";
  79.    This is the full path to the directory where the thumbnail images are. 
  80.  
  81. $caption_file = "/ccserver/home23/mwheeler/public_html/cgi/picture_frame/captions";
  82.    This is the full path (including the file name to the captions 
  83.    file) of the caption file if you choose to use one. Only images 
  84.    in the caption file will be displayed. If you don't want captions 
  85.    leave this blank, and the script will display every image in the 
  86.    $tn_dir and none will have captions. The caption file must follow 
  87.    this format:
  88.    
  89.    image_1.gif:This is a picture of my friend Joe
  90.    photo.jpg:This is me when I went to Hawaii
  91.    
  92.    In other words, the file name, a colon ":" and then the caption. 
  93.    You may want to include the size of the full image in k in the
  94.    caption.
  95.    
  96.  
  97. $script_name = "picture_frame.cgi";
  98.    This is the script name, as you have it on your server. It might
  99.    be picture_frame.pl or picture_frame.cgi or whatever else you named
  100.    the script.
  101.  
  102. $header = <<EOM;
  103. <!-- begin header -->
  104. <center><h1>Web Page for Brian Wilson</h1>
  105. <h2>Photo Gallery</h2>
  106. You can put whatever you want here, graphics, links, text, anything!
  107. </center>
  108. <!-- end header -->
  109. EOM
  110. 1;
  111.  
  112.    This is where you put the html that goes in the header. Everything MUST
  113.    be after <!-- begin header --> and before <!-- end header --> You DO NOT
  114.    need to put a backslash (\) before quotation marks or @ symbols as you
  115.    usually do in Perl (though things will work fine if you do put a backslash 
  116.    in).
  117.  
  118. $footer = <<EOM;
  119. <!-- begin footer -->
  120. You can put whatever you want here, graphics, links, text, anything!<p>
  121. Return to Brian Wilson <a href="$script_name"> Photo Gallery</a><p>
  122. Return to the <a
  123. href="http://gladstone.uoregon.edu/~mwheeler/beach_boys2.html">Web Page
  124. for Brian Wilson</a><p>
  125.  
  126. <!-- end footer -->
  127. EOM
  128. 1;
  129.    This is where you put the html that goes in the footer. Everything MUST
  130.    be after <!-- begin footer --> and before <!-- end footer --> You DO NOT
  131.    need to put a backslash (\) before quotation marks or @ symbols as you
  132.    usually do in Perl (though things will work fine if you do put a backslash 
  133.    in). 
  134.  
  135. That's all you need to do, now just add a link to this script from wherever 
  136. you want and it should do its thing.
  137.