Home English Mozilla  Thursday, Avril 25 14:32:59 
Wcal
Print

 Home

 Screenshots
 Demo
 Downloads

 News RSS 2.0
 FAQ
 Mail archive
Documentation
 Roadmap

 P*Wcal
 CWcal
 DWcal
 Themes
 Internationalization

 Maintainer
 Contributors
 Web repositories
 CVS

 NeoSystem
 MyNews

  
Search

Wcal 2.8 documentation

Configuring Wcal

wcal.conf contains runtime configuration data for Wcal daemon wcald. There are a few parameters you can only set by editing the variables at top of wcald code itself, but most users don't need to touch them. Wcal comes with a sample configuration file which lists all possible parameters and their default values together with brief comments.

If you change wcal.conf, it will be reloaded upon next request to wcald. No restarting or sending signals to wcald will be necessary.

If you want to put wcal.conf elsewhere, you must change variable definition at top of both index.c and wcald.

File format

Lines containing nothing or only white space, and lines starting with # are ignored. All other lines contain a parameter definition. White space is allowed (but not required) at beginning and end of lines and between keywords (but not within multi word keywords such as access file).

Most parameter definitions use the most common single line format. They start with the parameter name (which may consist of multiple words), then comes an equal to sign (=), and the rest of the line is the parameter value. No comments are allowed at end of the lines.

The configuration file is implicitely divided into three sections: global section, group section and user definition section. Group section can contains users definition or groups definition (subgroups). Global section starts from the beginning of the configuration file and ends to the first user or group definition. Global section contains either non-user related parameters or defaults for user definitions. Parameter definitions inside user definitions affect that user only. Parameter definitions inside group definitions affect that users of this group only. Parameters that can be set in the global section are marked Global below. Parameters that can be set in the group section are marked User below. Parameters that can be set in the user section are marked User below.

User and group definitions and access file definitions span multiple lines. Access file definition defines a file that will be written into each Wcal user's or group's directory (these have nothing to do with Unix system users) into a file .htaccess. This mechanism is designed with Apache in mind. Apache will read file .htaccess from every directory it accesses, and the file may contain directives which define who is allowed to access that directory. Access file definition can occur either in the global section, inside a group definition or inside a user definition (see the next paragraph). Access file definition given in the global section is the default for those users whose definition doesn't contain a user specific access file definition. Access file definition starts with a line containing a string access file and ends to line end access file. In between is zero or more free form lines. These lines form contents of the access file. Sample access file definition is given in the sample configuration file that comes with Wcal distribution.

User definition starts with line user = value, where value is an alphanumeric user name. No space is allowed in the user name. User definition ends in a line which contains literal text end user with nothing else on it. In between is zero or more lines which contain single line parameter definitions and possibly an access file definition. Everything in user definition applies to this user only. If some parameter isn't defined in user definition (which is the usual case), the default value will be used.

Group definition starts with line group = value, where value is an alphanumeric group name. No space is allowed in the group name. Group definition ends in a line which contains literal text end group with nothing else on it. In between is zero or more lines which contain single line parameter definitions, possibly an access file definition or users and groups definition. Everything in group definition applies to the users of the group only. If some parameter isn't defined in group definition (which is the usual case), the default value will be used.

Configurable parameters

access file name Global
If you use Apache, you don't need to change this from the default value .htaccess. Value of this parameter is the name of the file that will be written into each user's directory. The contents of the file are given in multi line access file definition.

address Global

Address (IP address or domain name) of the computer where wcald is running. The default is 127.0.0.1 ie. localhost (the same computer where index.cgi is). You usually don't need to change this.

base url Global

This should be the URL under which you installed Wcal. For example if HTML root of your web server is /home/httpd/html, and you installed Wcal into directory home/httpd/html/wcal, set this parameter to /wcal. The default is /wcal.

clock Global Group User

You can choose to show time in either 24-hour or 12-hour format. Possible values are:
  • 24-hour
  • 12-hour

data id User

The parameter allows giving several names for one "user". This is useful when used together with the read only parameter, since it allows you to set up two (or more) views for one data, one read/write, the other read only. See Create calendars for more information.

database directory Global

Enter the absolute path of the directory under which you want Wcal to create its databases. Wcal must be able to create this directory (or it must exist already). Default is /var/wcal.

date format Global Group User

Date is printed in different formats in different countries. Wcal allows five different formats for printing the date. These are refered to with numbers between 1 and 5, inclusive. Default is 1, which is day.month.year. You may want to use 2, which is month/day/year. Possible values are:

  1. day.month.year
  2. month/day/year
  3. day/month/year
  4. year/month/day
  5. year-month-day
  6. YYYYMMDD where Y = year, M = month and D = day of month

If you need some other format, please drop a request to the author.

day precision Global Group User

Control the precision used in the day view. Possible values are 1 (1 hour), 2 (30 minutes) or 4 (15 minutes). For example, if the resource is set to 4, the day view will display 4 rows for each hour (10:00, 10:15, 10:30, 10:45). Default value is 1 (1 hour).

default lock Global Group User

Control wether a new event is locked by default by the apache user. Possible values are true or false. If the resource is set to true, the lock checkbox is checked by default for a new event. Default value is false.

This resource is used only for calendars with access control.

default priv Global Group User

Control wether a new event is private by default for the apache user. Possible values are true or false. If the resource is set to true, the private checkbox (eye) is checked by default for a new event. Default value is false.

This resource is used only for calendars with access control.

default todo Global Group User

Control wether a new event with no time has the persistent flag by default or not. Possible values are true or false. If the resource is set to false, the flag is not set by default for a new event. Default value is true.

demo Global

Control wether Wcal are started in demonstration mode or not. Possible values are yes or no. If the resource is set to yes, Wcal is in demonstration mode. In that case, writing is disabled. You can't add, modify or delete events in calendars . Default value is no.

detailed week Global Group User

Control wether the week view displays events in a compact form or not. Possible values are yes or no. If the resource is set to yes, week view looks like the day view with a row for each hour. If the resource is set to no, events are compacted (am./pm.). Default value is no.

disable fusion Global Group

Control wether fusion is available or not. Possible values are true or false. If the resource is set to true, fusion buttons are not available. Default value is false.

disable purge Global Group User

Control wether calendar purge is available or not. Possible values are true or false. If the resource is set to true, purge link is not available. This resource can be set for all calendars (global section) or for only some calendars (user section). Default value is false.

event length Global Group User

This resource corresponds to the default lenght of an event. It expressed in number of base units. Default value is 4 that fixes the defaut event lenght to an hour (4 x 15 minutes).

event precision Global Group User

This resource corresponds to the base unit to express event length. It expressed in minutes. Default value is 15 that allows you to create events every quarter an hour.

first day Global

This defines which day starts the week. Allowed values are monday or sunday. Default is monday.

WARNING : You can only fix this parameter before accessing the calendar for the first time. This parameter conditions the structure of the Wcal database. That's why you can't change it after the database creation. Maybe I would write a script to convert a monday database to a sunday database and vice-versa.

first hour Global

This defines the first hour displayed in the day view. Allowed values are 0 to 23. Default is 8.

footer Global

HTML code display at the bottom of each view. For example you can add a copyright :
footer = © 2003
If the value of footer begins with a "/", it is interpreted as a script. The script is executed and the output is inserted in the HTML code of the page. The URL of the current view is passed to the script. This arg can be used to build the corresponding HTML code to be inserted.

frame height Global Group User

This resource allows you to define the height of the top frame (week view) in the standard calendar view. The height can be defined in pixels or in percentage of the browser window.

Example:

frame height = 50%
If the frame height is not set, the height is the defined by the deprecated resource screen resolution:
  • 200 if screen resolution is set to "800x600"
  • 250 if screen resolution is set to "1024x768" (default)

frame width Global Group User

This resource allows you to define the width of the left frame (day view) in the standard calendar view. The width can be defined in pixels or in percentage of the browser window.

Example:

frame width = 40%
If the frame width is not set, the width is the defined by the deprecated resource screen resolution:
  • 250 if screen resolution is set to "800x600"
  • 320 if screen resolution is set to "1024x768" (default)

groups order Global Group

Control the sort order for the groups in the Wcal main page. By default (if the resource is not set), groups appear in the order of definition in the wcal.conf file.

Example:

groups order = group2 group4 group1
If some groups present in wcal.conf are not present in the groups order list, they appear after the groups of the groups order list.

last hour Global

This defines the last hour displayed in the day view. Allowed values are 0 to 23. Default is 18.

long name Group User

If you want more descriptive name be shown for a user or a group, you can set it with this parameter. Value of this parameter is used only for visual purposes.

mail command Global Group User

Allows to use your own mail command to checkalarm instead of the default mail -s command. This is useful if your OS doesn't have a mail command or if you want to do something else than sending a simple mail on alarm.

The called script takes two args: the subject and the recipient of the mail. The body of the mail can be fetched by reading the standard input (stdin). For example to log alarms, you can add in your wcal.conf file:

mail command = /usr/local/bin/mymail
where mymail is something like this:
#!/usr/bin/perl

open(FILE, ">>/tmp/checkalarm.log");
print FILE "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n";
print FILE "subject: $ARGV[0]\n";
print FILE "to: $ARGV[1]\n";
print FILE "body:\n";
while ($line = <STDIN>)
{
    print FILE $line;
}
print FILE "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n";
You can have different scripts for several calendars.

organization Global

Type here the name of your organization, or any string describing this particular instance of Wcal. This string is shown at the main page of Wcal.

overlap Global Group User

Control wether you can have or not several events on the same zone (for example, an two events that begin at the same time). Possible values are true or false. If the resource is set to false, it means that you will have an error if you try to add an event that overlap an existing one. This is useful if you want to manage a reservation calendar. Default value is true.

password Global

This is any hard-to-guess string. You should change this to something else if want to prevent unauthorized access. Both index.cgi which is the actual CGI proxy run by the web server, and wcald read this parameter, and use it for making sure the request isn't sent by a spoofer. Default is not relevant.

port Global

The port which wcald listens to for requests and index.cgi connects to. You probably don't need to change this.

read only User

Valid values are true and false. If the value is true, this user won't be allowed to change data in his or her calendar. This is useful when user together with the data id parameter. See Create calendars for more information.

refresh delay Global

Define the refresh fequency for week, month and annual view. refresh delay is expressed in seconds. For example:
refresh delay = 900
means that the views are refreshed every 15 minutes. Default value 0 means that the views are never refreshed.

remote cal Global

Default calendar checked by checkalarm when used with no argument. all means that checkalarm will check all calendars. See Using checkalarm for more information.

remote lang Global Group User

Language used by Wcal. Available languages are:
  • english (en)
  • french (fr)
  • german (de)
  • italian (it)
  • dutch (nl)
  • spanish (es)
  • norwegian (no)
  • finnish (fi)
  • potuguese (pt)
  • czech (cz)
  • danish (dk)
Contributors are welcome for other translations. See /etc/wcald.msg.

remote mail Global Group User

Default address mailed by checkalarm when used with no argument. See Using checkalarm for more information.

show day time Global Group User

Control wether events start and end time are displayed in the day view. Possible values are yes or no. Default value is no.

show weekend Global Group User

Control wether weekend days are shown or not. Possible values are yes or no. Default value is yes.

If you want to customize the background color of the weekend days, you can set the resource to the color value instead of yes. For example, to set the background to gray you can add:

show weekend = #aaaaaa

WARNING : When the parameter is set to no, you must NOT set the parameter first day to sunday.

superuser Global Group User

Defines the apache user authorized to modify locked events. By default, only the user who has locked the event can modify it. The superuser can modify all locked events even if they are locked by another user. The superuser can be defined in the global section (superuser for all calendars), in the group section (superuser for the calendars of the group) or in the user section (superuser for only one calendar).

This resource is used only for calendars with access control.

theme Global

Defines the graphical theme used by Wcal. If no theme is set, Wcal uses the default graphical look. See /var/www/html/wcal/themes directory for more information.

For example:

theme = mozilla

top left corner Global

HTML code displayed at the top left corner of the week, month and year views. For example you can add a link to the web site home page:
top left corner = <a href="/"><img src="/img/home.gif" border=0 alt="Home"></a>
If the value of top left corner begins with a "/", it is interpreted as a script. The script is executed and the output is inserted in the HTML code of the page. Some args are passed to the script:
  • the name of the calendar (wcal on fusion)
  • the year
  • the week (only in the week and the day views)
  • the month (only in the month view)
  • the week day (only in the day view)
Those args can be used to build the corresponding HTML code to be inserted. For example, you can add a link to the user homepage corresponding to the calendar:
top left corner = /usr/local/bin/adduserlink.pl
With adduserlink.pl defined as:
#!/usr/bin/perl

if ($ARGV[0] ne "wcal")
{
  print "<a href=\"/~$ARGV[0]\"><img src=\"/img/userhome.gif\" border=0 alt=\"$ARGV[0]'s homepage\"></a>";
} 

users order Global Group

Control the sort order for the users (calendars) in the Wcal main page. By default (if the resource is not set), users appear in the order of definition in the wcal.conf file.

Example:

users order = savignon production commercial
If some users present in wcal.conf are not present in the users order list, they appear after the users of the users order list.

webserver name Global

Name of the web server. This resource is useful to build correct URL in mails sent by checkalarm.

For example :

webserver name = mywebserver.org

webserver port Global

Port used by the web server. This resource is useful if you use Apache with mod_perl on a redirected pert. For example, Mandrake standard Apache configuration use the port 8200 for scripts that use mod_perl. When adding an event, wcal will redirect to a URL containing explicitly the port 8200. To avoid this, you can set the resource to the real port to use.

For example :

webserver port = 80

week copy Global Group User

Control wether week copy is possible or not for the calendar. Possible values are yes or no. Default value is no.

Back to the Wcal main page


© 2004 Joël Savignon