3. Configuration¶
Configuring AgenDAV requires modifying some PHP text files located in the
web/config/
directory.
The following files are usually found as filename.php.template
, so make
a copy of them with the correct file name to make them work.
Note
ldap.php
was removed in AgenDAV 1.1.1
3.1. General configuration (config.php)¶
config.php
file specifies general options about AgenDAV environment. It
loads a set of default option values from defaults.php
, but it is
recommended to configure all of the following variables.
Please, do not modify defaults.php
, as it is a file that updates on
every AgenDAV upgrade to avoid problems if you forget any configuration
setting.
-
base_url
¶ Specify here your full public URL to access AgenDAV, adding a trailing slash. Example:
$config['base_url'] = 'https://agendav.host/';
-
show_in_log
¶ Array of logging levels which will appear in logs. Possible logging levels are:
ERROR
: error messages, recommendedINFO
: informational messages, recommendedAUTHERR
: authentication errorsAUTHOK
: successful authenticationsINTERNALS
: AgenDAV internal processing actions, not recommended unless you are having problems or you want to debug AgenDAVDEBUG
: CodeIgniter internal debug. Do not enable unless you know what you are doing
Example:
$config['show_in_log']= array('ERROR','INFO','AUTHERR', 'AUTHOK');
-
log_path
¶ Full path where logs will be created. Add a trailing slash. Example:
$config['log_path'] = '/var/log/agendav/';
Make sure the user that runs your web server has write permission on that directory.
-
encryption_key
¶ Random string which will be used to encrypt some cookie values.
Prefix that should be prepended to your cookie names. Useful if you have several sites hosted on the same hostname and you want to avoid name collisions
Domain the cookie will be defined for. Use
.domain.tld
orfull.host.domain.tld
, depending on what you want.
Path the cookie will be defined for.
Create cookies only for use in https environments. Set it TRUE if your users access AgenDAV via https.
-
proxy_ips
¶ Comma delimited IPs of your proxies, which will make CodeIgniter framework to trust the HTTP_X_FORWARDED_FOR header. Leave it blank if your AgenDAV installation isn’t being accessed via HTTP proxy.
-
site_title
¶ Title of every page
-
logo
¶ Image filename which will be used as a logo. Has to be a valid filename placed inside
web/public/img/
directory.
Text to be placed in the footer.
-
logout_redirect_to
¶ When logging out from AgenDAV, the URL the user will be redirected to.
Can be left empty to redirect user to login page again.
-
additional_js
¶ Array of additional JavaScript files which you will be loading on every page. They have to be placed inside
web/public/js
-
show_public_caldav_url
¶ Whether to show CalDAV URL links or not in the edit dialog
See also
-
default_language
¶ Language to be used in AgenDAV interface.
Have a look at directory
web/lang
for a list of available languages.Note that the value given to this setting will be used as application locale with
setlocale()
.New in version 1.2.
-
default_time_format
¶ Preferred time format: 12 hours (e.g. 3pm / 2:30am) or 24 hours (e.g. 15:00 / 2:30).
Set this option using a string (
'12'
or'24'
).New in version 1.2.
-
default_date_format
¶ Preferred date format to be used inside date fields (only in forms). Possible values are:
ymd
: e.g. 2011/10/22dmy
: e.g. 22/10/2011mdy
: e.g. 10/22/2011
New in version 1.2.
-
format_full_date
¶ Human readable format for dates, using
strftime
syntax (http://php.net/strftime). Some examples:%a %e %B %Y
: Mon 5 March 2012%a %e de %B de %Y
: Lun 5 de marzo de 2012 (localized usinges_ES
asdefault_language
)
New in version 1.2.5.
-
format_column_month
¶ Sets how the UI calendar should format the column header in month view. Uses FullCalendar own syntax
New in version 1.2.5.
-
format_column_week
¶ Sets how the UI calendar should format the column header in week view. Uses FullCalendar own syntax
New in version 1.2.5.
-
format_column_day
¶ Sets how the UI calendar should format the column header in day view. Uses FullCalendar own syntax
New in version 1.2.5.
-
format_column_table
¶ Sets how the UI calendar should format the column header in table (called agenda) view. Uses FullCalendar own syntax
New in version 1.2.5.
-
format_title_month
¶ Sets how the UI calendar should format the title in month view. Uses FullCalendar own syntax
New in version 1.2.5.
-
format_title_week
¶ Sets how the UI calendar should format the title in week view. Uses FullCalendar own syntax
New in version 1.2.5.
-
format_title_day
¶ Sets how the UI calendar should format the title in day view. Uses FullCalendar own syntax
New in version 1.2.5.
-
format_title_table
¶ Sets how the UI calendar should format the title header in table (called agenda) view. Uses FullCalendar own syntax
New in version 1.2.5.
-
default_first_day
¶ Which day should be considered the first of the week. Starting with 0 (Sunday), 1 means Monday and so on.
Use a numerical value, not an integer.
New in version 1.2.
-
default_timezone
¶ Timezone to be used internally. Will be used for recalculating other timezone dates and hours to be sent to the browser, ignoring browser configured timezone.
Make sure you use a valid timezone from http://php.net/timezones
New in version 1.2.
-
default_calendar_color
¶ Deprecated since version 1.2.3.
Default background and foreground colors for calendars. Has to be specified as an associative array. Example:
// Default background color: #B5C7EB // Default foreground (text) color: #000000 $config['default_calendar_color'] = array('B5C7EB' => '000000');
-
additional_calendar_colors
¶ Deprecated since version 1.2.3.
List of selectable background and foreground color combinations. Specify them as an associative array. Example:
// background color => foreground color $config['additional_calendar_colors'] = array( 'FAC5C0' => '000000', 'B7E3C0' => '000000', 'CAB2FC' => '000000', 'F8F087' => '000000', 'E6D5C1' => '000000', 'FFC48C' => '000000', 'DAF5FF' => '000000', 'C4C4BC' => '000000', );
-
calendar_colors
¶ List of selectable background colors. Foreground color will be automatically calculated depending on the darkness of the color. Specify them as an array. Example:
$config['calendar_colors'] = array( '9CC4E4', '3A89C9', '107FC9', 'FAC5C0', 'FF4E50', 'BD3737', 'C9DF8A', '77AB59', '36802D', 'F8F087', 'E6D5C1', '3E4147', );
3.2. Database configuration (database.php)¶
database.php
contains how to connect to your MySQL database. Just follow
inline comments, it’s pretty straight forward.
3.3. CalDAV specific options (caldav.php)¶
Here you will configure every single aspect of your CalDAV server.
-
caldav_url
¶ Deprecated since version 1.2.4.
See also
-
caldav_http_auth_method
¶ You can specify which HTTP authentication method does your CalDAV server require. Use any of the cURL
CURLOPT_HTTPAUTH
valid values (see http://www.php.net/manual/en/function.curl-setopt.php), or leave it empty to make AgenDAV auto-detect which authentication method to use.Using the auto-detect feature will slow down requests when using Basic auth. If you know which authentication method does your server use you’re advised to set the right value on this option.
Example:
// Automatic guess $config['caldav_http_auth_method'] = null; // SabreDAV $config['caldav_http_auth_method'] = CURLAUTH_DIGEST; // DAViCal $config['caldav_http_auth_method'] = CURLAUTH_BASIC;
New in version 1.2.5.
-
caldav_principal_url
¶ Used by AgenDAV to generate a principal URL for your CalDAV server. The placeholder
%u
will be replaced by an username.Needs a trailing slash.
Example:
// Example 1: DAViCal $config['caldav_principal_url'] = 'http://10.0.0.12/caldav.php/%u/'; // Example 2: SabreDAV $config['caldav_principal_url'] = 'http://10.0.0.12/calendarserver.php/principals/%u/'; // Example 3: Calendar server $config['caldav_principal_url'] = 'http://10.0.0.12/calendars/users/%u/';
Principal URL for user
my_user
for example 2 will be:See also
-
caldav_calendar_url
¶ Used by AgenDAV to generate a calendar collection URL or resource URL for your CalDAV server. The placeholder
%s
will be replaced by AgenDAV with required values.Example:
// DAViCal $config['caldav_calendar_url'] = 'http://10.0.0.12/caldav.php/%s/';
Resource with UID=aaa0001 on calendar ‘work’ for user3 will become:
Calendar ‘test’ for user1 will become:
See also
-
public_caldav_url
¶ The URL that will be shown to users if
show_public_caldav_url
is enabled. It’s not used for internal connections. Placeholder%s
will be replaced by current username and calendar.Needs a trailing slash.
Example:
$config['public_caldav_url'] = 'https://public.caldav.tld/caldav.php/%s/';
Will become for user
user2
and calendarmyhomecalendar
:
-
enable_calendar_sharing
¶ Enables an option to share calendars between users.
Note that calendar sharing requires full WebDAV ACL support on your CalDAV server. Some servers, such as SabreDAV (at least on current release, 1.5.6), don’t support them, so you should set this option to FALSE if your server can’t handle ACLs.
-
owner_permissions
¶ List of DAV permissions used for the calendar owner when sharing a calendar. As DAV ACLs are used, when editing a calendar sharing options a full ACL has to be built with the following structure:
- Permissions given to the owner (this option)
- Permissions given to users with read-only profile (
read_profile_permissions
) - Permissions given to users with read and write profile (
read_write_profile_permissions
) - Permissions given to the rest of users (
default_permissions
)
Please, refer to your CalDAV server documentation to know which permissions does it support.
For DAViCal you can follow Permissions page on DAViCal wiki. Default values of this option will work all right for DAViCal.
Deprecated since version 1.2.5.
See also
See
read_profile_permissions
andread_write_profile_permissions
-
read_profile_permissions
¶ List of DAV permissions used for users given read-only permission on a calendar.
New in version 1.2.5.
-
read_write_profile_permissions
¶ List of DAV permissions used for users given read and write permission on a calendar.
New in version 1.2.5.
-
default_permissions
¶ List of DAV permissions used for users which are not owner neither granted users when some user shares a calendar with other ones.
Please, refer to your CalDAV server documentation to know which permissions does it support.
Default value lets users just to make free/busy queries in DAViCal.