G. Marston (Your ASP Associate)

Home

Email

Download File

See Demo

README.HTM for ASP-Gallery V1.0

Contents

Requirements
How to setup on your website
Additional setup options
Database fields for GALLERY.MDB
Global variable definitions
Naming conventions
Creating a child web

Requirements

NT/IIS or Win 2000/IIS on the server
Any web browser software on the client
MS Access on a local computer

How to setup on your website

1. download the file GALLER10.ZIP from the website
2. unzip the file GALLER10.ZIP. The following files should be included:

README.HTM
DEFAULT.ASP
DISPIMAG.ASP
SUBMSEAR.ASP
GLOBVARS.ASP
DETEPAGE.ASP
COMMFUNC.ASP
GALLERY.MDB (2 records)
WINE.JPG
WINE_SM.JPG

3. create a new folder on your website for the gallery pages (i.e. "/gallery")
4. upload all .ASP and .JPG files to this new folder
5. create a child web (see below) using frontpage. This child web will be used to store the gallery database GALLERY.MDB.
6. upload GALLERY.MDB to the "_private" folder of this new child web.
7. In Frontpage Explorer go to Tools | Permissions, then go to the "Groups" folder, edit "Everyone" to make the permissions "Author and browse." This is important to be able to update the database via your website using ASP-DataAdmin or equivalent.
8. change the "DataPathName" (GLOBVARS.ASP) variable to reflect where the database is located. (See Global variable definitions below)

Additional Setup Options

1. Add a new image for display.

a. use Microsoft Access (on local computer) to open the database and add a new record for the image. See Database fields for GALLERY.MDB for more details.
b. use an image edit software (i.e. Image Composer or Photoshop) to create a thumbnail of the original image. Skip this step if you are not going to use thumbnails for the image.
c. upload the new image and thumbnail image to the correct folder on your website. This folder should reflect the entry in GALLERY.MDB in the fields ImagName and ThumName.
d. Run ASP-Gallery on the web to see you new image.

2. Change the database password.

a. using Microsoft Access (on local computer) open the database GALLERY.MDB using the "exclusive" setting (initial password is "aspgallery")
b. using the "Security" option change the password from "aspgallery" to ______. Letter case is important.
c. upload GALLERYRY.MDB to the child website "_private" folder you created above.
d. change "DataPassWord" (GLOBVARS.ASP) to _______ (from above).

3. Change the name of the database file GALLERY.MDB.

a. from the website change the name of GALLERY.MDB to another name (keeping the extension .MDB).
b. change "DataPathName" (GLOBVARS.ASP) value to reflect the new database name.

4. Edit GLOBVARS.ASP for other options to change the look of the galler. (see Global variable definitions below).

Database Fields for GALLERY.MDB

AutoNumb
This is the auto increment/unique field for the database. You should never have to alter this value.

ImagName
Path and name of image. If the image is in the same folder as the ASP files then this value can be the name only (i.e. "everest.jpg"). If the image is in another folder with your website then you need the relative path and name of the image (i.e. "images/everest.jpg" or "../images/everest.jpg"). If the image is on another website then include the full URL and image name (i.e. "http://www.website.com/images/everest.jpg").

ImagTitl
Image Title is the text title for that image. If DispImagTitl <> 0 then this text will be displayed above the image. Can be a NULL value.

ImagDesc
Image Description is the text description for that image. If DispImagDesc <> 0 then this text will be displayed below the image. Can be a NULL value.

ThumName
Path and name of thumbnail image. If there is no thumbnail image leave this empty (NULL)! Any other value and the web page will attempt to display the image. If the thumbnail image is in the same folder as the ASP files then this value can be the name only (i.e. "everest_sm.jpg"). If the thunbnail image is in another folder within your website then you need the relative path and name of the image (i.e. "images/everest_sm.jpg" or "../images/everest_sm.jpg"). If the thumbnail image is on another website then include the full URL and image name (i.e. "http://www.website.com/images/everest_sm.jpg").

Global variable definitions

DataPathName
"Database path and name" details where the discussion database is located in relation to the gallery .asp files (where .ASP files are located). Examples are "../_private/gallery.mdb", "data/_private/gallery.mdb"...

DataUserIden
"Database user identification name" is the name used to open a connection to the discussion database. If you change this value via Access be sure to update the GLOBVARS.ASP file.

DataPassWord
"Database password" is the password used to open a conncection to the gallery database. See Additonal Setup Options. It is "aspgallery" as the default.

NumbImagPage
"Number images per page" represents the numberof images which are displayed on a page. This value can be anything greater than 1.

NumbImagRow_
"Number images per row" represents the numberof images which are displayed on each row on the default.asp page. This value can be anything greater than 1.

DispImagTitl
"Display Image Title" represents whether or not you want to display the title text from the database when displaying the image. This is only applicable to DISPIMAG.ASP. Set to 1 or 0.

DispImagDesc
"Display Image Description" represents whether or not you want to display the description text from the database when displaying the image. This is only applicable to DISPIMAG.ASP. Set to 1 or 0.

ImagTitlSize
"Image title size" is the font size for displaying title text. The larger the number the larger the characters.

ImagTitlFace
"Image title face" is the font face for displaying image title text. This should always be a recognized face name such as "arial", "verdana", "times roman new", "courier new", etc. Use FrontPage to see a complete list of font faces.

ImagTitlColo
"Image title color" is the font color for displaying the title text. Some values are:
Blue="#0000FF"; Red="#FF0000"; Green="#008000"; Yellow="#FFFF00"; Black="#0000000"; Teal="#00FFFF"; Gray="#408080"

ImagDescSize
"Image description size" is the font size for displaying description text. The larger the number the larger the characters.

ImagDescFace
"Image description face" is the font face for displaying image description text. This should always be a recognized face name such as "arial", "verdana", "times roman new", "courier new", etc. Use FrontPage to see a complete list of font faces.

ImagDescColo
"Image description color" is the font color for displaying the description text. Some values are:
Blue="#0000FF"; Red="#FF0000"; Green="#008000"; Yellow="#FFFF00"; Black="#0000000"; Teal="#00FFFF"; Gray="#408080".

EnabThumNail
"Enable thumbnails" represents whether or not you want to display thumbnails on the main page. If set to 0 then no thumbnails are displayed. Set to 1 or 0.

EnabSearFeat
"Enable search feature" represents whether or not you want to include the search feature in your image gallery. The search form will not be displayed if this is set to 0. Set to 1 or 0.

ThumPercSize
"Thumbnail percentage size" is used if EnabThumNail=1 and an image record does not list a thumbnail file. In this case ASP-Gallery will automatically reduce the image size to this percentage. Set to 1 or 0. Remember, not having thumbnails files could drastically slow down the server response time when viewing the image pages.

ImagBordThic
"Image border thickness" represents the border thickness for each image. If you do not want a border set this value to 0.

NumbSpacBetw
"Number spaces between image" represents how many character spaces you want between each image in the main page. The default is 3. This value should be a value greater than 0.

Naming Conventions

1. General. I believe the first four characters of most words are usually descriptive enough to remind the reader what a word is when used in variable names. Therefore, I use this "four-character" rule for file, function, and variable names for three reasons. One, it creates a consistent naming convention. Two, it usually gives enough information to suggest to the reader what the name means. Three, it helps reduce the size of .ASP files.

2. File Names. ASP files are named using four-character rule of the most two descriptive words I can come up with for that file. i.e.
insemess.asp is "Insert Message"
dispthre.asp is "Display Thread"
commfunc.asp is "Common Functions.

3. Function Names. Again I use the four-character rule of the 2-3 most descriptive words for the function with a '_' between each word. i.e.
open_data() is "Open Database"
upda_info() is "Update Info Table"
save_emai_addr() is "Save Email Address".

4. Global or Public Variable Names. Global variables use the four-character rule with the first character of each four letters in upper case. i.e.
SearStri is "Search string"
PageNumb is "Page Number"
AutoNumb is "Auto Number"
Conn is "Connection"

5. Local or Function Variable Names. Local variables can and should be treated differently because they are used in a relatively small section of code. Therefore, if they are appropriately defined (or the definition is obvious), then it is not important to have a long descriptive name. As such, all local and function variables are restricted to one or two characters and are always lower case. The letter may signify the beginning of a descriptive word but do not always. Another benefit of this approach is that there should never be a conflict with global and local variables..

Create a child web

1. Open your root web in FrontPage Explorer.
2. Create a new folder using the name you want for you child web.
3. Click on "File, New FrontPage Web".
4. Select from Wizard or Template: "Empty Web."
5. Give it a title with the same name and case of the sub folder you created from 2 above. i.e. "disc", "images"...
6. Make sure server path is correct. i.e. "www.domain.com." This does not include the folder name.
7. Make sure "Add to Existing Web" is unchecked.
8. Click OK.