phpdoc blocks
[squirrelmail.git] / plugins / administrator / defines.php
CommitLineData
abd7a3f8 1<?PHP
2
3/**
4 * defines.php
5 *
82d304a0 6 * Copyright (c) 1999-2004 The SquirrelMail Project Team
abd7a3f8 7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Philippe Mingo
10 *
0df03ce7 11 * @version $Id$
ea5f4b8e 12 * @package plugins
13 * @subpackage administrator
abd7a3f8 14 */
15
ea5f4b8e 16/** */
b59d1a7d 17require_once( SM_PATH . 'functions/constants.php' );
abd7a3f8 18
19/* Define constants for the various option types. */
20define('SMOPT_TYPE_UNDEFINED', -1);
21define('SMOPT_TYPE_STRING', 0);
22define('SMOPT_TYPE_STRLIST', 1);
23define('SMOPT_TYPE_TEXTAREA', 2);
24define('SMOPT_TYPE_INTEGER', 3);
25define('SMOPT_TYPE_FLOAT', 4);
26define('SMOPT_TYPE_BOOLEAN', 5);
27define('SMOPT_TYPE_HIDDEN', 6);
28define('SMOPT_TYPE_COMMENT', 7);
dcd6f144 29define('SMOPT_TYPE_NUMLIST', 8);
edd4a552 30define('SMOPT_TYPE_TITLE', 9);
31define('SMOPT_TYPE_THEME', 10);
32define('SMOPT_TYPE_PLUGINS', 11);
65a5bae6 33define('SMOPT_TYPE_LDAP', 12);
88cb1b4d 34define('SMOPT_TYPE_EXTERNAL', 32);
a28a56da 35define('SMOPT_TYPE_PATH',33);
abd7a3f8 36
37global $languages;
38
35be4418 39$language_values = array( );
abd7a3f8 40foreach ($languages as $lang_key => $lang_attributes) {
41 if (isset($lang_attributes['NAME'])) {
42 $language_values[$lang_key] = $lang_attributes['NAME'];
43 }
44}
45asort( $language_values );
35be4418 46$language_values = array_merge(array('' => _("Default")), $language_values);
dcd6f144 47$left_size_values = array();
48for ($lsv = 100; $lsv <= 300; $lsv += 10) {
49 $left_size_values[$lsv] = "$lsv " . _("pixels");
50}
51
0e66bc84 52$defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
53 'type' => SMOPT_TYPE_COMMENT,
abd7a3f8 54 'size' => 7 ),
88cb1b4d 55 'SM_ver' => array( 'name' => _("Squirrelmail Version"),
56 'type' => SMOPT_TYPE_EXTERNAL,
57 'value' => "$version" ),
58 'PHP_ver' => array( 'name' => _("PHP Version"),
59 'type' => SMOPT_TYPE_EXTERNAL,
60 'value' => phpversion() ),
0e66bc84 61 /* --------------------------------------------------------*/
62 'Group1' => array( 'name' => _("Organization Preferences"),
63 'type' => SMOPT_TYPE_TITLE ),
64 '$org_name' => array( 'name' => _("Organization Name"),
abd7a3f8 65 'type' => SMOPT_TYPE_STRING,
66 'size' => 40 ),
0e66bc84 67 '$org_logo' => array( 'name' => _("Organization Logo"),
a28a56da 68 'type' => SMOPT_TYPE_PATH,
69 'size' => 40,
70 'default' => '../images/sm_logo.png'),
99ac8983 71 '$org_logo_width' => array( 'name' => _("Organization Logo Width"),
af5a3d89 72 'type' => SMOPT_TYPE_STRING,
99ac8983 73 'size' => 5,
74 'default' => 0),
75 '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
af5a3d89 76 'type' => SMOPT_TYPE_STRING,
99ac8983 77 'size' => 5,
78 'default' => 0),
0e66bc84 79 '$org_title' => array( 'name' => _("Organization Title"),
abd7a3f8 80 'type' => SMOPT_TYPE_STRING,
81 'size' => 40 ),
0e66bc84 82 '$signout_page' => array( 'name' => _("Signout Page"),
a28a56da 83 'type' => SMOPT_TYPE_PATH,
0e66bc84 84 'size' => 40 ),
a3d6c63e 85 '$provider_uri' => array( 'name' => _("Provider Link URI"),
86 'type' => SMOPT_TYPE_STRING ),
87 '$provider_name' => array( 'name' => _("Provider Name"),
88 'type' => SMOPT_TYPE_STRING ),
dcd6f144 89 '$frame_top' => array( 'name' => _("Top Frame"),
90 'type' => SMOPT_TYPE_STRING,
feba1a41 91 'size' => 40,
92 'default' => '_top' ),
0e66bc84 93 /* --------------------------------------------------------*/
94 'Group2' => array( 'name' => _("Server Settings"),
95 'type' => SMOPT_TYPE_TITLE ),
96 '$domain' => array( 'name' => _("Mail Domain"),
88cb1b4d 97 'type' => SMOPT_TYPE_STRING,
98 'size' => 40 ),
abd7a3f8 99 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
100 'type' => SMOPT_TYPE_STRING,
101 'size' => 40 ),
102 '$imapPort' => array( 'name' => _("IMAP Server Port"),
88cb1b4d 103 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 104 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
105 'type' => SMOPT_TYPE_STRLIST,
0e66bc84 106 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
107 'uw' => _("University of Washington's IMAP server"),
108 'exchange' => _("Microsoft Exchange IMAP server"),
109 'courier' => _("Courier IMAP server"),
110 'other' => _("Not one of the above servers") ) ),
111 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
112 'type' => SMOPT_TYPE_STRING,
edd4a552 113 'comment' => _("Use \"detect\" to auto-detect."),
2586d588 114 'size' => 10,
115 'default' => 'detect' ),
a3d6c63e 116 '$use_imap_tls' => array( 'name' => _("Use TLS for IMAP Connections"),
a2ccd603 117 'type' => SMOPT_TYPE_BOOLEAN,
a3d6c63e 118 'comment' => _("Requires PHP 4.3.x! Experimental."),
a2ccd603 119 'default' => false ),
a3d6c63e 120 '$imap_auth_mech' => array( 'name' => _("IMAP Authentication Type"),
a2ccd603 121 'type' => SMOPT_TYPE_STRLIST,
fe0b18b3 122 'posvals' => array('login' => 'IMAP LOGIN',
a2ccd603 123 'cram-md5' => 'CRAM-MD5',
fe0b18b3 124 'digest-md5' => 'DIGEST-MD5'),
125 'default' => 'login' ),
a3d6c63e 126 '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
127 'type' => SMOPT_TYPE_BOOLEAN,
128 'comment' => "Say 'no' for SMTP" ),
dcd6f144 129 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
130 'type' => SMOPT_TYPE_STRING,
131 'size' => 40 ),
abd7a3f8 132 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
133 'type' => SMOPT_TYPE_STRING,
134 'size' => 40 ),
135 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
88cb1b4d 136 'type' => SMOPT_TYPE_INTEGER ),
a3d6c63e 137 '$use_smtp_tls' => array( 'name' => _("Use TLS for SMTP Connections"),
a2ccd603 138 'type' => SMOPT_TYPE_BOOLEAN,
a3d6c63e 139 'comment' => _("Requires PHP 4.3.x! Experimental."),
a2ccd603 140 'default' => false ),
a3d6c63e 141 '$smtp_auth_mech' => array( 'name' => _("SMTP Authentication Type"),
a2ccd603 142 'type' => SMOPT_TYPE_STRLIST,
143 'posvals' => array('none' => 'No SMTP auth',
fe0b18b3 144 'login' => 'Login (Plaintext)',
a2ccd603 145 'cram-md5' => 'CRAM-MD5',
146 'digest-md5' => 'DIGEST-MD5'),
147 'default' => 'none'),
a3d6c63e 148 '$pop_before_smtp' => array( 'name' => _("POP3 Before SMTP?"),
87d7a194 149 'type' => SMOPT_TYPE_BOOLEAN,
150 'default' => false ),
bd193a8d 151 '$skip_SM_header' => array( 'name' => _("Hide SquirrelMail Header"),
152 'type' => SMOPT_TYPE_BOOLEAN ),
0e66bc84 153 '$invert_time' => array( 'name' => _("Invert Time"),
154 'type' => SMOPT_TYPE_BOOLEAN ),
155 /* --------------------------------------------------------*/
156 'Group3' => array( 'name' => _("Folders Defaults"),
157 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 158 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
159 'type' => SMOPT_TYPE_STRING,
160 'size' => 40 ),
161 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
162 'type' => SMOPT_TYPE_BOOLEAN ),
163 '$trash_folder' => array( 'name' => _("Trash Folder"),
164 'type' => SMOPT_TYPE_STRING,
165 'size' => 40 ),
166 '$sent_folder' => array( 'name' => _("Sent Folder"),
167 'type' => SMOPT_TYPE_STRING,
168 'size' => 40 ),
169 '$draft_folder' => array( 'name' => _("Draft Folder"),
170 'type' => SMOPT_TYPE_STRING,
171 'size' => 40 ),
172 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
173 'type' => SMOPT_TYPE_BOOLEAN ),
174 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
175 'type' => SMOPT_TYPE_BOOLEAN ),
176 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
177 'type' => SMOPT_TYPE_BOOLEAN ),
178 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
179 'type' => SMOPT_TYPE_BOOLEAN ),
180 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
181 'type' => SMOPT_TYPE_BOOLEAN ),
182 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
183 'type' => SMOPT_TYPE_BOOLEAN ),
184 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
185 'type' => SMOPT_TYPE_BOOLEAN ),
186 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
187 'type' => SMOPT_TYPE_BOOLEAN ),
188 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
5ed13ec8 189 'type' => SMOPT_TYPE_NUMLIST,
190 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
191 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
192 SMPREF_UNSEEN_ALL => _("All Folders")) ),
dcd6f144 193 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
5ed13ec8 194 'type' => SMOPT_TYPE_NUMLIST ,
195 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
196 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
dcd6f144 197 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
198 'type' => SMOPT_TYPE_BOOLEAN ),
86143034 199 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Addressbook"),
e91cf665 200 'type' => SMOPT_TYPE_BOOLEAN ),
4e85a37f 201 '$delete_folder' => array( 'name' => _("Auto delete folders"),
202 'type' => SMOPT_TYPE_BOOLEAN ),
a3d6c63e 203 '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
204 'type' => SMOPT_TYPE_BOOLEAN,
205 'default' => false),
dcd6f144 206 /* --------------------------------------------------------*/
d0102e1a 207 'Group4' => array( 'name' => _("General Options"),
dcd6f144 208 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 209 '$data_dir' => array( 'name' => _("Data Directory"),
a28a56da 210 'type' => SMOPT_TYPE_PATH,
dcd6f144 211 'size' => 40 ),
212 '$attachment_dir' => array( 'name' => _("Temp Directory"),
a28a56da 213 'type' => SMOPT_TYPE_PATH,
abd7a3f8 214 'size' => 40 ),
dcd6f144 215 '$dir_hash_level' => array( 'name' => _("Hash Level"),
216 'type' => SMOPT_TYPE_NUMLIST,
217 'posvals' => array( 0 => _("Hash Disabled"),
218 1 => _("Low"),
219 2 => _("Moderate"),
220 3 => _("Medium"),
221 4 => _("High") ) ),
edd4a552 222 '$default_left_size' => array( 'name' => _("Default Left Size"),
dcd6f144 223 'type' => SMOPT_TYPE_NUMLIST,
224 'posvals' => $left_size_values ),
225 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
226 'type' => SMOPT_TYPE_BOOLEAN ),
227 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
228 'type' => SMOPT_TYPE_BOOLEAN ),
229 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
230 'type' => SMOPT_TYPE_BOOLEAN ),
f06543bd 231 '$default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
6fa38b33 232 'type' => SMOPT_TYPE_BOOLEAN ),
8a7d0669 233 '$edit_identity' => array( 'name' => _("Allow editing of identities"),
234 'type' => SMOPT_TYPE_BOOLEAN ),
235 '$edit_name' => array( 'name' => _("Allow editing of full name"),
236 'type' => SMOPT_TYPE_BOOLEAN ),
a3d6c63e 237 '$allow_server_sort' => array( 'name' => _("Use server-side sorting"),
87d7a194 238 'type' => SMOPT_TYPE_BOOLEAN,
239 'default' => false ),
a3d6c63e 240 '$allow_thread_sort' => array( 'name' => _("Use server-side thread sorting"),
87d7a194 241 'type' => SMOPT_TYPE_BOOLEAN,
242 'default' => false ),
a3d6c63e 243 '$allow_charset_search' => array( 'name' => _("Allow server charset search"),
87d7a194 244 'type' => SMOPT_TYPE_BOOLEAN,
245 'default' => false ),
a3d6c63e 246 '$session_name' => array( 'name' => _("PHP session name"),
87d7a194 247 'type' => SMOPT_TYPE_HIDDEN ),
dcd6f144 248 /* --------------------------------------------------------*/
edd4a552 249 'Group5' => array( 'name' => _("Message of the Day"),
250 'type' => SMOPT_TYPE_TITLE ),
251 '$motd' => array( 'name' => _("Message of the Day"),
252 'type' => SMOPT_TYPE_TEXTAREA,
253 'size' => 40 ),
254 /* --------------------------------------------------------*/
497203d4 255 'Group6' => array( 'name' => _("Database"),
256 'type' => SMOPT_TYPE_TITLE ),
257 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
258 'type' => SMOPT_TYPE_STRING,
88cb1b4d 259 'size' => 40 ),
4f40a59d 260 '$addrbook_table' => array( 'name' => _("Address book table"),
261 'type' => SMOPT_TYPE_STRING,
2586d588 262 'size' => 40,
263 'default' => 'address' ),
f58f1fd8 264 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
265 'type' => SMOPT_TYPE_STRING,
266 'size' => 40 ),
267 '$prefs_table' => array( 'name' => _("Preferences table"),
268 'type' => SMOPT_TYPE_STRING,
269 'size' => 40,
270 'default' => 'userprefs' ),
99a6c222 271 '$prefs_user_field' => array('name' => _("Preferences username field"),
272 'type' => SMOPT_TYPE_STRING,
273 'size' => 40,
274 'default' => 'user' ),
275 '$prefs_key_field' => array('name' => _("Preferences key field"),
276 'type' => SMOPT_TYPE_STRING,
277 'size' => 40,
278 'default' => 'prefkey' ),
279 '$prefs_val_field' => array('name' => _("Preferences value field"),
280 'type' => SMOPT_TYPE_STRING,
281 'size' => 40,
282 'default' => 'prefval' ),
30e9932c 283 '$addrbook_global_dsn' => array( 'name' => _("Global address book DSN"),
284 'type' => SMOPT_TYPE_STRING,
285 'size' => 40 ),
286 '$addrbook_global_table' => array( 'name' => _("Global address book table"),
287 'type' => SMOPT_TYPE_STRING,
288 'size' => 40,
289 'default' => 'global_abook' ),
d41e14ed 290 '$addrbook_global_writeable' => array( 'name' => _("Allow writing into global address book"),
30e9932c 291 'type' => SMOPT_TYPE_BOOLEAN ),
292 '$addrbook_global_listing' => array( 'name' => _("Allow listing of global address book"),
293 'type' => SMOPT_TYPE_BOOLEAN ),
39d3ec89 294 'Group9' => array( 'name' => _("Language settings"),
295 'type' => SMOPT_TYPE_TITLE ),
296 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
297 'type' => SMOPT_TYPE_STRLIST,
298 'size' => 7,
299 'posvals' => $language_values ),
300
301 '$default_charset' => array( 'name' => _("Default Charset"),
302 'type' => SMOPT_TYPE_STRLIST,
303 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
304 'iso-8859-2' => 'iso-8859-2',
305 'iso-8859-7' => 'iso-8859-7',
306 'iso-8859-15' => 'iso-8859-15',
307 'iso-8859-15' => 'iso-8859-15',
308 'ns_4551_1' => 'ns_4551_1',
309 'koi8-r' => 'koi8-r',
310 'euc-KR' => 'euc-KR',
311 'windows-1251' => 'windows-1251',
312 'ISO-2022-JP' => 'ISO-2022-JP' ) ),
313 '$show_alternative_names' => array( 'name' => _("Show alternative language names"),
314 'type' => SMOPT_TYPE_BOOLEAN ),
315 '$available_languages' => array( 'name' => _("Available languages"),
316 'type' => SMOPT_TYPE_STRING,
317 'size' => 40 ),
318 '$agresive_decoding' => array( 'name' => _("Use agresive decoding"),
319 'type' => SMOPT_TYPE_BOOLEAN ),
320 'Group10' => array( 'name' => _("Tweaks"),
321 'type' => SMOPT_TYPE_TITLE ),
322 '$advanced_tree' => array( 'name' => _("Use advanced tree folder listing"),
323 'type' => SMOPT_TYPE_BOOLEAN ),
324 '$oldway' => array( 'name' => _("Use old folder listing functions"),
325 'type' => SMOPT_TYPE_BOOLEAN ),
d41e14ed 326 '$use_icons' => array( 'name' => _("Use icons"),
327 'type' => SMOPT_TYPE_BOOLEAN ),
39d3ec89 328 '$use_php_recode' => array( 'name' => _("Use php recode functions"),
329 'type' => SMOPT_TYPE_BOOLEAN ),
330 '$use_php_iconv' => array( 'name' => _("Use php iconv functions"),
331 'type' => SMOPT_TYPE_BOOLEAN ),
edd4a552 332 /* --------------------------------------------------------*/
30e9932c 333 'Group7' => array( 'name' => _("Themes"),
334 'type' => SMOPT_TYPE_TITLE ),
335 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
336 'type' => SMOPT_TYPE_PATH,
337 'size' => 40 ),
338 '$theme_default' => array( 'name' => _("Default theme"),
339 'type' => SMOPT_TYPE_INTEGER,
340 'default' => 0,
341 'comment' => _("Use index number of theme") ),
342 /* --------------------------------------------------------*/
88cb1b4d 343 '$config_use_color' => array( 'name' => '',
a3d6c63e 344 'type' => SMOPT_TYPE_HIDDEN ),
345 '$no_list_for_subscribe' => array( 'name' => '',
39d3ec89 346 'type' => SMOPT_TYPE_HIDDEN ),
497203d4 347 /* --------------------------------------------------------*/
dcd6f144 348
edd4a552 349 );
dcd6f144 350
0df03ce7 351?>