"Fossies" - the Fresh Open Source Software Archive

Member "absence-v2.1/README-INSTANCES.txt" (10 Jun 2012, 3202 Bytes) of package /linux/www/web-absence-2.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 		== README.INSTANCES ===
    3 
    4 PLEASE NOTE: instances are not supported in v2.0.  If you wish to have
    5 instance support, let me know.
    6 
    7 old readme follows:
    8 
    9 The parameters in AbsenceConfig.pm are default values for
   10 all instances.  If you only have one instance, then it is
   11 enough if the parameters are set in AbsenceConfig.pm. If
   12 you want multiple instances, the values of the parameters
   13 in AbsenceConfig.pm apply unless superceded by values
   14 in instance-specific parameter files.
   15 
   16 For each additional instance that you wish to create,
   17 you *must* add a line to the %INSTANCES hash in
   18 AbsenceConfig.pm containing the instance-name and the
   19 path to the data-directory.  There must be a
   20 parameter-file in that data-directory called "absence.conf"
   21 which contains all necessary parameters.
   22 
   23 Here is an example of an instance "foo" defined in "AbsenceConfig.pm":
   24 
   25     %INSTANCES = (
   26 		foo	=> '/home/httpd/html/foo'
   27 	);
   28 
   29 There would have to be a file called "absence.conf" in "/home/httpd/html/foo"
   30 containing instance-specific parameters.
   31 
   32 You must also add an instance parameter to the "index.html" file
   33 (or whatever you call it) as follows:
   34 
   35   <HTML>
   36   <HEAD>
   37   <TITLE>Absence</TITLE>
   38   </HEAD>
   39   <FRAMESET ROWS="60,*">
   40       <FRAME SRC="/cgi-bin/absence-control.pl?instance=foo" NAME=control FRAMEBORDER=0>
   41       <FRAME SRC="/cgi-bin/absence.pl?instance=foo" name=display>
   42   </FRAMESET>
   43   </HTML>
   44 
   45 
   46 The following is an example "absence.conf" parameter file
   47 for an instance (this is a complete list of valid parameters):
   48 
   49   data_dir_rel	= /absence2
   50   data_dir_abs	= /home/httpd/urban/www.spielwiese.de/html${data_dir_rel}
   51   cgi_dir_rel	= /cgi-bin
   52   image_dir_rel	= ${data_dir_rel}/img
   53   image_dir_abs	= ${data_dir_abs}/img
   54   database_file	= ${data_dir_abs}/absence.db
   55   modtime_db_file = ${data_dir_abs}/month_mod_times.db
   56   holiday_db_file = ${data_dir_abs}/holiday.db
   57   log_file	= ${data_dir_abs}/log
   58   type_file	= ${data_dir_abs}/absence-types.db
   59   main_script	= ${cgi_dir_rel}/absence.pl
   60   manage_script	= ${cgi_dir_rel}/absence-manage.pl
   61   control_script = ${cgi_dir_rel}/absence-control.pl
   62   legend_style	= fit
   63   backup_copies	= 12
   64   image_type	= png
   65   map_type	= server
   66   cookie_domain	= .spielwiese.de
   67   authentication = no
   68 
   69 As you can see, you may use parameters that already have had values
   70 assigned to them in later lines.  The braces ("{", "}") are
   71 required.  This isn't a realistic example, because you wouldn't
   72 really want to redefine any of the the paths to the scripts
   73 (main_script, manage_script, control_script).
   74 
   75 Let's suppose that you want several instances, but they should
   76 all share the holiday and types databases, will have the same
   77 legend style, image type, number of backup copies, cookie_domain,
   78 and image map type.  A reasonable parameter file might look like:
   79 
   80   data_dir_rel	= /sales
   81   data_dir_abs	= /home/httpd/urban/www.spielwiese.de/html${data_dir_rel}
   82   image_dir_rel	= ${data_dir_rel}/img
   83   image_dir_abs	= ${data_dir_abs}/img
   84   database_file	= ${data_dir_abs}/absence.db
   85   modtime_db_file = ${data_dir_abs}/month_mod_times.db
   86   log_file	= ${data_dir_abs}/log
   87 
   88 (the parameters specifying script paths, legend style, etc, would be
   89 defined in AbsenceConfig.pm, in this example).