Image Class Interface Customization

Common Customizations

Version 2 of Image Class supports interface customization through 6 methods. Of these, only the Collection Database Customizations are required. Unlike version 1 of the Image Class, many collections specific customizations may be done in the colldb, and without creating collections specific templates. It is anticipated that this will be a great time saver.

  1. Collection Database Customizations
  2. Banner Text/Graphic Customization
  3. Cascading Style Sheet (CSS) Customization
  4. HTML Template Customization
  5. Javascript Customization
  6. Processing Instructions Customization

It is possible to have cross collection interface files (banner graphics, css, templates, javascript) and collection specific interface files. Cross collection interface files are provided with Image Class.

The methods above may be used independently. For example, you can customize the CSS for an individual collection without creating custom template files, etc.

Cross collection interface files are by default located in the following directories. The location may be modified in the /DLXSROOT/cgi/i/image/imageclass.cfg file.

Collection specific interface files may be created at /DLXSROOT/web/c/coll.

In general, if a collection specific interface file is not found by the middleware, the cross collection interface file is used.

Customizations in the Collection Database (colldb)

The collection database provides a great way to implement a collection in a customized fashion without much work. The most essential collection specific interface variables are customizable in the colldb. A few examples are:

There is only one colldb, located at /DLXSROOT/obj/i/image/lib/db/colldb. Some of the colldb columns have cross collection counterparts in the /DLXSROOT/cgi/i/image/imageclass.cfg file. See the colldb documentation for more info.

Banner Text/Graphic Customization

This is the most basic customization that may be made. Modify the $gBanner global variable in the /DLXSROOT/cgi/i/image/imageclass.cfg file to change the banner text or graphic for the cross collection templates. Modify the banner column of the colldb for collection specific customization.

Cascading Style Sheet (CSS) Customization

Modify the cross collection CSS file directly, or for collection specific customization create /DLXSROOT/web/c/coll/css and copy an existing CSS to this location and modify it.

The default Image Class cross collection templates use javascript within the templates to support separate style sheets for Navigator and Internet Explorer 5.

HTML Template Customization

Modify the cross collection template (.tpl) files directly, or for collection specific customization create /DLXSROOT/web/c/coll and copy an existing template (or templates) to this location and modify.

Naming conventions for templates are configured in a global variable in the /DLXSROOT/cgi/i/image/imageclass.cfg file. The variable is %gPagesHandled.

Processing Instructions

Additional functionality may be added to Image Class with the ALLPURPOSE processing instruction (PI). The ALLPURPOSE PI may be inserted anywhere within any of the standard templates. Any desired parameters may be passed in by the PI. The actual functionality must be coded into the /DLXSROOT/cgi/i/image/ Perl module. The module is distributed with the default "allpurpose" subroutine, which initially does nothing. The "allpurpose" subroutine may be modified to perform certain tasks depending on the parameters passed from the template via the PI.

All essential middleware variables are accessible by the "allpurpose" subroutine. See the for details.

Other Customizations

Portfolio Interface Files

Interface files for portfolios are located in /DLXSROOT/web/i/image/all and begin "bb", e.g. "bbthumbnail.tpl".

Currently it is not possible to have collection specific portfolio inteface files. However, the basic color scheme for the portfolio templates may be specified in the cross collection CSS files.