AGIS (A Great Image Server) Version 1 Setup Guide.
©2003 Justin M. Clark
We do not permit you to edit, reconfigure, or re-engineer this script in any other way than the following fields below. We do offer custom versions of this script, if there is an option that you see missing, or would like to change something, please contact us first at Perl @ MyDesktopHelp.Com   If you have edited the script and it no longer works, we will look over the script and troubleshoot it for free as long as we are only making sure that your values are set correctly. However if we have to edit or reconfigure any other part of the script (unless it is an original error in the script) it will be at a rate of $40/hour in one hour increments. The first hour will be paid before any services are rendered.

Requirements:

AGIS requires very little setup and configuration. AGIS requires Perl 5 to be installed on the server.

Setup:

There are 10 settings that need to be configured in the script. First open the script in notepad or wordpad and make sure that word wrap is turned off, then configure the following settings:
All values must be surrounded by quotation marks unless otherwise noted.
All real paths must use "/" instead of "\" for example, if you use "c:\data" instead of "c:/data" the program will not work. Also, please do not enter "/" after any path. And All fields need to be defined unless otherwise specified.

$templatefile = "c:/path/web/template.htm";
Absolute Path to your template file

$topdir = "c:/path/web/images";
Absolute Path to the directory where categories and images will be created. This directory must have "change" or read-write-execute-delete access for everyone. If you find that your images will not upload or you cannot create  categories permissions or incorrect paths are most likely your problem.

$imageweb = "http://yoursite/images";
URL To the path above

$prog = "http://yoursite/cgi-bin/agis.pl"
URL to this script

$admindir = "c:/path/private";
#Absolute path to your admin directory. This directory must also have change or read-write-execute-delete access for everyone. However, it should not be a path that is accessible from the web as someone could just open up the text file your password is stored in and delete all images and categories.

$TempFile::TMPDIRECTORY='c:/path/web/images';
#Most servers done have everyone write permission to the temp directory so set this to the same as your $topdir variable since you have already setup the correct permissions. When one of the images is uploaded it will create a temp file in this directory just long enough to get the whole file uploaded then the file will be deleted. If you find that there are files being left in there such as CGITEMP234234 it is because everyone doesn't have delete permissions to this folder.

$cattext = "<h2>Select the Category of images you would like to view.</h2>";
#HTML to appear at the top of each category page

$comptext = "<h2>Select the Subcategory of images that you would like to view</h2>";
#HTML to appear at the top of each subcategory page

$cols = 3;
#How many columns to display in the table on the category
and subcategory pages

$imagecols = 1;
#How many columns to display in the table on the images page
under each subcategory
 

Template File Instructions

Creating the template file is the easiest part of the whole setup. All you need to do is take one of your current web files (i.e. html asp etc) and remove everything except what you want to see on every page. For example, leave your navigation bars, banner ads, background colors, style sheets, etc. Where ever on the newly created template page you would like the output of this cgi simply type <--imagepage--> and the cgi will replace that string with the tables, images, text etc dynamically created by the script. We decided to add this function to the script so that you could incorporate the script into your site to make it look "EXACTLY" like your site, not just have the same colors etc. Now each and every site that uses this script will look like it was designed exactly for that site. No two scripts will ever look the same! If you redesign your site, just dump a new template file and everything is fine. Example is below:

<html>
<head>
<title>My Sites Images</title>
<link rel="stylesheet" type="text/css" href="../style.css">
</head>
<body background="background.jpg">
<p align="center"><a href="yoursite.com/default.htm">Home</a> -
<a href="yoursite.com/cgi-bin/images.pl">Pics</a> -
<a href="yoursite.com/contact.htm">Contact</a> -
<a href="yoursite.com/aboutus.htm">About Us</a></p>

<--imagepage-->


</body>
</html>

The above example would allow every page displayed by agis.pl
to have the "My Sites Images" title, have a cascading style
sheet of style.css and have navigation hyperlinks across the
top with a background image of background.jpg

AGIS Administration


In order to reach the administration section you must call the script with an ?imageadmin arguement. For example, open http://www.somesite.com/cgi-bin/images.pl?imageadmin. The first time you visit this page you will be prompted to create a password.  Once you have created a password and logged in you must proceed to create your categories, subcategories and upload images.

In this explanation I will use a furniture store for example.

The top categories you would want to create would be bedding, entertainment systems, living rooms, etc. Under each of those categories you would want to create companies for each parent category, for example, Bobs furniture, Johns Chairs, etc. Optionally, if one of the companies has a website you can supply a link that will appear at the top of the images page. Once you have the above created you can begin uploading images. Simply click the browse button on the upload images form and find the image that you would like to upload in jpg, gif or png format. You may also supply a description for each picture. If you do not supply a description a default "no description available" text will be displayed next to the image.

If you would only like to use one category, for instance if the only category you had was "Dogs" and the subcategories were different breeds of dogs. Instead of linking directly to the images.pl url link to images.pl?cat=dogs. However, if your category is two words separated by spaces make sure you replace the space with a - in the url. For instance if the category you were linking to was "large breed dogs" the link you would supply would be images.pl?cat=large-breed-dogs