c7819c2b0a531e94a6d98c967884acca85d1932a
[squirrelmail.git] / plugins / administrator / defines.php
1 <?php
2 /**
3 * Administrator plugin - Option definitions
4 *
5 * @version $Id$
6 * @author Philippe Mingo
7 * @copyright (c) 1999-2005 The SquirrelMail Project Team
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
9 * @package plugins
10 * @subpackage administrator
11 */
12
13 /** @ignore */
14 if (!defined('SM_PATH')) define('SM_PATH','../../');
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, $version;
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 'macosx' => _("Mac OS X Mailserver"),
111 'hmailserver' => _("hMailServer IMAP server"),
112 'mercury32' => _("Mercury/32 IMAP server"),
113 'bincimap' => _("Binc IMAP server"),
114 'other' => _("Not one of the above servers") ) ),
115 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
116 'type' => SMOPT_TYPE_STRING,
117 'comment' => _("Use &quot;detect&quot; to auto-detect."),
118 'size' => 10,
119 'default' => 'detect' ),
120 '$use_imap_tls' => array( 'name' => _("Use TLS for IMAP Connections"),
121 'type' => SMOPT_TYPE_BOOLEAN,
122 'comment' => _("Requires PHP 4.3.x! Experimental."),
123 'default' => false ),
124 '$imap_auth_mech' => array( 'name' => _("IMAP Authentication Type"),
125 'type' => SMOPT_TYPE_STRLIST,
126 'posvals' => array('login' => _("IMAP login"),
127 'cram-md5' => 'CRAM-MD5',
128 'digest-md5' => 'DIGEST-MD5'),
129 'default' => 'login' ),
130 '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
131 'type' => SMOPT_TYPE_BOOLEAN,
132 'comment' => _("Choose &quot;no&quot; for SMTP") ),
133 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
134 'type' => SMOPT_TYPE_STRING,
135 'size' => 40 ),
136 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
137 'type' => SMOPT_TYPE_STRING,
138 'size' => 40 ),
139 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
140 'type' => SMOPT_TYPE_INTEGER ),
141 '$use_smtp_tls' => array( 'name' => _("Use TLS for SMTP Connections"),
142 'type' => SMOPT_TYPE_BOOLEAN,
143 'comment' => _("Requires PHP 4.3.x! Experimental."),
144 'default' => false ),
145 '$smtp_auth_mech' => array( 'name' => _("SMTP Authentication Type"),
146 'type' => SMOPT_TYPE_STRLIST,
147 'posvals' => array('none' => _("No SMTP auth"),
148 'login' => _("Login (plain text)"),
149 'cram-md5' => 'CRAM-MD5',
150 'digest-md5' => 'DIGEST-MD5'),
151 'default' => 'none'),
152 '$pop_before_smtp' => array( 'name' => _("POP3 Before SMTP?"),
153 'type' => SMOPT_TYPE_BOOLEAN,
154 'default' => false ),
155 '$encode_header_key' => array( 'name' => _("Header Encryption Key"),
156 'type' => SMOPT_TYPE_STRING ),
157 '$invert_time' => array( 'name' => _("Invert Time"),
158 'type' => SMOPT_TYPE_BOOLEAN ),
159 /* --------------------------------------------------------*/
160 'Group3' => array( 'name' => _("Folders Defaults"),
161 'type' => SMOPT_TYPE_TITLE ),
162 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
163 'type' => SMOPT_TYPE_STRING,
164 'size' => 40 ),
165 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
166 'type' => SMOPT_TYPE_BOOLEAN ),
167 '$trash_folder' => array( 'name' => _("Trash Folder"),
168 'type' => SMOPT_TYPE_STRING,
169 'size' => 40 ),
170 '$sent_folder' => array( 'name' => _("Sent Folder"),
171 'type' => SMOPT_TYPE_STRING,
172 'size' => 40 ),
173 '$draft_folder' => array( 'name' => _("Draft Folder"),
174 'type' => SMOPT_TYPE_STRING,
175 'size' => 40 ),
176 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
177 'type' => SMOPT_TYPE_BOOLEAN ),
178 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
179 'type' => SMOPT_TYPE_BOOLEAN ),
180 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
181 'type' => SMOPT_TYPE_BOOLEAN ),
182 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
183 'type' => SMOPT_TYPE_BOOLEAN ),
184 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
185 'type' => SMOPT_TYPE_BOOLEAN ),
186 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
187 'type' => SMOPT_TYPE_BOOLEAN ),
188 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
189 'type' => SMOPT_TYPE_BOOLEAN ),
190 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
191 'type' => SMOPT_TYPE_BOOLEAN ),
192 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
193 'type' => SMOPT_TYPE_NUMLIST,
194 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
195 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
196 SMPREF_UNSEEN_ALL => _("All Folders")) ),
197 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
198 'type' => SMOPT_TYPE_NUMLIST ,
199 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
200 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
201 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
202 'type' => SMOPT_TYPE_BOOLEAN ),
203 '$delete_folder' => array( 'name' => _("Auto delete folders"),
204 'type' => SMOPT_TYPE_BOOLEAN ),
205 '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
206 'type' => SMOPT_TYPE_BOOLEAN,
207 'default' => false),
208 /* --------------------------------------------------------*/
209 'Group4' => array( 'name' => _("General Options"),
210 'type' => SMOPT_TYPE_TITLE ),
211 '$data_dir' => array( 'name' => _("Data Directory"),
212 'type' => SMOPT_TYPE_PATH,
213 'size' => 40 ),
214 '$attachment_dir' => array( 'name' => _("Temp Directory"),
215 'type' => SMOPT_TYPE_PATH,
216 'size' => 40 ),
217 '$dir_hash_level' => array( 'name' => _("Hash Level"),
218 'type' => SMOPT_TYPE_NUMLIST,
219 'posvals' => array( 0 => _("Hash Disabled"),
220 1 => _("Low"),
221 2 => _("Moderate"),
222 3 => _("Medium"),
223 4 => _("High") ) ),
224 '$default_left_size' => array( 'name' => _("Default Left Size"),
225 'type' => SMOPT_TYPE_NUMLIST,
226 'posvals' => $left_size_values ),
227 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
228 'type' => SMOPT_TYPE_BOOLEAN ),
229 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
230 'type' => SMOPT_TYPE_BOOLEAN ),
231 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
232 'type' => SMOPT_TYPE_BOOLEAN ),
233 '$default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
234 'type' => SMOPT_TYPE_BOOLEAN ),
235 '$edit_identity' => array( 'name' => _("Allow editing of identities"),
236 'type' => SMOPT_TYPE_BOOLEAN ),
237 '$edit_name' => array( 'name' => _("Allow editing of full name"),
238 'type' => SMOPT_TYPE_BOOLEAN ),
239 '$hide_auth_header' => array( 'name' => _("Remove username from headers"),
240 'comment' => _("Used only when identities can't be modified"),
241 'type' => SMOPT_TYPE_BOOLEAN ),
242 '$allow_server_sort' => array( 'name' => _("Use server-side sorting"),
243 'type' => SMOPT_TYPE_BOOLEAN,
244 'default' => false ),
245 '$allow_thread_sort' => array( 'name' => _("Use server-side thread sorting"),
246 'type' => SMOPT_TYPE_BOOLEAN,
247 'default' => false ),
248 '$allow_charset_search' => array( 'name' => _("Allow server charset search"),
249 'type' => SMOPT_TYPE_BOOLEAN,
250 'default' => false ),
251 '$allow_advanced_search' => array( 'name' => _("Search functions"),
252 'type' => SMOPT_TYPE_NUMLIST,
253 'posvals' => array( 0 => _("Only basic search"),
254 1 => _("Only advanced search"),
255 2 => _("Both search functions") ),
256 'default' => 0 ),
257 '$session_name' => array( 'name' => _("PHP session name"),
258 'type' => SMOPT_TYPE_HIDDEN ),
259 '$time_zone_type' => array( 'name' => _("Time Zone Configuration"),
260 'type' => SMOPT_TYPE_NUMLIST,
261 'posvals' => array( 0 => _("Standard GNU C time zones"),
262 1 => _("Strict time zones"),
263 2 => _("Custom GNU C time zones"),
264 3 => _("Custom strict time zones")),
265 'default' => 0 ),
266 /* --------------------------------------------------------*/
267 'Group5' => array( 'name' => _("Message of the Day"),
268 'type' => SMOPT_TYPE_TITLE ),
269 '$motd' => array( 'name' => _("Message of the Day"),
270 'type' => SMOPT_TYPE_TEXTAREA,
271 'size' => 40 ),
272 /* ---- Database settings ---- */
273 'Group6' => array( 'name' => _("Database"),
274 'type' => SMOPT_TYPE_TITLE ),
275 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
276 'type' => SMOPT_TYPE_STRING,
277 'size' => 40 ),
278 '$addrbook_table' => array( 'name' => _("Address book table"),
279 'type' => SMOPT_TYPE_STRING,
280 'size' => 40,
281 'default' => 'address' ),
282 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
283 'type' => SMOPT_TYPE_STRING,
284 'size' => 40 ),
285 '$prefs_table' => array( 'name' => _("Preferences table"),
286 'type' => SMOPT_TYPE_STRING,
287 'size' => 40,
288 'default' => 'userprefs' ),
289 '$prefs_user_field' => array('name' => _("Preferences username field"),
290 'type' => SMOPT_TYPE_STRING,
291 'size' => 40,
292 'default' => 'user' ),
293 '$prefs_user_size' => array( 'name' => _("Size of username field"),
294 'type' => SMOPT_TYPE_INTEGER ),
295 '$prefs_key_field' => array('name' => _("Preferences key field"),
296 'type' => SMOPT_TYPE_STRING,
297 'size' => 40,
298 'default' => 'prefkey' ),
299 '$prefs_key_size' => array( 'name' => _("Size of key field"),
300 'type' => SMOPT_TYPE_INTEGER ),
301 '$prefs_val_field' => array('name' => _("Preferences value field"),
302 'type' => SMOPT_TYPE_STRING,
303 'size' => 40,
304 'default' => 'prefval' ),
305 '$prefs_val_size' => array( 'name' => _("Size of value field"),
306 'type' => SMOPT_TYPE_INTEGER ),
307 '$addrbook_global_dsn' => array( 'name' => _("Global address book DSN"),
308 'type' => SMOPT_TYPE_STRING,
309 'size' => 40 ),
310 '$addrbook_global_table' => array( 'name' => _("Global address book table"),
311 'type' => SMOPT_TYPE_STRING,
312 'size' => 40,
313 'default' => 'global_abook' ),
314 '$addrbook_global_writeable' => array( 'name' => _("Allow writing into global address book"),
315 'type' => SMOPT_TYPE_BOOLEAN ),
316 '$addrbook_global_listing' => array( 'name' => _("Allow listing of global address book"),
317 'type' => SMOPT_TYPE_BOOLEAN ),
318 /* ---- Language settings ---- */
319 'Group9' => array( 'name' => _("Language settings"),
320 'type' => SMOPT_TYPE_TITLE ),
321 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
322 'type' => SMOPT_TYPE_STRLIST,
323 'size' => 7,
324 'posvals' => $language_values ),
325 '$default_charset' => array( 'name' => _("Default Charset"),
326 'type' => SMOPT_TYPE_STRLIST,
327 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
328 'iso-8859-2' => 'iso-8859-2',
329 'iso-8859-7' => 'iso-8859-7',
330 'iso-8859-9' => 'iso-8859-9',
331 'iso-8859-15' => 'iso-8859-15',
332 'utf-8' => 'utf-8',
333 'koi8-r' => 'koi8-r',
334 'euc-kr' => 'euc-kr',
335 'big5' => 'big5',
336 'gb2312' => 'gb2312',
337 'tis-620' => 'tis-620',
338 'windows-1251' => 'windows-1251',
339 'windows-1255' => 'windows-1255',
340 'windows-1256' => 'windows-1256',
341 'iso-2022-jp' => 'iso-2022-jp' ) ),
342 '$show_alternative_names' => array( 'name' => _("Show alternative language names"),
343 'type' => SMOPT_TYPE_BOOLEAN ),
344 '$aggressive_decoding' => array( 'name' => _("Enable aggressive decoding"),
345 'type' => SMOPT_TYPE_BOOLEAN ),
346 '$lossy_encoding' => array( 'name' => _("Enable lossy encoding"),
347 'type' => SMOPT_TYPE_BOOLEAN ),
348 /* ---- Tweaks ---- */
349 'Group10' => array( 'name' => _("Tweaks"),
350 'type' => SMOPT_TYPE_TITLE ),
351 '$advanced_tree' => array( 'name' => _("Use advanced tree folder listing"),
352 'type' => SMOPT_TYPE_BOOLEAN ),
353 '$use_icons' => array( 'name' => _("Use icons"),
354 'type' => SMOPT_TYPE_BOOLEAN ),
355 '$use_iframe' => array( 'name' => _("Use inline frames with HTML mails"),
356 'type' => SMOPT_TYPE_BOOLEAN ),
357 '$use_php_recode' => array( 'name' => _("Use PHP recode functions"),
358 'type' => SMOPT_TYPE_BOOLEAN ),
359 '$use_php_iconv' => array( 'name' => _("Use PHP iconv functions"),
360 'type' => SMOPT_TYPE_BOOLEAN ),
361 '$allow_remote_configtest' => array( 'name' => _("Allow remote configuration test"),
362 'type' => SMOPT_TYPE_BOOLEAN ),
363 /* ---- Settings of address books ---- */
364 'Group11' => array( 'name' => _("Address Books"),
365 'type' => SMOPT_TYPE_TITLE ),
366 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Addressbook"),
367 'type' => SMOPT_TYPE_BOOLEAN ),
368 '$abook_global_file' => array( 'name' => _("Global address book file"),
369 'type' => SMOPT_TYPE_STRING ),
370 '$abook_global_file_writeable' => array( 'name' => _("Allow writing into global address book file"),
371 'type' => SMOPT_TYPE_BOOLEAN ),
372 '$abook_global_file_listing' => array( 'name' => _("Allow listing of global address book"),
373 'type' => SMOPT_TYPE_BOOLEAN ),
374 /* --------------------------------------------------------*/
375 'Group7' => array( 'name' => _("Themes"),
376 'type' => SMOPT_TYPE_TITLE ),
377 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
378 'type' => SMOPT_TYPE_PATH,
379 'size' => 40 ),
380 '$theme_default' => array( 'name' => _("Default theme"),
381 'type' => SMOPT_TYPE_INTEGER,
382 'default' => 0,
383 'comment' => _("Use index number of theme") ),
384 /* --------------------------------------------------------*/
385 '$config_use_color' => array( 'name' => '',
386 'type' => SMOPT_TYPE_HIDDEN ),
387 '$no_list_for_subscribe' => array( 'name' => '',
388 'type' => SMOPT_TYPE_HIDDEN ),
389 /* --------------------------------------------------------*/
390
391 );
392
393 ?>