2052250f87a0a8923b437f7978802f705939d9c5
[squirrelmail.git] / plugins / administrator / defines.php
1 <?PHP
2
3 /**
4 * defines.php
5 *
6 * Copyright (c) 1999-2004 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * Philippe Mingo
10 *
11 * $Id$
12 * @package plugins
13 * @subpackage administrator
14 */
15
16 /** */
17 require_once( SM_PATH . 'functions/constants.php' );
18
19 /* Define constants for the various option types. */
20 define('SMOPT_TYPE_UNDEFINED', -1);
21 define('SMOPT_TYPE_STRING', 0);
22 define('SMOPT_TYPE_STRLIST', 1);
23 define('SMOPT_TYPE_TEXTAREA', 2);
24 define('SMOPT_TYPE_INTEGER', 3);
25 define('SMOPT_TYPE_FLOAT', 4);
26 define('SMOPT_TYPE_BOOLEAN', 5);
27 define('SMOPT_TYPE_HIDDEN', 6);
28 define('SMOPT_TYPE_COMMENT', 7);
29 define('SMOPT_TYPE_NUMLIST', 8);
30 define('SMOPT_TYPE_TITLE', 9);
31 define('SMOPT_TYPE_THEME', 10);
32 define('SMOPT_TYPE_PLUGINS', 11);
33 define('SMOPT_TYPE_LDAP', 12);
34 define('SMOPT_TYPE_EXTERNAL', 32);
35 define('SMOPT_TYPE_PATH',33);
36
37 global $languages;
38
39 $language_values = array( );
40 foreach ($languages as $lang_key => $lang_attributes) {
41 if (isset($lang_attributes['NAME'])) {
42 $language_values[$lang_key] = $lang_attributes['NAME'];
43 }
44 }
45 asort( $language_values );
46 $language_values = array_merge(array('' => _("Default")), $language_values);
47 $left_size_values = array();
48 for ($lsv = 100; $lsv <= 300; $lsv += 10) {
49 $left_size_values[$lsv] = "$lsv " . _("pixels");
50 }
51
52 $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
53 'type' => SMOPT_TYPE_COMMENT,
54 'size' => 7 ),
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() ),
61 /* --------------------------------------------------------*/
62 'Group1' => array( 'name' => _("Organization Preferences"),
63 'type' => SMOPT_TYPE_TITLE ),
64 '$org_name' => array( 'name' => _("Organization Name"),
65 'type' => SMOPT_TYPE_STRING,
66 'size' => 40 ),
67 '$org_logo' => array( 'name' => _("Organization Logo"),
68 'type' => SMOPT_TYPE_PATH,
69 'size' => 40,
70 'default' => '../images/sm_logo.png'),
71 '$org_logo_width' => array( 'name' => _("Organization Logo Width"),
72 'type' => SMOPT_TYPE_STRING,
73 'size' => 5,
74 'default' => 0),
75 '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
76 'type' => SMOPT_TYPE_STRING,
77 'size' => 5,
78 'default' => 0),
79 '$org_title' => array( 'name' => _("Organization Title"),
80 'type' => SMOPT_TYPE_STRING,
81 'size' => 40 ),
82 '$signout_page' => array( 'name' => _("Signout Page"),
83 'type' => SMOPT_TYPE_PATH,
84 'size' => 40 ),
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 ),
89 '$frame_top' => array( 'name' => _("Top Frame"),
90 'type' => SMOPT_TYPE_STRING,
91 'size' => 40,
92 'default' => '_top' ),
93 /* --------------------------------------------------------*/
94 'Group2' => array( 'name' => _("Server Settings"),
95 'type' => SMOPT_TYPE_TITLE ),
96 '$domain' => array( 'name' => _("Mail Domain"),
97 'type' => SMOPT_TYPE_STRING,
98 'size' => 40 ),
99 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
100 'type' => SMOPT_TYPE_STRING,
101 'size' => 40 ),
102 '$imapPort' => array( 'name' => _("IMAP Server Port"),
103 'type' => SMOPT_TYPE_INTEGER ),
104 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
105 'type' => SMOPT_TYPE_STRLIST,
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,
113 'comment' => _("Use \"detect\" to auto-detect."),
114 'size' => 10,
115 'default' => 'detect' ),
116 '$use_imap_tls' => array( 'name' => _("Use TLS for IMAP Connections"),
117 'type' => SMOPT_TYPE_BOOLEAN,
118 'comment' => _("Requires PHP 4.3.x! Experimental."),
119 'default' => false ),
120 '$imap_auth_mech' => array( 'name' => _("IMAP Authentication Type"),
121 'type' => SMOPT_TYPE_STRLIST,
122 'posvals' => array('login' => 'IMAP LOGIN',
123 'cram-md5' => 'CRAM-MD5',
124 'digest-md5' => 'DIGEST-MD5'),
125 'default' => 'login' ),
126 '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
127 'type' => SMOPT_TYPE_BOOLEAN,
128 'comment' => "Say 'no' for SMTP" ),
129 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
130 'type' => SMOPT_TYPE_STRING,
131 'size' => 40 ),
132 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
133 'type' => SMOPT_TYPE_STRING,
134 'size' => 40 ),
135 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
136 'type' => SMOPT_TYPE_INTEGER ),
137 '$use_smtp_tls' => array( 'name' => _("Use TLS for SMTP Connections"),
138 'type' => SMOPT_TYPE_BOOLEAN,
139 'comment' => _("Requires PHP 4.3.x! Experimental."),
140 'default' => false ),
141 '$smtp_auth_mech' => array( 'name' => _("SMTP Authentication Type"),
142 'type' => SMOPT_TYPE_STRLIST,
143 'posvals' => array('none' => 'No SMTP auth',
144 'login' => 'Login (Plaintext)',
145 'cram-md5' => 'CRAM-MD5',
146 'digest-md5' => 'DIGEST-MD5'),
147 'default' => 'none'),
148 '$pop_before_smtp' => array( 'name' => _("POP3 Before SMTP?"),
149 'type' => SMOPT_TYPE_BOOLEAN,
150 'default' => false ),
151 '$invert_time' => array( 'name' => _("Invert Time"),
152 'type' => SMOPT_TYPE_BOOLEAN ),
153 '$default_use_mdn' => array( 'name' => _("Use Confirmation Flags"),
154 'type' => SMOPT_TYPE_BOOLEAN ),
155 /* --------------------------------------------------------*/
156 'Group3' => array( 'name' => _("Folders Defaults"),
157 'type' => SMOPT_TYPE_TITLE ),
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"),
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")) ),
193 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
194 'type' => SMOPT_TYPE_NUMLIST ,
195 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
196 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
197 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
198 'type' => SMOPT_TYPE_BOOLEAN ),
199 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
200 'type' => SMOPT_TYPE_BOOLEAN ),
201 '$delete_folder' => array( 'name' => _("Auto delete folders"),
202 'type' => SMOPT_TYPE_BOOLEAN ),
203 '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
204 'type' => SMOPT_TYPE_BOOLEAN,
205 'default' => false),
206 /* --------------------------------------------------------*/
207 'Group4' => array( 'name' => _("General Options"),
208 'type' => SMOPT_TYPE_TITLE ),
209 '$data_dir' => array( 'name' => _("Data Directory"),
210 'type' => SMOPT_TYPE_PATH,
211 'size' => 40 ),
212 '$attachment_dir' => array( 'name' => _("Temp Directory"),
213 'type' => SMOPT_TYPE_PATH,
214 'size' => 40 ),
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") ) ),
222 '$default_left_size' => array( 'name' => _("Default Left Size"),
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 ),
231 'default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
232 'type' => SMOPT_TYPE_BOOLEAN ),
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 ),
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 '$session_name' => array( 'name' => _("PHP session name"),
247 'type' => SMOPT_TYPE_HIDDEN ),
248 /* --------------------------------------------------------*/
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 /* --------------------------------------------------------*/
255 'Group6' => array( 'name' => _("Database"),
256 'type' => SMOPT_TYPE_TITLE ),
257 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
258 'type' => SMOPT_TYPE_STRING,
259 'size' => 40 ),
260 '$addrbook_table' => array( 'name' => _("Address book table"),
261 'type' => SMOPT_TYPE_STRING,
262 'size' => 40,
263 'default' => 'address' ),
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' ),
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' ),
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' ),
290 '$addrbook_global_writeable' => array( 'name' => _("Allow writing into global address book"),
291 'type' => SMOPT_TYPE_BOOLEAN ),
292 '$addrbook_global_listing' => array( 'name' => _("Allow listing of global address book"),
293 'type' => SMOPT_TYPE_BOOLEAN ),
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 ),
326 '$use_icons' => array( 'name' => _("Use icons"),
327 'type' => SMOPT_TYPE_BOOLEAN ),
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 ),
332 /* --------------------------------------------------------*/
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 /* --------------------------------------------------------*/
343 '$config_use_color' => array( 'name' => '',
344 'type' => SMOPT_TYPE_HIDDEN ),
345 '$no_list_for_subscribe' => array( 'name' => '',
346 'type' => SMOPT_TYPE_HIDDEN ),
347 /* --------------------------------------------------------*/
348
349 );
350
351 ?>