phpDocumentor updates
[squirrelmail.git] / plugins / administrator / defines.php
CommitLineData
fb579f0b 1<?php
4b4abf93 2
abd7a3f8 3/**
fb579f0b 4 * Administrator plugin - Option definitions
abd7a3f8 5 *
fb579f0b 6 * @author Philippe Mingo
4b4abf93 7 * @copyright &copy; 1999-2005 The SquirrelMail Project Team
fb579f0b 8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
4b4abf93 9 * @version $Id$
ea5f4b8e 10 * @package plugins
11 * @subpackage administrator
abd7a3f8 12 */
13
5ba5dc8e 14/** @ignore */
15if (!defined('SM_PATH')) define('SM_PATH','../../');
16
ea5f4b8e 17/** */
b59d1a7d 18require_once( SM_PATH . 'functions/constants.php' );
abd7a3f8 19
20/* Define constants for the various option types. */
21define('SMOPT_TYPE_UNDEFINED', -1);
22define('SMOPT_TYPE_STRING', 0);
23define('SMOPT_TYPE_STRLIST', 1);
24define('SMOPT_TYPE_TEXTAREA', 2);
25define('SMOPT_TYPE_INTEGER', 3);
26define('SMOPT_TYPE_FLOAT', 4);
27define('SMOPT_TYPE_BOOLEAN', 5);
28define('SMOPT_TYPE_HIDDEN', 6);
29define('SMOPT_TYPE_COMMENT', 7);
dcd6f144 30define('SMOPT_TYPE_NUMLIST', 8);
edd4a552 31define('SMOPT_TYPE_TITLE', 9);
32define('SMOPT_TYPE_THEME', 10);
33define('SMOPT_TYPE_PLUGINS', 11);
65a5bae6 34define('SMOPT_TYPE_LDAP', 12);
88cb1b4d 35define('SMOPT_TYPE_EXTERNAL', 32);
a28a56da 36define('SMOPT_TYPE_PATH',33);
abd7a3f8 37
5ba5dc8e 38global $languages, $version;
abd7a3f8 39
35be4418 40$language_values = array( );
abd7a3f8 41foreach ($languages as $lang_key => $lang_attributes) {
42 if (isset($lang_attributes['NAME'])) {
43 $language_values[$lang_key] = $lang_attributes['NAME'];
44 }
45}
46asort( $language_values );
35be4418 47$language_values = array_merge(array('' => _("Default")), $language_values);
dcd6f144 48$left_size_values = array();
49for ($lsv = 100; $lsv <= 300; $lsv += 10) {
50 $left_size_values[$lsv] = "$lsv " . _("pixels");
51}
52
0e66bc84 53$defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
54 'type' => SMOPT_TYPE_COMMENT,
abd7a3f8 55 'size' => 7 ),
7fe5aa79 56 'SM_ver' => array( 'name' => _("SquirrelMail Version"),
88cb1b4d 57 'type' => SMOPT_TYPE_EXTERNAL,
58 'value' => "$version" ),
59 'PHP_ver' => array( 'name' => _("PHP Version"),
60 'type' => SMOPT_TYPE_EXTERNAL,
61 'value' => phpversion() ),
0e66bc84 62 /* --------------------------------------------------------*/
63 'Group1' => array( 'name' => _("Organization Preferences"),
64 'type' => SMOPT_TYPE_TITLE ),
65 '$org_name' => array( 'name' => _("Organization Name"),
abd7a3f8 66 'type' => SMOPT_TYPE_STRING,
67 'size' => 40 ),
0e66bc84 68 '$org_logo' => array( 'name' => _("Organization Logo"),
a28a56da 69 'type' => SMOPT_TYPE_PATH,
70 'size' => 40,
fdefb2e7 71 'default' => '../images/sm_logo.png'),
99ac8983 72 '$org_logo_width' => array( 'name' => _("Organization Logo Width"),
af5a3d89 73 'type' => SMOPT_TYPE_STRING,
99ac8983 74 'size' => 5,
75 'default' => 0),
76 '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
af5a3d89 77 'type' => SMOPT_TYPE_STRING,
99ac8983 78 'size' => 5,
79 'default' => 0),
0e66bc84 80 '$org_title' => array( 'name' => _("Organization Title"),
abd7a3f8 81 'type' => SMOPT_TYPE_STRING,
82 'size' => 40 ),
0e66bc84 83 '$signout_page' => array( 'name' => _("Signout Page"),
a28a56da 84 'type' => SMOPT_TYPE_PATH,
0e66bc84 85 'size' => 40 ),
fdefb2e7 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 ),
dcd6f144 90 '$frame_top' => array( 'name' => _("Top Frame"),
91 'type' => SMOPT_TYPE_STRING,
feba1a41 92 'size' => 40,
93 'default' => '_top' ),
0e66bc84 94 /* --------------------------------------------------------*/
95 'Group2' => array( 'name' => _("Server Settings"),
96 'type' => SMOPT_TYPE_TITLE ),
97 '$domain' => array( 'name' => _("Mail Domain"),
88cb1b4d 98 'type' => SMOPT_TYPE_STRING,
99 'size' => 40 ),
abd7a3f8 100 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
101 'type' => SMOPT_TYPE_STRING,
102 'size' => 40 ),
103 '$imapPort' => array( 'name' => _("IMAP Server Port"),
88cb1b4d 104 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 105 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
106 'type' => SMOPT_TYPE_STRLIST,
0e66bc84 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"),
2c3ad1cf 111 'macosx' => _("Mac OS X Mailserver"),
112 'hmailserver' => _("hMailServer IMAP server"),
ee20a285 113 'mercury32' => _("Mercury/32 IMAP server"),
e498ebbd 114 'bincimap' => _("Binc IMAP server"),
0e66bc84 115 'other' => _("Not one of the above servers") ) ),
116 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
117 'type' => SMOPT_TYPE_STRING,
de6bf9e4 118 'comment' => _("Use &quot;detect&quot; to auto-detect."),
2586d588 119 'size' => 10,
120 'default' => 'detect' ),
fdefb2e7 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,
de6bf9e4 127 'posvals' => array('login' => _("IMAP login"),
fdefb2e7 128 'cram-md5' => 'CRAM-MD5',
129 'digest-md5' => 'DIGEST-MD5'),
130 'default' => 'login' ),
a3d6c63e 131 '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
132 'type' => SMOPT_TYPE_BOOLEAN,
de6bf9e4 133 'comment' => _("Choose &quot;no&quot; for SMTP") ),
dcd6f144 134 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
135 'type' => SMOPT_TYPE_STRING,
136 'size' => 40 ),
abd7a3f8 137 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
138 'type' => SMOPT_TYPE_STRING,
139 'size' => 40 ),
140 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
88cb1b4d 141 'type' => SMOPT_TYPE_INTEGER ),
fdefb2e7 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,
de6bf9e4 148 'posvals' => array('none' => _("No SMTP auth"),
149 'login' => _("Login (plain text)"),
fdefb2e7 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 ),
9d953ce0 156 '$encode_header_key' => array( 'name' => _("Header Encryption Key"),
157 'type' => SMOPT_TYPE_STRING ),
0e66bc84 158 '$invert_time' => array( 'name' => _("Invert Time"),
159 'type' => SMOPT_TYPE_BOOLEAN ),
160 /* --------------------------------------------------------*/
161 'Group3' => array( 'name' => _("Folders Defaults"),
162 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 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"),
5ed13ec8 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")) ),
dcd6f144 198 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
5ed13ec8 199 'type' => SMOPT_TYPE_NUMLIST ,
200 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
201 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
dcd6f144 202 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
203 'type' => SMOPT_TYPE_BOOLEAN ),
4e85a37f 204 '$delete_folder' => array( 'name' => _("Auto delete folders"),
205 'type' => SMOPT_TYPE_BOOLEAN ),
fdefb2e7 206 '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
207 'type' => SMOPT_TYPE_BOOLEAN,
208 'default' => false),
dcd6f144 209 /* --------------------------------------------------------*/
d0102e1a 210 'Group4' => array( 'name' => _("General Options"),
dcd6f144 211 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 212 '$data_dir' => array( 'name' => _("Data Directory"),
a28a56da 213 'type' => SMOPT_TYPE_PATH,
dcd6f144 214 'size' => 40 ),
215 '$attachment_dir' => array( 'name' => _("Temp Directory"),
a28a56da 216 'type' => SMOPT_TYPE_PATH,
abd7a3f8 217 'size' => 40 ),
dcd6f144 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") ) ),
edd4a552 225 '$default_left_size' => array( 'name' => _("Default Left Size"),
dcd6f144 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 ),
f06543bd 234 '$default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
6fa38b33 235 'type' => SMOPT_TYPE_BOOLEAN ),
8a7d0669 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 ),
9d953ce0 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 ),
fdefb2e7 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 ),
ee20a285 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 ),
dcd6f144 267 /* --------------------------------------------------------*/
edd4a552 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 ),
0f610dca 273 /* ---- Database settings ---- */
497203d4 274 'Group6' => array( 'name' => _("Database"),
275 'type' => SMOPT_TYPE_TITLE ),
276 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
277 'type' => SMOPT_TYPE_STRING,
88cb1b4d 278 'size' => 40 ),
4f40a59d 279 '$addrbook_table' => array( 'name' => _("Address book table"),
280 'type' => SMOPT_TYPE_STRING,
2586d588 281 'size' => 40,
282 'default' => 'address' ),
f58f1fd8 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' ),
99a6c222 290 '$prefs_user_field' => array('name' => _("Preferences username field"),
291 'type' => SMOPT_TYPE_STRING,
292 'size' => 40,
293 'default' => 'user' ),
06316c07 294 '$prefs_user_size' => array( 'name' => _("Size of username field"),
295 'type' => SMOPT_TYPE_INTEGER ),
99a6c222 296 '$prefs_key_field' => array('name' => _("Preferences key field"),
297 'type' => SMOPT_TYPE_STRING,
298 'size' => 40,
299 'default' => 'prefkey' ),
06316c07 300 '$prefs_key_size' => array( 'name' => _("Size of key field"),
301 'type' => SMOPT_TYPE_INTEGER ),
99a6c222 302 '$prefs_val_field' => array('name' => _("Preferences value field"),
303 'type' => SMOPT_TYPE_STRING,
304 'size' => 40,
305 'default' => 'prefval' ),
06316c07 306 '$prefs_val_size' => array( 'name' => _("Size of value field"),
307 'type' => SMOPT_TYPE_INTEGER ),
30e9932c 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' ),
d41e14ed 315 '$addrbook_global_writeable' => array( 'name' => _("Allow writing into global address book"),
30e9932c 316 'type' => SMOPT_TYPE_BOOLEAN ),
317 '$addrbook_global_listing' => array( 'name' => _("Allow listing of global address book"),
318 'type' => SMOPT_TYPE_BOOLEAN ),
0f610dca 319 /* ---- Language settings ---- */
39d3ec89 320 'Group9' => array( 'name' => _("Language settings"),
321 'type' => SMOPT_TYPE_TITLE ),
fdefb2e7 322 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
39d3ec89 323 'type' => SMOPT_TYPE_STRLIST,
324 'size' => 7,
325 'posvals' => $language_values ),
fdefb2e7 326 '$default_charset' => array( 'name' => _("Default Charset"),
39d3ec89 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',
5b9bbb42 331 'iso-8859-9' => 'iso-8859-9',
39d3ec89 332 'iso-8859-15' => 'iso-8859-15',
5b9bbb42 333 'utf-8' => 'utf-8',
39d3ec89 334 'koi8-r' => 'koi8-r',
5b9bbb42 335 'euc-kr' => 'euc-kr',
336 'big5' => 'big5',
337 'gb2312' => 'gb2312',
338 'tis-620' => 'tis-620',
39d3ec89 339 'windows-1251' => 'windows-1251',
5b9bbb42 340 'windows-1255' => 'windows-1255',
341 'windows-1256' => 'windows-1256',
342 'iso-2022-jp' => 'iso-2022-jp' ) ),
fdefb2e7 343 '$show_alternative_names' => array( 'name' => _("Show alternative language names"),
344 'type' => SMOPT_TYPE_BOOLEAN ),
f03f6ee7 345 '$aggressive_decoding' => array( 'name' => _("Enable aggressive decoding"),
346 'type' => SMOPT_TYPE_BOOLEAN ),
6d3689f5 347 '$lossy_encoding' => array( 'name' => _("Enable lossy encoding"),
fdefb2e7 348 'type' => SMOPT_TYPE_BOOLEAN ),
0f610dca 349 /* ---- Tweaks ---- */
39d3ec89 350 'Group10' => array( 'name' => _("Tweaks"),
fdefb2e7 351 'type' => SMOPT_TYPE_TITLE ),
352 '$advanced_tree' => array( 'name' => _("Use advanced tree folder listing"),
353 'type' => SMOPT_TYPE_BOOLEAN ),
fdefb2e7 354 '$use_icons' => array( 'name' => _("Use icons"),
355 'type' => SMOPT_TYPE_BOOLEAN ),
71b2f21e 356 '$use_iframe' => array( 'name' => _("Use inline frames with HTML mails"),
9d953ce0 357 'type' => SMOPT_TYPE_BOOLEAN ),
d04cab42 358 '$use_php_recode' => array( 'name' => _("Use PHP recode functions"),
fdefb2e7 359 'type' => SMOPT_TYPE_BOOLEAN ),
d04cab42 360 '$use_php_iconv' => array( 'name' => _("Use PHP iconv functions"),
fdefb2e7 361 'type' => SMOPT_TYPE_BOOLEAN ),
06b811da 362 '$allow_remote_configtest' => array( 'name' => _("Allow remote configuration test"),
363 'type' => SMOPT_TYPE_BOOLEAN ),
0f610dca 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 ),
06b811da 369 '$abook_global_file' => array( 'name' => _("Global address book file"),
370 'type' => SMOPT_TYPE_STRING ),
0f610dca 371 '$abook_global_file_writeable' => array( 'name' => _("Allow writing into global address book file"),
06b811da 372 'type' => SMOPT_TYPE_BOOLEAN ),
373 '$abook_global_file_listing' => array( 'name' => _("Allow listing of global address book"),
374 'type' => SMOPT_TYPE_BOOLEAN ),
edd4a552 375 /* --------------------------------------------------------*/
30e9932c 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 ),
fdefb2e7 381 '$theme_default' => array( 'name' => _("Default theme"),
382 'type' => SMOPT_TYPE_INTEGER,
383 'default' => 0,
384 'comment' => _("Use index number of theme") ),
30e9932c 385 /* --------------------------------------------------------*/
de6bf9e4 386 '$config_use_color' => array( 'name' => '',
387 'type' => SMOPT_TYPE_HIDDEN ),
fdefb2e7 388 '$no_list_for_subscribe' => array( 'name' => '',
389 'type' => SMOPT_TYPE_HIDDEN ),
497203d4 390 /* --------------------------------------------------------*/
dcd6f144 391
edd4a552 392 );
dcd6f144 393
f8a1ed5a 394?>