UI changes in show/hide saved/recent
[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
7 * @copyright (c) 1999-2004 The SquirrelMail Project Team
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 ),
88cb1b4d 52 'SM_ver' => array( 'name' => _("Squirrelmail Version"),
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,
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 ),
a3d6c63e 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"),
107 'other' => _("Not one of the above servers") ) ),
108 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
109 'type' => SMOPT_TYPE_STRING,
edd4a552 110 'comment' => _("Use \"detect\" to auto-detect."),
2586d588 111 'size' => 10,
112 'default' => 'detect' ),
a3d6c63e 113 '$use_imap_tls' => array( 'name' => _("Use TLS for IMAP Connections"),
a2ccd603 114 'type' => SMOPT_TYPE_BOOLEAN,
a3d6c63e 115 'comment' => _("Requires PHP 4.3.x! Experimental."),
a2ccd603 116 'default' => false ),
a3d6c63e 117 '$imap_auth_mech' => array( 'name' => _("IMAP Authentication Type"),
a2ccd603 118 'type' => SMOPT_TYPE_STRLIST,
fe0b18b3 119 'posvals' => array('login' => 'IMAP LOGIN',
a2ccd603 120 'cram-md5' => 'CRAM-MD5',
fe0b18b3 121 'digest-md5' => 'DIGEST-MD5'),
122 'default' => 'login' ),
a3d6c63e 123 '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
124 'type' => SMOPT_TYPE_BOOLEAN,
125 'comment' => "Say 'no' for SMTP" ),
dcd6f144 126 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
127 'type' => SMOPT_TYPE_STRING,
128 'size' => 40 ),
abd7a3f8 129 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
130 'type' => SMOPT_TYPE_STRING,
131 'size' => 40 ),
132 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
88cb1b4d 133 'type' => SMOPT_TYPE_INTEGER ),
a3d6c63e 134 '$use_smtp_tls' => array( 'name' => _("Use TLS for SMTP Connections"),
a2ccd603 135 'type' => SMOPT_TYPE_BOOLEAN,
a3d6c63e 136 'comment' => _("Requires PHP 4.3.x! Experimental."),
a2ccd603 137 'default' => false ),
a3d6c63e 138 '$smtp_auth_mech' => array( 'name' => _("SMTP Authentication Type"),
a2ccd603 139 'type' => SMOPT_TYPE_STRLIST,
140 'posvals' => array('none' => 'No SMTP auth',
fe0b18b3 141 'login' => 'Login (Plaintext)',
a2ccd603 142 'cram-md5' => 'CRAM-MD5',
143 'digest-md5' => 'DIGEST-MD5'),
144 'default' => 'none'),
a3d6c63e 145 '$pop_before_smtp' => array( 'name' => _("POP3 Before SMTP?"),
87d7a194 146 'type' => SMOPT_TYPE_BOOLEAN,
147 'default' => false ),
bd193a8d 148 '$skip_SM_header' => array( 'name' => _("Hide SquirrelMail Header"),
149 'type' => SMOPT_TYPE_BOOLEAN ),
0e66bc84 150 '$invert_time' => array( 'name' => _("Invert Time"),
151 'type' => SMOPT_TYPE_BOOLEAN ),
152 /* --------------------------------------------------------*/
153 'Group3' => array( 'name' => _("Folders Defaults"),
154 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 155 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
156 'type' => SMOPT_TYPE_STRING,
157 'size' => 40 ),
158 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
159 'type' => SMOPT_TYPE_BOOLEAN ),
160 '$trash_folder' => array( 'name' => _("Trash Folder"),
161 'type' => SMOPT_TYPE_STRING,
162 'size' => 40 ),
163 '$sent_folder' => array( 'name' => _("Sent Folder"),
164 'type' => SMOPT_TYPE_STRING,
165 'size' => 40 ),
166 '$draft_folder' => array( 'name' => _("Draft Folder"),
167 'type' => SMOPT_TYPE_STRING,
168 'size' => 40 ),
169 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
170 'type' => SMOPT_TYPE_BOOLEAN ),
171 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
172 'type' => SMOPT_TYPE_BOOLEAN ),
173 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
174 'type' => SMOPT_TYPE_BOOLEAN ),
175 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
176 'type' => SMOPT_TYPE_BOOLEAN ),
177 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
178 'type' => SMOPT_TYPE_BOOLEAN ),
179 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
180 'type' => SMOPT_TYPE_BOOLEAN ),
181 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
182 'type' => SMOPT_TYPE_BOOLEAN ),
183 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
184 'type' => SMOPT_TYPE_BOOLEAN ),
185 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
5ed13ec8 186 'type' => SMOPT_TYPE_NUMLIST,
187 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
188 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
189 SMPREF_UNSEEN_ALL => _("All Folders")) ),
dcd6f144 190 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
5ed13ec8 191 'type' => SMOPT_TYPE_NUMLIST ,
192 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
193 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
dcd6f144 194 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
195 'type' => SMOPT_TYPE_BOOLEAN ),
86143034 196 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Addressbook"),
e91cf665 197 'type' => SMOPT_TYPE_BOOLEAN ),
4e85a37f 198 '$delete_folder' => array( 'name' => _("Auto delete folders"),
199 'type' => SMOPT_TYPE_BOOLEAN ),
a3d6c63e 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 ),
a3d6c63e 234 '$allow_server_sort' => array( 'name' => _("Use server-side sorting"),
87d7a194 235 'type' => SMOPT_TYPE_BOOLEAN,
236 'default' => false ),
a3d6c63e 237 '$allow_thread_sort' => array( 'name' => _("Use server-side thread sorting"),
87d7a194 238 'type' => SMOPT_TYPE_BOOLEAN,
239 'default' => false ),
a3d6c63e 240 '$allow_charset_search' => array( 'name' => _("Allow server charset search"),
87d7a194 241 'type' => SMOPT_TYPE_BOOLEAN,
242 'default' => false ),
a3d6c63e 243 '$session_name' => array( 'name' => _("PHP session name"),
87d7a194 244 'type' => SMOPT_TYPE_HIDDEN ),
dcd6f144 245 /* --------------------------------------------------------*/
edd4a552 246 'Group5' => array( 'name' => _("Message of the Day"),
247 'type' => SMOPT_TYPE_TITLE ),
248 '$motd' => array( 'name' => _("Message of the Day"),
249 'type' => SMOPT_TYPE_TEXTAREA,
250 'size' => 40 ),
251 /* --------------------------------------------------------*/
497203d4 252 'Group6' => array( 'name' => _("Database"),
253 'type' => SMOPT_TYPE_TITLE ),
254 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
255 'type' => SMOPT_TYPE_STRING,
88cb1b4d 256 'size' => 40 ),
4f40a59d 257 '$addrbook_table' => array( 'name' => _("Address book table"),
258 'type' => SMOPT_TYPE_STRING,
2586d588 259 'size' => 40,
260 'default' => 'address' ),
f58f1fd8 261 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
262 'type' => SMOPT_TYPE_STRING,
263 'size' => 40 ),
264 '$prefs_table' => array( 'name' => _("Preferences table"),
265 'type' => SMOPT_TYPE_STRING,
266 'size' => 40,
267 'default' => 'userprefs' ),
99a6c222 268 '$prefs_user_field' => array('name' => _("Preferences username field"),
269 'type' => SMOPT_TYPE_STRING,
270 'size' => 40,
271 'default' => 'user' ),
272 '$prefs_key_field' => array('name' => _("Preferences key field"),
273 'type' => SMOPT_TYPE_STRING,
274 'size' => 40,
275 'default' => 'prefkey' ),
276 '$prefs_val_field' => array('name' => _("Preferences value field"),
277 'type' => SMOPT_TYPE_STRING,
278 'size' => 40,
279 'default' => 'prefval' ),
30e9932c 280 '$addrbook_global_dsn' => array( 'name' => _("Global address book DSN"),
281 'type' => SMOPT_TYPE_STRING,
282 'size' => 40 ),
283 '$addrbook_global_table' => array( 'name' => _("Global address book table"),
284 'type' => SMOPT_TYPE_STRING,
285 'size' => 40,
286 'default' => 'global_abook' ),
d41e14ed 287 '$addrbook_global_writeable' => array( 'name' => _("Allow writing into global address book"),
30e9932c 288 'type' => SMOPT_TYPE_BOOLEAN ),
289 '$addrbook_global_listing' => array( 'name' => _("Allow listing of global address book"),
290 'type' => SMOPT_TYPE_BOOLEAN ),
39d3ec89 291 'Group9' => array( 'name' => _("Language settings"),
292 'type' => SMOPT_TYPE_TITLE ),
293 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
294 'type' => SMOPT_TYPE_STRLIST,
295 'size' => 7,
296 'posvals' => $language_values ),
297
298 '$default_charset' => array( 'name' => _("Default Charset"),
299 'type' => SMOPT_TYPE_STRLIST,
300 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
301 'iso-8859-2' => 'iso-8859-2',
302 'iso-8859-7' => 'iso-8859-7',
303 'iso-8859-15' => 'iso-8859-15',
304 'iso-8859-15' => 'iso-8859-15',
305 'ns_4551_1' => 'ns_4551_1',
306 'koi8-r' => 'koi8-r',
307 'euc-KR' => 'euc-KR',
308 'windows-1251' => 'windows-1251',
309 'ISO-2022-JP' => 'ISO-2022-JP' ) ),
310 '$show_alternative_names' => array( 'name' => _("Show alternative language names"),
311 'type' => SMOPT_TYPE_BOOLEAN ),
312 '$available_languages' => array( 'name' => _("Available languages"),
313 'type' => SMOPT_TYPE_STRING,
314 'size' => 40 ),
315 '$agresive_decoding' => array( 'name' => _("Use agresive decoding"),
316 'type' => SMOPT_TYPE_BOOLEAN ),
317 'Group10' => array( 'name' => _("Tweaks"),
318 'type' => SMOPT_TYPE_TITLE ),
319 '$advanced_tree' => array( 'name' => _("Use advanced tree folder listing"),
320 'type' => SMOPT_TYPE_BOOLEAN ),
321 '$oldway' => array( 'name' => _("Use old folder listing functions"),
322 'type' => SMOPT_TYPE_BOOLEAN ),
d41e14ed 323 '$use_icons' => array( 'name' => _("Use icons"),
324 'type' => SMOPT_TYPE_BOOLEAN ),
39d3ec89 325 '$use_php_recode' => array( 'name' => _("Use php recode functions"),
326 'type' => SMOPT_TYPE_BOOLEAN ),
327 '$use_php_iconv' => array( 'name' => _("Use php iconv functions"),
328 'type' => SMOPT_TYPE_BOOLEAN ),
edd4a552 329 /* --------------------------------------------------------*/
30e9932c 330 'Group7' => array( 'name' => _("Themes"),
331 'type' => SMOPT_TYPE_TITLE ),
332 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
333 'type' => SMOPT_TYPE_PATH,
334 'size' => 40 ),
335 '$theme_default' => array( 'name' => _("Default theme"),
336 'type' => SMOPT_TYPE_INTEGER,
337 'default' => 0,
338 'comment' => _("Use index number of theme") ),
339 /* --------------------------------------------------------*/
88cb1b4d 340 '$config_use_color' => array( 'name' => '',
a3d6c63e 341 'type' => SMOPT_TYPE_HIDDEN ),
342 '$no_list_for_subscribe' => array( 'name' => '',
39d3ec89 343 'type' => SMOPT_TYPE_HIDDEN ),
497203d4 344 /* --------------------------------------------------------*/
dcd6f144 345
edd4a552 346 );
dcd6f144 347
0df03ce7 348?>