G. Marston (Your ASP Associate)

Home

Email

Purchase Gallery Plus

Download Gallery Basic

See Basic Demo

See Plus Demo

README.HTM for
Gallery Basic and Gallery Plus

Contents

Requirements
How to setup on your website
Additional setup options
Database fields for table "gallery"
Database fields for table "category" (Gallery Plus ONLY)
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 GALLERB.ZIP (or GALLERYP.ZIP for Plus) from the website
2. unzip the file GALLERB.ZIP (or GALLERYP.ZIP). The following files should be included:

README.HTM
DEFAULT.ASP
DISPIMAG.ASP
SUBMSEAR.ASP
GLOBVARS.ASP
DETEPAGE.ASP
COMMFUNC.ASP
IMGSZ.ASP
GALLERYB.MDB (or GALLERYP.MDB for Plus) (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 GALLERYB.MDB (or GALLERYP.MDB for Plus).
6. upload GALLERYB.MDB (or GALLERYP.MDB for Plus) 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 GALLERYB.MDB (or GALLERYP.MDB for Plus) 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 GALLERYB.MDB (or GALLERYP.MDB for Plus) 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 GALLERYB.MDB (or GALLERYP.MDB for Plus) 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 GALLERYB.MDB (or GALLERYP.MDB for Plus) 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 GALLERYB.MDB (or GALLERYP.MDB for Plus).

a. from the website change the name of GALLERYB.MDB (or GALLERYP.MDB for Plus) 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 gallery. (see Global variable definitions below).

Database Fields for Table "gallery"

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.
a. If the image is in the same folder as the ASP files then this value can be the name only (i.e. "everest.jpg").
b. If the image is in another folder within your website then you need the relative path and name of the image (i.e. "images/everest.jpg" or "../images/everest.jpg").
c. (
Gallery Plus ONLY) If the image is on another website then include the full URL and image name (i.e. "http://www.website.com/images/everest.jpg"). If you use the full URL for Gallery Basic you will get an error message "Image on different server." for that image.

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.
a. If the image is in the same folder as the ASP files then this value can be the name only (i.e. "everest_sm.jpg").
b. If the 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").
c. (
Gallery Plus ONLY) If the image is on another website then include the full URL and image name (i.e. "http://www.website.com/images/everest_sm.jpg"). If you use the full URL for Gallery Basic you will get an error message "Image on different server." for that image.

ImagCat1 (Gallery Plus ONLY)
Image Category 1 is the first possible category to place this image. The text should be, character for character, upper and lower case, exactly as input in the table "category" CateText field. If it does not match a category in the table the image will never be displayed as part that category. Can be a NULL value.

ImagCat2 (Gallery Plus ONLY)
Image Category 2 is the second possible category to place this image. The text should be, character for character, upper and lower case, exactly as input in the table "category" CateText field. If it does not match a category in the table the image will never be displayed as part that category. Can be a NULL value.

ImagCat3 (Gallery Plus ONLY)
Image Category 3 is the third possible category to place this image. The text should be, character for character, upper and lower case, exactly as input in the table "category" CateText field. If it does not match a category in the table the image will never be displayed as part that category. Can be a NULL value.

Database Fields for Table "category" (Gallery Plus ONLY)

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

CateText (Gallery Plus ONLY)
Category Text is the text name for each category you wish to use. It is recommended that the first category is "All". "All" (it must be exactly spelled this way) gives your users the ability to view and search all images in the database. Of course if you do not want "All" just do not include it in this table. Can NOT be a NULL value.

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/galleryb.mdb", "data/_private/galleryb.mdb"... If Dsn_LessConn=0 (
Gallery Plus ONLY) then you do not need the path, but just need the DSN name (i.e. "galleryb").

Dsn_LessConn (Gallery Plus ONLY)
"DSN Less Connection" is used to specify the type of connection for the gallery database. If set to 1 "DataPathName" should include the relative path and name of the database file. If set to 0 then "DataPathName" should be just the DSN file name. Set to 0 or 1.

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 (Gallery Plus ONLY)
"Number images per page" represents the numberof images which are displayed on a page. This value can be anything greater than 1.

NumbImagRow_ (Gallery Plus ONLY)
"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 (Gallery Plus ONLY)
"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 (Gallery Plus ONLY)
"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 (Gallery Plus ONLY)
"Image title size" is the font size for displaying title text. The larger the number the larger the characters.

ImagTitlFace (Gallery Plus ONLY)
"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 (Gallery Plus ONLY)
"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 (Gallery Plus ONLY)
"Image description size" is the font size for displaying description text. The larger the number the larger the characters.

ImagDescFace (Gallery Plus ONLY)
"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 (Gallery Plus ONLY)
"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 AND the imagename (ImagName) is on the same server or website as the ASP code. In this case ASP-Gallery will automatically reduce the image size to this percentage. Remember, not having thumbnail files could drastically slow down the server response time when viewing the image pages. The default value is 33%.

ThumWidtSize (Gallery Plus ONLY)
"Thumbnail width size" is only used if EnabThumNail=1 AND an image record does not list a thumbnail file AND the image name (ImagName) is on a different server or website from the ASP code. In this case ASP-Gallery will use the big image and reduce the size to ThumWidtSize and ThumHeigSize. Remember, not having thumbnail files could drastically slow down the server response time when viewing the image pages. This value is the pixel size and should be an appropriate number.

ThumHeigSize (Gallery Plus ONLY)
"Thumbnail height size" is only used if EnabThumNail=1 AND an image record does not list a thumbnail file AND the image name (ImagName) is on a different server or website then the ASP code. In this case ASP-Gallery will use the big image and reduce the size to ThumWidtSize and ThumHeigSize. Remember, not having thumbnail files could drastically slow down the server response time when viewing the image pages. This value is the pixel size and should be an appropriate number.

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

NumbSpacBetw
"Number spaces between images" 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.