The CGI part

The third section of the configuration file configures Annotate's CGI script. This part of the configuraton decides where your document and its comments are stored and what the comments should look like. The following is a list of all directives:

Table 3.1. CGI part configuration parameters

ParameterDescription
DocumentRootLike the Apache directive, this specifies the directory where Annotate can find your DocBook document. This path can be given relative or absolute.
TemplateRootThis should point to the directory containing the templates.
NavigationTemplatePoints to the template describing the navigation bar which is displayed at bottom and top of each delivered page.
LinkTemplatePoints to the template describing the links which are displayed at the comment anchors. They contain links to the "View comment" and "Write new comment" pages.
AnnotateTemplatePoints to the template containing the entry form for a new comment.
ViewTemplatePoints to the template which displays one or more comments.
MailTemplatePoints to the template which containts the body of a notification about a new comment.
DatabaseThis is the data source string for DBI. The database is used to store the comments of your visitors. Any database which is supported by Perl DBI can be used. Please refer to the Perl documentation for more information.

Example 3.5. DBI configuration using MySQL

DBI:mysql:databasename:hostname[:port]

Example 3.6. DBI configuration using CSV files

DBI:CSV:f_dir=comments
DatabaseUsernameContains the user name (i.e. login) for the database. Can be left empty if not needed.
DatabasePasswordContains the password for the database. Can be left empty if not needed.
DefaultOutputModeControls how comments are displayed by default.

Valid modes are:

Hide

Do not show comments.

Inline

Display comments inline, directly below the element they belong to.

Link

Create links which display the comments in a new window.

Each visitor can choose his favorite mode, which is automatically stored in a cookie by Annotate. The default value is therefore only used if the user visits the document for the first time or there is no cookie.

eMailAddressThis can be set to one (or more, separated by comma) eMail address. A notification will be sent to this address if a new comment is made to any part of the document.

If left empty, no mail is sent.

eMailSubjectThe subject of the notification eMail.