Description file

Format of a description file of a template is identical to the Windows profile format (ini file).
Information is registered the following way:

[Section]
Name=Value

First section of description file is [General] section. It contains obligatory fields that should be filled for all templates.

Table 1. Section [General]

Parameter Obligatory Description Example Example
Name Yes Template (theme) name Name=City Lights
PluginName Yes Name of plug-in for which template is being created. Can be HTML or SWF PluginName=SWF
Description No Additional template description Description=Flying Pictures Theme
NumPages Yes No of template pages, that should be handled by plug-in. NumPages=1
StartPage Yes Name of the start page of an album StartPage=index.html
EmptyPhoto No Relative path to the file of an image that will be included to the album, in case when the list of images is empty. If that parameter is not assigned then in the empty spaces will be the reference to the first page of an album. EmptyPhoto=images/x.gif
Plug-in version Yes Plug-in version. Current 1.0 PluginVersion=1.0

This should be followed by the description of each page of template. (their quantity is shown in the NumPages parameter). The new section is created for each page with the name [Page N] where N is serial number of the pages during pages processing. (N starts from 1). There can be several pages. For example, one page contains series of several small pictures, another a full size picture.
Example:
[Page1]
Page description section also contains obligatory and non-obligatory parameters:

Tabel 2. Page description section

Parameter Obligatory Description Example
Path Yes Path to the page relative to the directory of template. Normally it is just the name of template page. Path=config.xml
NumParameters Yes Number of parameters on the page. (it can be the name of the album, color, font etc.) Parameters can be changed by the user in the interface of AlbumCreator during the album creation process. NumParameters=9
OutFileExtension No Extension for the creating album pages. By default it is the same as extension of the template page. OutFileExtension=xml

Parameters descriptions follow template descriptions.
Plug-in reads album parameter description and passes it to AlbumCreator, which submits the parameter using description to the user for changes through its user interface. This way parameter values entered by the user will appear on the album pages.
AlbumCreator has the following types of parameters (parameter type actually assigns Windows controls, that are used to display and modify Wizard pages).

Table 3. Page parameters types

Parameter type Reflection in UI Description Obligatory attributes of parameter description Example
AC_INT_RANGE Spin button control with integer Buddy With the help of INT_RANGE user assigns an integer in some range MinValue
MaxValue
DefaultValue
Type=AC_INT_RANGE
MinValue=32
MaxValue=200
DefaultValue=120
AC_EDIT Edit Control Assigns the text string field DefaultValue Type=AC_EDIT
DefaultValue=Flying Pictures
AC_COMBOBOX Combo Box Allows user to select one of the several possible values. Control field is text field NumValues=N
Value0
...
ValueN-2
DefaultValue
Type=AC_COMBOBOX
NumValues=2
DefaultValue=YES
Value0=NO
AC_COLOR Static control with example of color and button that invokes Color dialog Allows to transfer color parameters DefaultValue DefaultValue=#ÀÀBBCC
Where AA - Red component in hexadecimal format, BB -green, ÑÑ blue
AC_FONT Static control font example and button that invokes font dialog Allows user select font to transfer to album DefaultFace
DefaultSize
DefaultColor
DefaultWeight
Tag=#TITLEFONT#
DefaultFace=Arial
DefaultSize=20
DefaultColor=#000020
DefaultWeight=bold

Number of parameters is specified in the page parameter NumParameters. The section under the name [PageNParamM] where N is the number of page, M is serial number of parameter is created for each parameter. Parameter description contains following values (they can be different depending on the type of parameter).

Table 4. Page parameters section

Parameter Obligatory Description Example
Name Yes Parameter name. This name should consist of one word that should be unique among parameters. Name is not shown in AlbumCreator interface. Name=ThColumns
DisplayName Yes Parameter name to be shown in AlbumCreator User Interface. May contain several words, spaces etc. DisplayName=Number of thumbnails in a row
Description No Additionl parameter description for the user. Is shown as a tooltip when user points with cursor at parameter control. Description=Please input the number of thumbnails in a row
Type Yes Parameter type. One from the listed in Table 3. Type=AC_INT_RANGE
Tag Yes Marker at the template page, showing that here it is necessary to replace the marker by the parameter value (see Comment) Tag=#THCOLS#

* Marker of parameter (Tag) can be any word, normally indicating the parameter name. Marker can be inserted once and more times into template page. During the page processing the Plugin seeks for the markers and substitutes them for parameter values, assigned by AlbumCreator user.

The following significant restrictions for the marker name are:

  1. Marker has to be bracketed with ## (see example in the Table 4);
  2. Marker has to be a single word;
  3. Marker, entered by template developer, can not be one of the following, reserved by the system:
    1. #IMG#;
    2. #NAME#
    3. #DESCRIPTION#
    4. #INDEX#
    5. #NUMIMAGES#
  4. Parameter name can't have the same name as template page name.

Further fields of parameter description can be different depending on the parameter type. (see Table 3).

Example of a description file:

[General]
Name=Hiking
NumPages=2
PluginName=HTML
Description=Hiking Template
StartPage=index.html
EmptyPhoto=images/x.gif
 
[Page1]
Path=base.html
NumParameters=4
OutFileExtension=html
ImageExt=jpg
 
[Page1Param1]
Name=Title
DisplayName=Album Title
Description=Input your album title
Type=AC_EDIT
Tag=#TITLE#
DefaultValue=HIGHER AND HIGHER
 
[Page1Param2]
Name=ThColumns
DisplayName=Number of thumbnails in a row
Description=Please input the number of thumbnails in a row
Type=AC_INT_RANGE
Tag=#THCOLS#
MinValue=1
MaxValue=8
DefaultValue=3
 
[Page1Param3]
Name=ThRows
DisplayName=Number of rows
Description=Please input the number of rows with thumbnails
Type=AC_INT_RANGE
Tag=#THROWS#
MinValue=1
MaxValue=4
DefaultValue=2
 
[Page1Param4]
Name=ThDistance
DisplayName=Distance between thumbnails
Description=Please input the number of pixels between thumbnails
Type=AC_COMBOBOX
Tag=#THDIST#
NumValues=6
DefaultValue=10
Value0=15
Value1=20
Value2=25
Value3=30
Value4=50
 
[Page2]
Path=image.html
NumParameters=0
OutFileExtension=html