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