Advent Calendar Configuration Information


Configuration Information

This package may be customized for your environment by modifying a text configuration file. Code changes should not be required in most cases. By default, the configuration file is named advent.conf. A sample resides in the html/conf directory distributed with this package.

The values you most likely will want to change are:

celimgc XX imagefilename
where XX indicates the day (1-25)
These values define the images to be displayed on the advent calendar for the current day and for each individual prior day represented on the calendar. In addition to the images supplied with this package, you may add your own pictures to the Images directory defined by imageloc below. Alternatively, you may use images from elsewhere within your own Web site by providing a full path to the image(s) from your server's DocumentRoot, including a leading slash (/). (e.g. /Images/myimage.gif) All images must be scaled the same, as defined by imgwide and imghigh.
celimga
This defines the image to be displayed on days which follow the current date (that is, the image for the days which should not yet have their unique pictures exposed.) This definition must follow the same guidelines as defined for celimgc above.
celbibp XX Bible-passage
where XX indicates the day (1-25) and Bible-passage identifies the Bible passage associated with that day. In order to link to the text of the passage, this identification must be in the format required by the Bible Gateway. In general, the format required is "book+chapter:v1-v2", where "v1" is the starting verse and "v2" is the ending verse. The "+" is translated to a space before display.
myheader
Definition of the header to be placed on the Advent Calendar page.
myfooter
Definition of the footer to be placed on the Advent Calendar page.
bdybgi
Definition of the page background image. For no background image, either set it to '' or delete or comment out this line. As with celimgc above, it may be in the default image directory or defined by an absolute path.

Some other values you may find a need to change are:

imageloc
This defines the directory where the default configuration images for adventcal will reside. It should have no leading or trailing pathname delimiters (slashes). This variable must be relative to the DocumentRoot environment variable used by your Web server so the script can locate the appropriate files. (Note: If the images are moved, the local copies of these help files may not function correctly without corresponding changes.)
imgwide
All images used by adventcal must be the same dimensions. By default, this is 132 pixels wide by 92 pixels high, however this may be changed (if needed) by modifying the configuration file. Variable imgwide defines the image width (in pixels).
imghigh
Variable imghigh defines the image height (in pixels). See above for additional image dimension information.

There are several forms in which the lines of the configuration file may exist. Use care when modifying the lines or the application may fail to function properly.

Format 1:
# Optional comment

Lines which start with "#" in column 1 are considered comments and are ignored.

Format 2:
variable = value # Optional comment

The variable and the value fields must not contain embeded spaces. Underscores ("_") in the value field are replaced by spaces before being used. To preserve underscores, use Format 3. The optional comment character "#" and everything which follows it will be ignored.

Format 3:
variable = 'value' # Optional comment

The variable must not contain embeded spaces, but the value field may contain them. Underscores ("_") in the value field are left as is. The optional comment character "#" and everything which follows it will be ignored.

Format 4:
variable identifier value # Optional comment

The identifier is used as an "index" into the array named "variable" The variable, identifier, and value fields must not contain embeded spaces. Underscores ("_") in the value field are replaced by spaces before being used. To preserve underscores, surround the value with single quotes as described by Format 3. The optional "#" character and everything following it will be ignored.

Format 5:
variable elements of the value

This format is used for myheader and myfooter. They may be multi-line, with each line appended to the one prior to it. These fields may contain the special variables:

In addition, the value for myheader may contain:

These are expanded to their proper values prior to display.

See the definitions of other configurable values in the sample configration file itself.


Welcome | Advent Calendar | Advent Calendar Technical Info
(Updated 23 DEC 1999)