Documentation
AUTOTHUMB:  V2.1


System Requirements

  • Perl 5
  • CJPEG, DJPEG, PNMSCALE (commonly found on most unix & linux platforms)

Preliminaries

  • Determine the path to PERL 5 on your web server host.  Note that some web hosting companies run both PERL 4 and PERL 5.  Make ABSOLUTELY sure you are not setting this up under PERL 4.  Ask your administrator if you are not sure.
  • Unpack the tar archive on your desktop using a program that unpacks UNIX TAR ARCHIVES. If you don't have such a program then download WINZIP FREE from SHAREWARE.COM
  • After you have unpacked the TAR archive you will have a collection of folders and files on your desktop.  Now you have to do some basic editing of each of these files (or at least some of them).  Use a text editor such as wordpad, notepad, BBEdit, simpletext, or teachtext to edit the files.  These are NOT WORD PROCESSOR DOCUMENTS they are just simple TEXT files so don't save them as word processor documents or save them with extentions such as .txt or they will NOT WORK.   Note that there may be a some files inside of folders which are "blank".   This is normal.

Preparing the CGI scripts

Define Path To PERL 5

The first step is to open up each and every file that has a .cgi extention and edit line number one of each script.  Each of the cgi scripts is written in perl 5. For your scripts to run they must know where perl 5 is installed on your web server. The path to perl 5 is defined to a cgi script in the first line of the file. In each of the cgi scripts the first line of code looks something like this:

#!/usr/bin/perl

If the path to perl 5 on your web server is different from /usr/bin/perl you must edit the first line of each cgi script to reflect the correct path. If the path to perl 5 is the same no changes are necessary. If you do not know the path to perl 5 ask the webmaster or system administrator at your server site.  

Configure autothumb.cgi

autothumb.cgi

This is the script that does everything.   Variables are explained below

  • $rooturl="/home/psybercore/superscripts.com/htdocs/test/autothumb/";
  • $hiddensubdirectorypath="/home/psybercore/superscripts.com/htdocs";
  • $rootphotodirectoryname = "pix";
  • $thumnaildirectoryname = "thumbs";
  • $xscale = "100";
  • $yscale = "100";
  • $tablewidth = "3";
  • $folderimageURI = "/test/autothumb/dir.gif";
  • $rootphotoURI = "/test/autothumb/pix";
  • $thumnailURI = "/test/autothumb/thumbs";
  • $customheaderhtml = "$rooturl/header.txt";
  • $customfooterhtml = "$rooturl/footer.txt";
  • $photofile = "$rooturl/images.txt";
  • $gifslog = "$rooturl/gifs.txt";
  • $jpgslog = "$rooturl/jpgs.txt";
  • $thumblist = "$rooturl/thumbs.txt";
  • $systemlog = "$rooturl/system.txt";
  • $htmllog = "$rooturl/html.txt";
  • $rooturl is the FULL PATH to the directory that contains autothumb.cgi
  • $hiddendirectorypath is the FULL PATH to your root html directory for your website
  • $rootphotodirectoryname is the name of your content folder (this folder may contain unlimited directories inside of it)
  • $thumnaildirectoryname is the name you want to use for the thumnail directory
  • $xscale affects the WIDTH of the thumbnail image
  • $yscale affects the HEIGHT of the thumbnail image
  • $tablewidth is the number of thumbnails WIDE you want your tables to be on the HTML output files
  • $folderimageURI is the RELATIVE URL to the dir.gif file included with the installation files
  • $rootphotoURI is the RELATIVE URL to the content directory
  • $thumnailURI is the RELATIVE URL to the thumbnail directory
  • $customheaderhtml is the FULL PATH to the header.txt file which contains the HTML for your custom headers for the HTML output
  • $customfooterhtml is the FULL PATH to the footer.txt file which contains the HTML for your custom footers for the HTML output
  • $photofile is the FULL PATH to the images.txt log which after execution contains the location of all your image files
  • $gifslog is the FULL PATH to the gifs.txt log which after execution contains the location of all your GIF files
  • $jpgslog is the FULL PATH to the jpgs.txt log which after execution contains the location of all your JPEG files
  • $thumblist is the FULL PATH to the thumbs.txt log which after execution contains the location of all your THUMBNAIL files
  • $systemlog is the FULL PATH to the systems.txt log which after execution contains a record of what happened during the execution of the script
  • $htmllog is the FULL PATH to the html.txt log which after execution contains the location of all your HTML directory browsing files

Uploading the Files

  • Upload all the files ONE DIRECTORY LEVEL outside of your content.  The spider seeks from this level UP.
  • Upload the dir.gif file so it matches the configuration of autothumb.cgi
  • Upload all the .txt files into the same directory as autothumb.cgi.  You can remove them after executing the script but will need them during the execution.
  • Chmod autothumb.cgi to 755 and all the other files to 666 or 777
  • Create your custom header.txt and footer.txt files with your own custom HTML
  • Exeute the autothumb.cgi script through telnet or from the browser
  • Check out the results and if you want to tweak the HTML for each page you can now easily import into frontpage since it is all interlinked
  • It is recommended that you REMOVE autothumb.cgi after you are satisfied with the results so nobody can screw with it.

More intense information