Adding option to default config.
[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 *
11 * $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 ),
0e66bc84 151 '$invert_time' => array( 'name' => _("Invert Time"),
152 'type' => SMOPT_TYPE_BOOLEAN ),
153 /* --------------------------------------------------------*/
154 'Group3' => array( 'name' => _("Folders Defaults"),
155 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 156 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
157 'type' => SMOPT_TYPE_STRING,
158 'size' => 40 ),
159 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
160 'type' => SMOPT_TYPE_BOOLEAN ),
161 '$trash_folder' => array( 'name' => _("Trash Folder"),
162 'type' => SMOPT_TYPE_STRING,
163 'size' => 40 ),
164 '$sent_folder' => array( 'name' => _("Sent Folder"),
165 'type' => SMOPT_TYPE_STRING,
166 'size' => 40 ),
167 '$draft_folder' => array( 'name' => _("Draft Folder"),
168 'type' => SMOPT_TYPE_STRING,
169 'size' => 40 ),
170 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
171 'type' => SMOPT_TYPE_BOOLEAN ),
172 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
173 'type' => SMOPT_TYPE_BOOLEAN ),
174 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
175 'type' => SMOPT_TYPE_BOOLEAN ),
176 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
177 'type' => SMOPT_TYPE_BOOLEAN ),
178 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
179 'type' => SMOPT_TYPE_BOOLEAN ),
180 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
181 'type' => SMOPT_TYPE_BOOLEAN ),
182 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
183 'type' => SMOPT_TYPE_BOOLEAN ),
184 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
185 'type' => SMOPT_TYPE_BOOLEAN ),
186 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
5ed13ec8 187 'type' => SMOPT_TYPE_NUMLIST,
188 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
189 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
190 SMPREF_UNSEEN_ALL => _("All Folders")) ),
dcd6f144 191 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
5ed13ec8 192 'type' => SMOPT_TYPE_NUMLIST ,
193 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
194 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
dcd6f144 195 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
196 'type' => SMOPT_TYPE_BOOLEAN ),
e91cf665 197 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
198 'type' => SMOPT_TYPE_BOOLEAN ),
4e85a37f 199 '$delete_folder' => array( 'name' => _("Auto delete folders"),
200 'type' => SMOPT_TYPE_BOOLEAN ),
a3d6c63e 201 '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
202 'type' => SMOPT_TYPE_BOOLEAN,
203 'default' => false),
dcd6f144 204 /* --------------------------------------------------------*/
d0102e1a 205 'Group4' => array( 'name' => _("General Options"),
dcd6f144 206 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 207 '$data_dir' => array( 'name' => _("Data Directory"),
a28a56da 208 'type' => SMOPT_TYPE_PATH,
dcd6f144 209 'size' => 40 ),
210 '$attachment_dir' => array( 'name' => _("Temp Directory"),
a28a56da 211 'type' => SMOPT_TYPE_PATH,
abd7a3f8 212 'size' => 40 ),
dcd6f144 213 '$dir_hash_level' => array( 'name' => _("Hash Level"),
214 'type' => SMOPT_TYPE_NUMLIST,
215 'posvals' => array( 0 => _("Hash Disabled"),
216 1 => _("Low"),
217 2 => _("Moderate"),
218 3 => _("Medium"),
219 4 => _("High") ) ),
edd4a552 220 '$default_left_size' => array( 'name' => _("Default Left Size"),
dcd6f144 221 'type' => SMOPT_TYPE_NUMLIST,
222 'posvals' => $left_size_values ),
223 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
224 'type' => SMOPT_TYPE_BOOLEAN ),
225 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
226 'type' => SMOPT_TYPE_BOOLEAN ),
227 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
228 'type' => SMOPT_TYPE_BOOLEAN ),
f06543bd 229 '$default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
6fa38b33 230 'type' => SMOPT_TYPE_BOOLEAN ),
8a7d0669 231 '$edit_identity' => array( 'name' => _("Allow editing of identities"),
232 'type' => SMOPT_TYPE_BOOLEAN ),
233 '$edit_name' => array( 'name' => _("Allow editing of full name"),
234 'type' => SMOPT_TYPE_BOOLEAN ),
a3d6c63e 235 '$allow_server_sort' => array( 'name' => _("Use server-side sorting"),
87d7a194 236 'type' => SMOPT_TYPE_BOOLEAN,
237 'default' => false ),
a3d6c63e 238 '$allow_thread_sort' => array( 'name' => _("Use server-side thread sorting"),
87d7a194 239 'type' => SMOPT_TYPE_BOOLEAN,
240 'default' => false ),
a3d6c63e 241 '$allow_charset_search' => array( 'name' => _("Allow server charset search"),
87d7a194 242 'type' => SMOPT_TYPE_BOOLEAN,
243 'default' => false ),
a3d6c63e 244 '$session_name' => array( 'name' => _("PHP session name"),
87d7a194 245 'type' => SMOPT_TYPE_HIDDEN ),
dcd6f144 246 /* --------------------------------------------------------*/
edd4a552 247 'Group5' => array( 'name' => _("Message of the Day"),
248 'type' => SMOPT_TYPE_TITLE ),
249 '$motd' => array( 'name' => _("Message of the Day"),
250 'type' => SMOPT_TYPE_TEXTAREA,
251 'size' => 40 ),
252 /* --------------------------------------------------------*/
497203d4 253 'Group6' => array( 'name' => _("Database"),
254 'type' => SMOPT_TYPE_TITLE ),
255 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
256 'type' => SMOPT_TYPE_STRING,
88cb1b4d 257 'size' => 40 ),
4f40a59d 258 '$addrbook_table' => array( 'name' => _("Address book table"),
259 'type' => SMOPT_TYPE_STRING,
2586d588 260 'size' => 40,
261 'default' => 'address' ),
f58f1fd8 262 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
263 'type' => SMOPT_TYPE_STRING,
264 'size' => 40 ),
265 '$prefs_table' => array( 'name' => _("Preferences table"),
266 'type' => SMOPT_TYPE_STRING,
267 'size' => 40,
268 'default' => 'userprefs' ),
99a6c222 269 '$prefs_user_field' => array('name' => _("Preferences username field"),
270 'type' => SMOPT_TYPE_STRING,
271 'size' => 40,
272 'default' => 'user' ),
273 '$prefs_key_field' => array('name' => _("Preferences key field"),
274 'type' => SMOPT_TYPE_STRING,
275 'size' => 40,
276 'default' => 'prefkey' ),
277 '$prefs_val_field' => array('name' => _("Preferences value field"),
278 'type' => SMOPT_TYPE_STRING,
279 'size' => 40,
280 'default' => 'prefval' ),
30e9932c 281 '$addrbook_global_dsn' => array( 'name' => _("Global address book DSN"),
282 'type' => SMOPT_TYPE_STRING,
283 'size' => 40 ),
284 '$addrbook_global_table' => array( 'name' => _("Global address book table"),
285 'type' => SMOPT_TYPE_STRING,
286 'size' => 40,
287 'default' => 'global_abook' ),
d41e14ed 288 '$addrbook_global_writeable' => array( 'name' => _("Allow writing into global address book"),
30e9932c 289 'type' => SMOPT_TYPE_BOOLEAN ),
290 '$addrbook_global_listing' => array( 'name' => _("Allow listing of global address book"),
291 'type' => SMOPT_TYPE_BOOLEAN ),
39d3ec89 292 'Group9' => array( 'name' => _("Language settings"),
293 'type' => SMOPT_TYPE_TITLE ),
294 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
295 'type' => SMOPT_TYPE_STRLIST,
296 'size' => 7,
297 'posvals' => $language_values ),
298
299 '$default_charset' => array( 'name' => _("Default Charset"),
300 'type' => SMOPT_TYPE_STRLIST,
301 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
302 'iso-8859-2' => 'iso-8859-2',
303 'iso-8859-7' => 'iso-8859-7',
304 'iso-8859-15' => 'iso-8859-15',
305 'iso-8859-15' => 'iso-8859-15',
306 'ns_4551_1' => 'ns_4551_1',
307 'koi8-r' => 'koi8-r',
308 'euc-KR' => 'euc-KR',
309 'windows-1251' => 'windows-1251',
310 'ISO-2022-JP' => 'ISO-2022-JP' ) ),
311 '$show_alternative_names' => array( 'name' => _("Show alternative language names"),
312 'type' => SMOPT_TYPE_BOOLEAN ),
313 '$available_languages' => array( 'name' => _("Available languages"),
314 'type' => SMOPT_TYPE_STRING,
315 'size' => 40 ),
316 '$agresive_decoding' => array( 'name' => _("Use agresive decoding"),
317 'type' => SMOPT_TYPE_BOOLEAN ),
318 'Group10' => array( 'name' => _("Tweaks"),
319 'type' => SMOPT_TYPE_TITLE ),
320 '$advanced_tree' => array( 'name' => _("Use advanced tree folder listing"),
321 'type' => SMOPT_TYPE_BOOLEAN ),
322 '$oldway' => array( 'name' => _("Use old folder listing functions"),
323 'type' => SMOPT_TYPE_BOOLEAN ),
d41e14ed 324 '$use_icons' => array( 'name' => _("Use icons"),
325 'type' => SMOPT_TYPE_BOOLEAN ),
39d3ec89 326 '$use_php_recode' => array( 'name' => _("Use php recode functions"),
327 'type' => SMOPT_TYPE_BOOLEAN ),
328 '$use_php_iconv' => array( 'name' => _("Use php iconv functions"),
329 'type' => SMOPT_TYPE_BOOLEAN ),
edd4a552 330 /* --------------------------------------------------------*/
30e9932c 331 'Group7' => array( 'name' => _("Themes"),
332 'type' => SMOPT_TYPE_TITLE ),
333 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
334 'type' => SMOPT_TYPE_PATH,
335 'size' => 40 ),
336 '$theme_default' => array( 'name' => _("Default theme"),
337 'type' => SMOPT_TYPE_INTEGER,
338 'default' => 0,
339 'comment' => _("Use index number of theme") ),
340 /* --------------------------------------------------------*/
88cb1b4d 341 '$config_use_color' => array( 'name' => '',
a3d6c63e 342 'type' => SMOPT_TYPE_HIDDEN ),
343 '$no_list_for_subscribe' => array( 'name' => '',
39d3ec89 344 'type' => SMOPT_TYPE_HIDDEN ),
497203d4 345 /* --------------------------------------------------------*/
dcd6f144 346
edd4a552 347 );
dcd6f144 348
4f40a59d 349?>