== README.INSTANCES ===
PLEASE NOTE: instances are not supported in v2.0. If you wish to have
instance support, let me know.
old readme follows:
The parameters in AbsenceConfig.pm are default values for
all instances. If you only have one instance, then it is
enough if the parameters are set in AbsenceConfig.pm. If
you want multiple instances, the values of the parameters
in AbsenceConfig.pm apply unless superceded by values
in instance-specific parameter files.
For each additional instance that you wish to create,
you *must* add a line to the %INSTANCES hash in
AbsenceConfig.pm containing the instance-name and the
path to the data-directory. There must be a
parameter-file in that data-directory called "absence.conf"
which contains all necessary parameters.
Here is an example of an instance "foo" defined in "AbsenceConfig.pm":
%INSTANCES = (
foo => '/home/httpd/html/foo'
);
There would have to be a file called "absence.conf" in "/home/httpd/html/foo"
containing instance-specific parameters.
You must also add an instance parameter to the "index.html" file
(or whatever you call it) as follows:
Absence
The following is an example "absence.conf" parameter file
for an instance (this is a complete list of valid parameters):
data_dir_rel = /absence2
data_dir_abs = /home/httpd/urban/www.spielwiese.de/html${data_dir_rel}
cgi_dir_rel = /cgi-bin
image_dir_rel = ${data_dir_rel}/img
image_dir_abs = ${data_dir_abs}/img
database_file = ${data_dir_abs}/absence.db
modtime_db_file = ${data_dir_abs}/month_mod_times.db
holiday_db_file = ${data_dir_abs}/holiday.db
log_file = ${data_dir_abs}/log
type_file = ${data_dir_abs}/absence-types.db
main_script = ${cgi_dir_rel}/absence.pl
manage_script = ${cgi_dir_rel}/absence-manage.pl
control_script = ${cgi_dir_rel}/absence-control.pl
legend_style = fit
backup_copies = 12
image_type = png
map_type = server
cookie_domain = .spielwiese.de
authentication = no
As you can see, you may use parameters that already have had values
assigned to them in later lines. The braces ("{", "}") are
required. This isn't a realistic example, because you wouldn't
really want to redefine any of the the paths to the scripts
(main_script, manage_script, control_script).
Let's suppose that you want several instances, but they should
all share the holiday and types databases, will have the same
legend style, image type, number of backup copies, cookie_domain,
and image map type. A reasonable parameter file might look like:
data_dir_rel = /sales
data_dir_abs = /home/httpd/urban/www.spielwiese.de/html${data_dir_rel}
image_dir_rel = ${data_dir_rel}/img
image_dir_abs = ${data_dir_abs}/img
database_file = ${data_dir_abs}/absence.db
modtime_db_file = ${data_dir_abs}/month_mod_times.db
log_file = ${data_dir_abs}/log
(the parameters specifying script paths, legend style, etc, would be
defined in AbsenceConfig.pm, in this example).