3b979c946e38eeded70e6ef69a507d7a5c34cbbb
[squirrelmail.git] / plugins / administrator / defines.php
1 <?php
2
3 /**
4 * Administrator plugin - Option definitions
5 *
6 * @author Philippe Mingo
7 * @copyright &copy; 1999-2005 The SquirrelMail Project Team
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
9 * @version $Id$
10 * @package plugins
11 * @subpackage administrator
12 */
13
14 /** @ignore */
15 if (!defined('SM_PATH')) define('SM_PATH','../../');
16
17 /** */
18 require_once( SM_PATH . 'functions/constants.php' );
19
20 /* Define constants for the various option types. */
21 define('SMOPT_TYPE_UNDEFINED', -1);
22 define('SMOPT_TYPE_STRING', 0);
23 define('SMOPT_TYPE_STRLIST', 1);
24 define('SMOPT_TYPE_TEXTAREA', 2);
25 define('SMOPT_TYPE_INTEGER', 3);
26 define('SMOPT_TYPE_FLOAT', 4);
27 define('SMOPT_TYPE_BOOLEAN', 5);
28 define('SMOPT_TYPE_HIDDEN', 6);
29 define('SMOPT_TYPE_COMMENT', 7);
30 define('SMOPT_TYPE_NUMLIST', 8);
31 define('SMOPT_TYPE_TITLE', 9);
32 define('SMOPT_TYPE_THEME', 10);
33 define('SMOPT_TYPE_PLUGINS', 11);
34 define('SMOPT_TYPE_LDAP', 12);
35 define('SMOPT_TYPE_EXTERNAL', 32);
36 define('SMOPT_TYPE_PATH',33);
37
38 global $languages, $version;
39
40 $language_values = array( );
41 foreach ($languages as $lang_key => $lang_attributes) {
42 if (isset($lang_attributes['NAME'])) {
43 $language_values[$lang_key] = $lang_attributes['NAME'];
44 }
45 }
46 asort( $language_values );
47 $language_values = array_merge(array('' => _("Default")), $language_values);
48 $left_size_values = array();
49 for ($lsv = 100; $lsv <= 300; $lsv += 10) {
50 $left_size_values[$lsv] = "$lsv " . _("pixels");
51 }
52
53 $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
54 'type' => SMOPT_TYPE_COMMENT,
55 'size' => 7 ),
56 'SM_ver' => array( 'name' => _("SquirrelMail Version"),
57 'type' => SMOPT_TYPE_EXTERNAL,
58 'value' => "$version" ),
59 'PHP_ver' => array( 'name' => _("PHP Version"),
60 'type' => SMOPT_TYPE_EXTERNAL,
61 'value' => phpversion() ),
62 /* --------------------------------------------------------*/
63 'Group1' => array( 'name' => _("Organization Preferences"),
64 'type' => SMOPT_TYPE_TITLE ),
65 '$org_name' => array( 'name' => _("Organization Name"),
66 'type' => SMOPT_TYPE_STRING,
67 'size' => 40 ),
68 '$org_logo' => array( 'name' => _("Organization Logo"),
69 'type' => SMOPT_TYPE_PATH,
70 'size' => 40,
71 'default' => '../images/sm_logo.png'),
72 '$org_logo_width' => array( 'name' => _("Organization Logo Width"),
73 'type' => SMOPT_TYPE_STRING,
74 'size' => 5,
75 'default' => 0),
76 '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
77 'type' => SMOPT_TYPE_STRING,
78 'size' => 5,
79 'default' => 0),
80 '$org_title' => array( 'name' => _("Organization Title"),
81 'type' => SMOPT_TYPE_STRING,
82 'size' => 40 ),
83 '$signout_page' => array( 'name' => _("Signout Page"),
84 'type' => SMOPT_TYPE_PATH,
85 'size' => 40 ),
86 '$provider_uri' => array( 'name' => _("Provider Link URI"),
87 'type' => SMOPT_TYPE_STRING ),
88 '$provider_name' => array( 'name' => _("Provider Name"),
89 'type' => SMOPT_TYPE_STRING ),
90 '$frame_top' => array( 'name' => _("Top Frame"),
91 'type' => SMOPT_TYPE_STRING,
92 'size' => 40,
93 'default' => '_top' ),
94 /* --------------------------------------------------------*/
95 'Group2' => array( 'name' => _("Server Settings"),
96 'type' => SMOPT_TYPE_TITLE ),
97 '$domain' => array( 'name' => _("Mail Domain"),
98 'type' => SMOPT_TYPE_STRING,
99 'size' => 40 ),
100 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
101 'type' => SMOPT_TYPE_STRING,
102 'size' => 40 ),
103 '$imapPort' => array( 'name' => _("IMAP Server Port"),
104 'type' => SMOPT_TYPE_INTEGER ),
105 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
106 'type' => SMOPT_TYPE_STRLIST,
107 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
108 'uw' => _("University of Washington's IMAP server"),
109 'exchange' => _("Microsoft Exchange IMAP server"),
110 'courier' => _("Courier IMAP server"),
111 'macosx' => _("Mac OS X Mailserver"),
112 'hmailserver' => _("hMailServer IMAP server"),
113 'mercury32' => _("Mercury/32 IMAP server"),
114 'bincimap' => _("Binc IMAP server"),
115 'other' => _("Not one of the above servers") ) ),
116 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
117 'type' => SMOPT_TYPE_STRING,
118 'comment' => _("Use &quot;detect&quot; to auto-detect."),
119 'size' => 10,
120 'default' => 'detect' ),
121 '$use_imap_tls' => array( 'name' => _("Use TLS for IMAP Connections"),
122 'type' => SMOPT_TYPE_BOOLEAN,
123 'comment' => _("Requires PHP 4.3.x! Experimental."),
124 'default' => false ),
125 '$imap_auth_mech' => array( 'name' => _("IMAP Authentication Type"),
126 'type' => SMOPT_TYPE_STRLIST,
127 'posvals' => array('login' => _("IMAP login"),
128 'cram-md5' => 'CRAM-MD5',
129 'digest-md5' => 'DIGEST-MD5'),
130 'default' => 'login' ),
131 '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
132 'type' => SMOPT_TYPE_BOOLEAN,
133 'comment' => _("Choose &quot;no&quot; for SMTP") ),
134 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
135 'type' => SMOPT_TYPE_STRING,
136 'size' => 40 ),
137 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
138 'type' => SMOPT_TYPE_STRING,
139 'size' => 40 ),
140 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
141 'type' => SMOPT_TYPE_INTEGER ),
142 '$use_smtp_tls' => array( 'name' => _("Use TLS for SMTP Connections"),
143 'type' => SMOPT_TYPE_BOOLEAN,
144 'comment' => _("Requires PHP 4.3.x! Experimental."),
145 'default' => false ),
146 '$smtp_auth_mech' => array( 'name' => _("SMTP Authentication Type"),
147 'type' => SMOPT_TYPE_STRLIST,
148 'posvals' => array('none' => _("No SMTP auth"),
149 'login' => _("Login (plain text)"),
150 'cram-md5' => 'CRAM-MD5',
151 'digest-md5' => 'DIGEST-MD5'),
152 'default' => 'none'),
153 '$pop_before_smtp' => array( 'name' => _("POP3 Before SMTP?"),
154 'type' => SMOPT_TYPE_BOOLEAN,
155 'default' => false ),
156 '$encode_header_key' => array( 'name' => _("Header Encryption Key"),
157 'type' => SMOPT_TYPE_STRING ),
158 '$invert_time' => array( 'name' => _("Invert Time"),
159 'type' => SMOPT_TYPE_BOOLEAN ),
160 /* --------------------------------------------------------*/
161 'Group3' => array( 'name' => _("Folders Defaults"),
162 'type' => SMOPT_TYPE_TITLE ),
163 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
164 'type' => SMOPT_TYPE_STRING,
165 'size' => 40 ),
166 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
167 'type' => SMOPT_TYPE_BOOLEAN ),
168 '$trash_folder' => array( 'name' => _("Trash Folder"),
169 'type' => SMOPT_TYPE_STRING,
170 'size' => 40 ),
171 '$sent_folder' => array( 'name' => _("Sent Folder"),
172 'type' => SMOPT_TYPE_STRING,
173 'size' => 40 ),
174 '$draft_folder' => array( 'name' => _("Draft Folder"),
175 'type' => SMOPT_TYPE_STRING,
176 'size' => 40 ),
177 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
178 'type' => SMOPT_TYPE_BOOLEAN ),
179 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
180 'type' => SMOPT_TYPE_BOOLEAN ),
181 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
182 'type' => SMOPT_TYPE_BOOLEAN ),
183 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
184 'type' => SMOPT_TYPE_BOOLEAN ),
185 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
186 'type' => SMOPT_TYPE_BOOLEAN ),
187 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
188 'type' => SMOPT_TYPE_BOOLEAN ),
189 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
190 'type' => SMOPT_TYPE_BOOLEAN ),
191 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
192 'type' => SMOPT_TYPE_BOOLEAN ),
193 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
194 'type' => SMOPT_TYPE_NUMLIST,
195 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
196 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
197 SMPREF_UNSEEN_ALL => _("All Folders")) ),
198 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
199 'type' => SMOPT_TYPE_NUMLIST ,
200 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
201 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
202 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
203 'type' => SMOPT_TYPE_BOOLEAN ),
204 '$delete_folder' => array( 'name' => _("Auto delete folders"),
205 'type' => SMOPT_TYPE_BOOLEAN ),
206 '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
207 'type' => SMOPT_TYPE_BOOLEAN,
208 'default' => false),
209 /* --------------------------------------------------------*/
210 'Group4' => array( 'name' => _("General Options"),
211 'type' => SMOPT_TYPE_TITLE ),
212 '$data_dir' => array( 'name' => _("Data Directory"),
213 'type' => SMOPT_TYPE_PATH,
214 'size' => 40 ),
215 '$attachment_dir' => array( 'name' => _("Temp Directory"),
216 'type' => SMOPT_TYPE_PATH,
217 'size' => 40 ),
218 '$dir_hash_level' => array( 'name' => _("Hash Level"),
219 'type' => SMOPT_TYPE_NUMLIST,
220 'posvals' => array( 0 => _("Hash Disabled"),
221 1 => _("Low"),
222 2 => _("Moderate"),
223 3 => _("Medium"),
224 4 => _("High") ) ),
225 '$default_left_size' => array( 'name' => _("Default Left Size"),
226 'type' => SMOPT_TYPE_NUMLIST,
227 'posvals' => $left_size_values ),
228 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
229 'type' => SMOPT_TYPE_BOOLEAN ),
230 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
231 'type' => SMOPT_TYPE_BOOLEAN ),
232 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
233 'type' => SMOPT_TYPE_BOOLEAN ),
234 '$default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
235 'type' => SMOPT_TYPE_BOOLEAN ),
236 '$edit_identity' => array( 'name' => _("Allow editing of identities"),
237 'type' => SMOPT_TYPE_BOOLEAN ),
238 '$edit_name' => array( 'name' => _("Allow editing of full name"),
239 'type' => SMOPT_TYPE_BOOLEAN ),
240 '$hide_auth_header' => array( 'name' => _("Remove username from headers"),
241 'comment' => _("Used only when identities can't be modified"),
242 'type' => SMOPT_TYPE_BOOLEAN ),
243 '$allow_server_sort' => array( 'name' => _("Use server-side sorting"),
244 'type' => SMOPT_TYPE_BOOLEAN,
245 'default' => false ),
246 '$allow_thread_sort' => array( 'name' => _("Use server-side thread sorting"),
247 'type' => SMOPT_TYPE_BOOLEAN,
248 'default' => false ),
249 '$allow_charset_search' => array( 'name' => _("Allow server charset search"),
250 'type' => SMOPT_TYPE_BOOLEAN,
251 'default' => false ),
252 '$allow_advanced_search' => array( 'name' => _("Search functions"),
253 'type' => SMOPT_TYPE_NUMLIST,
254 'posvals' => array( 0 => _("Only basic search"),
255 1 => _("Only advanced search"),
256 2 => _("Both search functions") ),
257 'default' => 0 ),
258 '$session_name' => array( 'name' => _("PHP session name"),
259 'type' => SMOPT_TYPE_HIDDEN ),
260 '$time_zone_type' => array( 'name' => _("Time Zone Configuration"),
261 'type' => SMOPT_TYPE_NUMLIST,
262 'posvals' => array( 0 => _("Standard GNU C time zones"),
263 1 => _("Strict time zones"),
264 2 => _("Custom GNU C time zones"),
265 3 => _("Custom strict time zones")),
266 'default' => 0 ),
267 /* --------------------------------------------------------*/
268 'Group5' => array( 'name' => _("Message of the Day"),
269 'type' => SMOPT_TYPE_TITLE ),
270 '$motd' => array( 'name' => _("Message of the Day"),
271 'type' => SMOPT_TYPE_TEXTAREA,
272 'size' => 40 ),
273 /* ---- Database settings ---- */
274 'Group6' => array( 'name' => _("Database"),
275 'type' => SMOPT_TYPE_TITLE ),
276 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
277 'type' => SMOPT_TYPE_STRING,
278 'size' => 40 ),
279 '$addrbook_table' => array( 'name' => _("Address book table"),
280 'type' => SMOPT_TYPE_STRING,
281 'size' => 40,
282 'default' => 'address' ),
283 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
284 'type' => SMOPT_TYPE_STRING,
285 'size' => 40 ),
286 '$prefs_table' => array( 'name' => _("Preferences table"),
287 'type' => SMOPT_TYPE_STRING,
288 'size' => 40,
289 'default' => 'userprefs' ),
290 '$prefs_user_field' => array('name' => _("Preferences username field"),
291 'type' => SMOPT_TYPE_STRING,
292 'size' => 40,
293 'default' => 'user' ),
294 '$prefs_user_size' => array( 'name' => _("Size of username field"),
295 'type' => SMOPT_TYPE_INTEGER ),
296 '$prefs_key_field' => array('name' => _("Preferences key field"),
297 'type' => SMOPT_TYPE_STRING,
298 'size' => 40,
299 'default' => 'prefkey' ),
300 '$prefs_key_size' => array( 'name' => _("Size of key field"),
301 'type' => SMOPT_TYPE_INTEGER ),
302 '$prefs_val_field' => array('name' => _("Preferences value field"),
303 'type' => SMOPT_TYPE_STRING,
304 'size' => 40,
305 'default' => 'prefval' ),
306 '$prefs_val_size' => array( 'name' => _("Size of value field"),
307 'type' => SMOPT_TYPE_INTEGER ),
308 '$addrbook_global_dsn' => array( 'name' => _("Global address book DSN"),
309 'type' => SMOPT_TYPE_STRING,
310 'size' => 40 ),
311 '$addrbook_global_table' => array( 'name' => _("Global address book table"),
312 'type' => SMOPT_TYPE_STRING,
313 'size' => 40,
314 'default' => 'global_abook' ),
315 '$addrbook_global_writeable' => array( 'name' => _("Allow writing into global address book"),
316 'type' => SMOPT_TYPE_BOOLEAN ),
317 '$addrbook_global_listing' => array( 'name' => _("Allow listing of global address book"),
318 'type' => SMOPT_TYPE_BOOLEAN ),
319 /* ---- Language settings ---- */
320 'Group9' => array( 'name' => _("Language settings"),
321 'type' => SMOPT_TYPE_TITLE ),
322 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
323 'type' => SMOPT_TYPE_STRLIST,
324 'size' => 7,
325 'posvals' => $language_values ),
326 '$default_charset' => array( 'name' => _("Default Charset"),
327 'type' => SMOPT_TYPE_STRLIST,
328 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
329 'iso-8859-2' => 'iso-8859-2',
330 'iso-8859-7' => 'iso-8859-7',
331 'iso-8859-9' => 'iso-8859-9',
332 'iso-8859-15' => 'iso-8859-15',
333 'utf-8' => 'utf-8',
334 'koi8-r' => 'koi8-r',
335 'euc-kr' => 'euc-kr',
336 'big5' => 'big5',
337 'gb2312' => 'gb2312',
338 'tis-620' => 'tis-620',
339 'windows-1251' => 'windows-1251',
340 'windows-1255' => 'windows-1255',
341 'windows-1256' => 'windows-1256',
342 'iso-2022-jp' => 'iso-2022-jp' ) ),
343 '$show_alternative_names' => array( 'name' => _("Show alternative language names"),
344 'type' => SMOPT_TYPE_BOOLEAN ),
345 '$aggressive_decoding' => array( 'name' => _("Enable aggressive decoding"),
346 'type' => SMOPT_TYPE_BOOLEAN ),
347 '$lossy_encoding' => array( 'name' => _("Enable lossy encoding"),
348 'type' => SMOPT_TYPE_BOOLEAN ),
349 /* ---- Tweaks ---- */
350 'Group10' => array( 'name' => _("Tweaks"),
351 'type' => SMOPT_TYPE_TITLE ),
352 '$advanced_tree' => array( 'name' => _("Use advanced tree folder listing"),
353 'type' => SMOPT_TYPE_BOOLEAN ),
354 '$use_icons' => array( 'name' => _("Use icons"),
355 'type' => SMOPT_TYPE_BOOLEAN ),
356 '$use_iframe' => array( 'name' => _("Use inline frames with HTML mails"),
357 'type' => SMOPT_TYPE_BOOLEAN ),
358 '$use_php_recode' => array( 'name' => _("Use PHP recode functions"),
359 'type' => SMOPT_TYPE_BOOLEAN ),
360 '$use_php_iconv' => array( 'name' => _("Use PHP iconv functions"),
361 'type' => SMOPT_TYPE_BOOLEAN ),
362 '$allow_remote_configtest' => array( 'name' => _("Allow remote configuration test"),
363 'type' => SMOPT_TYPE_BOOLEAN ),
364 /* ---- Settings of address books ---- */
365 'Group11' => array( 'name' => _("Address Books"),
366 'type' => SMOPT_TYPE_TITLE ),
367 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Addressbook"),
368 'type' => SMOPT_TYPE_BOOLEAN ),
369 '$abook_global_file' => array( 'name' => _("Global address book file"),
370 'type' => SMOPT_TYPE_STRING ),
371 '$abook_global_file_writeable' => array( 'name' => _("Allow writing into global address book file"),
372 'type' => SMOPT_TYPE_BOOLEAN ),
373 '$abook_global_file_listing' => array( 'name' => _("Allow listing of global address book"),
374 'type' => SMOPT_TYPE_BOOLEAN ),
375 /* --------------------------------------------------------*/
376 'Group7' => array( 'name' => _("Themes"),
377 'type' => SMOPT_TYPE_TITLE ),
378 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
379 'type' => SMOPT_TYPE_PATH,
380 'size' => 40 ),
381 '$theme_default' => array( 'name' => _("Default theme"),
382 'type' => SMOPT_TYPE_INTEGER,
383 'default' => 0,
384 'comment' => _("Use index number of theme") ),
385 /* --------------------------------------------------------*/
386 '$config_use_color' => array( 'name' => '',
387 'type' => SMOPT_TYPE_HIDDEN ),
388 '$no_list_for_subscribe' => array( 'name' => '',
389 'type' => SMOPT_TYPE_HIDDEN ),
390 /* --------------------------------------------------------*/
391
392 );
393
394 ?>