2 if ( empty ( $PHP_SELF ) && ! empty ( $_SERVER ) &&
3 ! empty ( $_SERVER['PHP_SELF'] ) ) {
4 $PHP_SELF = $_SERVER['PHP_SELF'];
6 if ( ! empty ( $PHP_SELF ) && preg_match ( "/\/includes\//", $PHP_SELF ) ) {
7 die ( "You can't access this file directly!" );
11 * This file can be used to define extra information associated with a
14 * You may define extra fields of the following types:
15 * EXTRA_TEXT - will allow user to enter a line of text
16 * EXTRA_MULTILINETEXT - will allow user to enter multiple lines of text
17 * EXTRA_URL - will be displayed as a link
18 * EXTRA_DATE - will be presented with date pulldown menus when entering
19 * EXTRA_EMAIL - will be presented as a mailto URL
20 * EXTRA_USER - most be a calendar user name; will be presented
22 * EXTRA_REMINDER - will allow reminder email messages to be sent
23 * out to all event participants
24 * EXTRA_REMINDER_DATE - will allow reminder email messages to be sent
25 * out to all event participants on the specified date. Can use
26 * extra options to send it out before this date also.
27 * EXTRA_SELECTION_LIST - allows a custom selection list. Can use
28 * this to specify a list of possible locations, etc.
31 * If you want to fully support using languages other than what
32 * you define below, you will need to add the 2nd field of the arrays
33 * below to the translation files.
36 * If you want to use reminders, you will need to do some
37 * extra steps in setting up WebCalendar. There is no built-in support
38 * for executing time-based jobs within PHP, so you need to setup something
39 * to execute the send_reminders.php script.
40 * On UNIX/Linux, this will be cron.
41 * On Windows, you'll need to find a cron-like way to do this.
42 * See README.html for more info.
49 $EXTRA_MULTILINETEXT = 2;
55 $EXTRA_SELECTLIST = 8;
57 // Options for reminders - these should be or-ed together when
58 // it makes sense. (Right now the only two available options wouldn't
59 // make sense to or together.)
60 // By default, options = 0.
62 // Owner specifies what date to send. This will present a date selection
63 // area on the edit page (just like a EXTRA_DATE will).
64 $EXTRA_REMINDER_WITH_DATE = 0x0001;
66 // Owner chooses how many days/hours/minutes before event date that
67 // the reminder should be sent. Will see: __ Days __ Hrs __ Mins on
69 $EXTRA_REMINDER_WITH_OFFSET = 0x0002;
71 // Default for reminder is "no". Add this flag to make the default "Yes"
72 // when creating a new event.
73 $EXTRA_REMINDER_DEFAULT_YES = 0x0004;
75 // Format of an entry is an array with the following elements:
76 // name: unique name of this extra field (used in db)
77 // description: how this field will be described to users
78 // type: $EXTRA_URL, $EXTRA_TEXT, etc...
79 // arg1: for reminders how many minutes before event should reminder
80 // for multi-line text, how many columns to display in the form
81 // as in <textarea rows="XX" cols="XX"
82 // for text (single line), how many columns to display
83 // as in <input size="XX"
84 // for selection list, contains an array of possible values
85 // arg2: for reminders, this specifies options such as
86 // $EXTRA_REMINDER_WITH_DATE or $EXTRA_REMINDER_WITH_OFFSET.
87 // for multi-line text, how many rows to display in the form
88 // as in <textarea rows="XX" cols="XX"
91 // You want to add an URL, a reminder, an email address,
92 // an event contact (from list of calendar users), and some driving
95 // $site_extras = array (
97 // "URL", // unique name of this extra field (used in db)
98 // "Event URL", // how this field will be described to users
99 // $EXTRA_URL, // type of field
104 // "Email", // unique name of this extra field (used in db)
105 // "Event Email", // how this field will be described to users
106 // $EXTRA_EMAIL, // type of field
107 // 0, // arg 1 (unused)
108 // 0 // arg 2 (unused)
111 // "Contact", // unique name of this extra field (used in db)
112 // "Event Contact", // how this field will be described to users
113 // $EXTRA_USER, // type of field
114 // 0, // arg 1 (unused)
115 // 0 // arg 2 (unused)
118 // "Directions", // unique name of this extra field (used in db)
119 // "Driving Directions", // how this field will be described to users
120 // $EXTRA_MULTILINETEXT, // type of field
121 // 50, // width of text entry
122 // 8 // height of text entry
125 // "Reminder", // unique name of this extra field (used in db)
126 // "Send Reminder", // how this field will be described to users
127 // $EXTRA_REMINDER, // type of field
128 // 21 * (24 * 60), // how many minutes before event should reminder
129 // // be sent (21 days in this case)
130 // $EXTRA_REMINDER_WITH_OFFSET | $EXTRA_REMINDER_DEFAULT_YES
131 // // specifies reminder options bit-or
134 // "RoomLocation", // unique name of this extra field (used in db)
135 // "Location", // how this field will be described to users
136 // $EXTRA_SELECTLIST, // type of field
137 // // List of options (first will be default)
138 // array ( "None", "Room 101", "Room 102", "Conf Room 8", "Conf Room 12" ),
139 // 0 // arg 2 (unused)
145 // Define your stuff here...
146 // Below translate calls are here so they get picked up by check_translation.pl.
147 // They are never executed in PHP.
148 // Make sure you add translations in the translations file for anything
149 // you need to translate to another language.
150 // Use tools/check_translation.pl to verify you have all your translations.
152 // Kludge for picking up translations:
153 // translate("Send Reminder")
154 $site_extras = array (
156 "Reminder", // unique name of this extra field (used in db)
157 "Send Reminder", // how this field will be described to users
158 $EXTRA_REMINDER, // type of field
159 240, // arg 1: how many minutes before event should
160 // reminder be sent (however, this option is just
161 // the default when used with the
162 // EXTRA_REMINDER_WITH_OFFSET option) since the user
163 // can override this.
164 $EXTRA_REMINDER_WITH_OFFSET
165 // arg 2: specifies reminder options bit-or