Countex
########################################################
#                      Imagex 1.0                      #
#               By Thomas Tsoi 26.4.2001               #
#                    cgi@cgihk.com                     #
########################################################
#                                                      #
# CGIHK.com:                                           #
#   http://www.cgihk.com/                              #
# ThomasTsoi.com                                       #
#   http://www.ThomasTsoi.com                          #
# Winapi.com                                           #
#   http://www.winapi.com                              #
# Astronomy.org.hk                                     #
#   http://www.astronomy.org.hk/                       #
#                                                      #
# #################################################### #
#                                                      #
# You can distribute this script and use it freely as  #
# long as this header is not edited in the script.     #
#                                                      #
# #################################################### #
#                                                      #
#      Knowledge is worth a billion bucks              #
#        But it shouldn't cost you a single buck       #
#                                                      #
########################################################
Installing Imagex is easy.
Follow the following steps, you shouldn't get big troubles.

1. Have GD installed
- First of all, make sure you have the Perl package "GD" installed, otherwise the script won't work at all. If you are not sure what this means, consult your server admin.

2. Editing the path to Perl interpreter
- In the first line, you can see #!/usr/bin/perl, this is the location of the Perl interpreter, in most cases this needn't be changed. However if you are not sure what the location is, you can telnet to your server, type which perl and it will show you the path.

3. Editing options
The following are the options available in Imagex. Open imagex.cgi and edit them with your favourite text editor.

# Path to the HTML template
$template = './template.txt';

# Path to the directory containing all the images
$imagedir = '/virtual/lasalle.uhome.net/cgi-bin/imagex/images';

# Format of the table displaying thumbnails
# The value should be in the format of '(c)x(r)'
# where (c) is the number of colomns and (r) is that of rows.
# e.g. '5x4', '6x6', etc.
$format = '5x3';

# The maximum dimension of thumbnails, (width)x(height)
$dimension = '120x120';

# Default thumbnail format: jpeg or png
$thumbformat = "jpg"; # jpg recommended

# Parameters of the table containing thumbnails
# Set the values of parameters if you want
# Leave it blank if you just don't care
$table{'width'} = '';
$table{'height'} = '';
$table{'border'} = '1';
$table{'bordercolor'} = '#ffffff';
$table{'bgcolor'} = '#ddddff';
$table{'background'} = '';
$table{'cellspacing'} = '0';
$table{'cellpadding'} = '0';
$table{'align'} = 'center';

# Parameters of the font
# Leave it blank if you just don't care
$font{'face'} = 'Arial';
$font{'size'} = '2';
$font{'color'} = '#000000';

4. Setting permissions
Upload all the files. Set their permissions as shown below:

chmod 755 imagex.cgi

chmod 644 template.txt
           (all image files)


Copyright © 2001. All rights reserved.