Fix the save message button, using new functionality marc introduced yesterday.
[squirrelmail.git] / plugins / administrator / defines.php
1 <?PHP
2
3 /**
4 * defines.php
5 *
6 * Copyright (c) 1999-2003 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 */
13
14 require_once( SM_PATH . 'functions/constants.php' );
15
16 /* Define constants for the various option types. */
17 define('SMOPT_TYPE_UNDEFINED', -1);
18 define('SMOPT_TYPE_STRING', 0);
19 define('SMOPT_TYPE_STRLIST', 1);
20 define('SMOPT_TYPE_TEXTAREA', 2);
21 define('SMOPT_TYPE_INTEGER', 3);
22 define('SMOPT_TYPE_FLOAT', 4);
23 define('SMOPT_TYPE_BOOLEAN', 5);
24 define('SMOPT_TYPE_HIDDEN', 6);
25 define('SMOPT_TYPE_COMMENT', 7);
26 define('SMOPT_TYPE_NUMLIST', 8);
27 define('SMOPT_TYPE_TITLE', 9);
28 define('SMOPT_TYPE_THEME', 10);
29 define('SMOPT_TYPE_PLUGINS', 11);
30 define('SMOPT_TYPE_LDAP', 12);
31 define('SMOPT_TYPE_EXTERNAL', 32);
32 define('SMOPT_TYPE_PATH',33);
33
34 global $languages;
35
36 $language_values = array( );
37 foreach ($languages as $lang_key => $lang_attributes) {
38 if (isset($lang_attributes['NAME'])) {
39 $language_values[$lang_key] = $lang_attributes['NAME'];
40 }
41 }
42 asort( $language_values );
43 $language_values = array_merge(array('' => _("Default")), $language_values);
44 $left_size_values = array();
45 for ($lsv = 100; $lsv <= 300; $lsv += 10) {
46 $left_size_values[$lsv] = "$lsv " . _("pixels");
47 }
48
49 $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
50 'type' => SMOPT_TYPE_COMMENT,
51 'size' => 7 ),
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() ),
58 /* --------------------------------------------------------*/
59 'Group1' => array( 'name' => _("Organization Preferences"),
60 'type' => SMOPT_TYPE_TITLE ),
61 '$org_name' => array( 'name' => _("Organization Name"),
62 'type' => SMOPT_TYPE_STRING,
63 'size' => 40 ),
64 '$org_logo' => array( 'name' => _("Organization Logo"),
65 'type' => SMOPT_TYPE_PATH,
66 'size' => 40,
67 'default' => '../images/sm_logo.png'),
68 '$org_logo_width' => array( 'name' => _("Organization Logo Width"),
69 'type' => SMOPT_TYPE_INTEGER,
70 'size' => 5,
71 'default' => 0),
72 '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
73 'type' => SMOPT_TYPE_INTEGER,
74 'size' => 5,
75 'default' => 0),
76 '$org_title' => array( 'name' => _("Organization Title"),
77 'type' => SMOPT_TYPE_STRING,
78 'size' => 40 ),
79 '$signout_page' => array( 'name' => _("Signout Page"),
80 'type' => SMOPT_TYPE_PATH,
81 'size' => 40 ),
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 ),
86 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
87 'type' => SMOPT_TYPE_STRLIST,
88 'size' => 7,
89 'posvals' => $language_values ),
90 '$frame_top' => array( 'name' => _("Top Frame"),
91 'type' => SMOPT_TYPE_STRING,
92 'size' => 40,
93 'default' => '_top' ),
94 /* --------------------------------------------------------*/
95 'Group2' => array( 'name' => _("Server Settings"),
96 'type' => SMOPT_TYPE_TITLE ),
97 '$domain' => array( 'name' => _("Mail Domain"),
98 'type' => SMOPT_TYPE_STRING,
99 'size' => 40 ),
100 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
101 'type' => SMOPT_TYPE_STRING,
102 'size' => 40 ),
103 '$imapPort' => array( 'name' => _("IMAP Server Port"),
104 'type' => SMOPT_TYPE_INTEGER ),
105 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
106 'type' => SMOPT_TYPE_STRLIST,
107 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
108 'uw' => _("University of Washington's IMAP server"),
109 'exchange' => _("Microsoft Exchange IMAP server"),
110 'courier' => _("Courier IMAP server"),
111 'other' => _("Not one of the above servers") ) ),
112 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
113 'type' => SMOPT_TYPE_STRING,
114 'comment' => _("Use \"detect\" to auto-detect."),
115 'size' => 10,
116 'default' => 'detect' ),
117 '$use_imap_tls' => array( 'name' => _("Use TLS for IMAP Connections"),
118 'type' => SMOPT_TYPE_BOOLEAN,
119 'comment' => _("Requires PHP 4.3.x! Experimental."),
120 'default' => false ),
121 '$imap_auth_mech' => array( 'name' => _("IMAP Authentication Type"),
122 'type' => SMOPT_TYPE_STRLIST,
123 'posvals' => array('login' => 'IMAP LOGIN',
124 'cram-md5' => 'CRAM-MD5',
125 'digest-md5' => 'DIGEST-MD5'),
126 'default' => 'login' ),
127 '$useSendmail' => array( 'name' => _("Use Sendmail Binary"),
128 'type' => SMOPT_TYPE_BOOLEAN,
129 'comment' => "Say 'no' for SMTP" ),
130 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
131 'type' => SMOPT_TYPE_STRING,
132 'size' => 40 ),
133 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
134 'type' => SMOPT_TYPE_STRING,
135 'size' => 40 ),
136 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
137 'type' => SMOPT_TYPE_INTEGER ),
138 '$use_smtp_tls' => array( 'name' => _("Use TLS for SMTP Connections"),
139 'type' => SMOPT_TYPE_BOOLEAN,
140 'comment' => _("Requires PHP 4.3.x! Experimental."),
141 'default' => false ),
142 '$smtp_auth_mech' => array( 'name' => _("SMTP Authentication Type"),
143 'type' => SMOPT_TYPE_STRLIST,
144 'posvals' => array('none' => 'No SMTP auth',
145 'login' => 'Login (Plaintext)',
146 'cram-md5' => 'CRAM-MD5',
147 'digest-md5' => 'DIGEST-MD5'),
148 'default' => 'none'),
149 '$pop_before_smtp' => array( 'name' => _("POP3 Before SMTP?"),
150 'type' => SMOPT_TYPE_BOOLEAN,
151 'default' => false ),
152 '$invert_time' => array( 'name' => _("Invert Time"),
153 'type' => SMOPT_TYPE_BOOLEAN ),
154 '$default_use_mdn' => array( 'name' => _("Use Confirmation Flags"),
155 'type' => SMOPT_TYPE_BOOLEAN ),
156 /* --------------------------------------------------------*/
157 'Group3' => array( 'name' => _("Folders Defaults"),
158 'type' => SMOPT_TYPE_TITLE ),
159 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
160 'type' => SMOPT_TYPE_STRING,
161 'size' => 40 ),
162 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
163 'type' => SMOPT_TYPE_BOOLEAN ),
164 '$trash_folder' => array( 'name' => _("Trash Folder"),
165 'type' => SMOPT_TYPE_STRING,
166 'size' => 40 ),
167 '$sent_folder' => array( 'name' => _("Sent Folder"),
168 'type' => SMOPT_TYPE_STRING,
169 'size' => 40 ),
170 '$draft_folder' => array( 'name' => _("Draft Folder"),
171 'type' => SMOPT_TYPE_STRING,
172 'size' => 40 ),
173 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
174 'type' => SMOPT_TYPE_BOOLEAN ),
175 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
176 'type' => SMOPT_TYPE_BOOLEAN ),
177 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
178 'type' => SMOPT_TYPE_BOOLEAN ),
179 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
180 'type' => SMOPT_TYPE_BOOLEAN ),
181 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
182 'type' => SMOPT_TYPE_BOOLEAN ),
183 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
184 'type' => SMOPT_TYPE_BOOLEAN ),
185 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
186 'type' => SMOPT_TYPE_BOOLEAN ),
187 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
188 'type' => SMOPT_TYPE_BOOLEAN ),
189 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
190 'type' => SMOPT_TYPE_NUMLIST,
191 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
192 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
193 SMPREF_UNSEEN_ALL => _("All Folders")) ),
194 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
195 'type' => SMOPT_TYPE_NUMLIST ,
196 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
197 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
198 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
199 'type' => SMOPT_TYPE_BOOLEAN ),
200 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
201 'type' => SMOPT_TYPE_BOOLEAN ),
202 '$delete_folder' => array( 'name' => _("Auto delete folders"),
203 'type' => SMOPT_TYPE_BOOLEAN ),
204 '$noselect_fix_enable' => array( 'name' => _("Enable /NoSelect folder fix"),
205 'type' => SMOPT_TYPE_BOOLEAN,
206 'default' => false),
207 /* --------------------------------------------------------*/
208 'Group4' => array( 'name' => _("General Options"),
209 'type' => SMOPT_TYPE_TITLE ),
210 '$default_charset' => array( 'name' => _("Default Charset"),
211 'type' => SMOPT_TYPE_STRLIST,
212 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
213 'iso-8859-2' => 'iso-8859-2',
214 'iso-8859-7' => 'iso-8859-7',
215 'iso-8859-15' => 'iso-8859-15',
216 'iso-8859-15' => 'iso-8859-15',
217 'ns_4551_1' => 'ns_4551_1',
218 'koi8-r' => 'koi8-r',
219 'euc-KR' => 'euc-KR',
220 'windows-1251' => 'windows-1251',
221 'ISO-2022-JP' => 'ISO-2022-JP' ) ),
222 '$data_dir' => array( 'name' => _("Data Directory"),
223 'type' => SMOPT_TYPE_PATH,
224 'size' => 40 ),
225 '$attachment_dir' => array( 'name' => _("Temp Directory"),
226 'type' => SMOPT_TYPE_PATH,
227 'size' => 40 ),
228 '$dir_hash_level' => array( 'name' => _("Hash Level"),
229 'type' => SMOPT_TYPE_NUMLIST,
230 'posvals' => array( 0 => _("Hash Disabled"),
231 1 => _("Low"),
232 2 => _("Moderate"),
233 3 => _("Medium"),
234 4 => _("High") ) ),
235 '$default_left_size' => array( 'name' => _("Default Left Size"),
236 'type' => SMOPT_TYPE_NUMLIST,
237 'posvals' => $left_size_values ),
238 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
239 'type' => SMOPT_TYPE_BOOLEAN ),
240 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
241 'type' => SMOPT_TYPE_BOOLEAN ),
242 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
243 'type' => SMOPT_TYPE_BOOLEAN ),
244 'default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
245 'type' => SMOPT_TYPE_BOOLEAN ),
246 '$edit_identity' => array( 'name' => _("Allow editing of identities"),
247 'type' => SMOPT_TYPE_BOOLEAN ),
248 '$edit_name' => array( 'name' => _("Allow editing of full name"),
249 'type' => SMOPT_TYPE_BOOLEAN ),
250 '$allow_server_sort' => array( 'name' => _("Use server-side sorting"),
251 'type' => SMOPT_TYPE_BOOLEAN,
252 'default' => false ),
253 '$allow_thread_sort' => array( 'name' => _("Use server-side thread sorting"),
254 'type' => SMOPT_TYPE_BOOLEAN,
255 'default' => false ),
256 '$allow_charset_search' => array( 'name' => _("Allow server charset search"),
257 'type' => SMOPT_TYPE_BOOLEAN,
258 'default' => false ),
259 '$uid_support' => array( 'name' => _("UID support"),
260 'type' => SMOPT_TYPE_BOOLEAN,
261 'default' => false ),
262 '$session_name' => array( 'name' => _("PHP session name"),
263 'type' => SMOPT_TYPE_HIDDEN ),
264 /* --------------------------------------------------------*/
265 'Group5' => array( 'name' => _("Message of the Day"),
266 'type' => SMOPT_TYPE_TITLE ),
267 '$motd' => array( 'name' => _("Message of the Day"),
268 'type' => SMOPT_TYPE_TEXTAREA,
269 'size' => 40 ),
270 /* --------------------------------------------------------*/
271 'Group6' => array( 'name' => _("Database"),
272 'type' => SMOPT_TYPE_TITLE ),
273 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
274 'type' => SMOPT_TYPE_STRING,
275 'size' => 40 ),
276 '$addrbook_table' => array( 'name' => _("Address book table"),
277 'type' => SMOPT_TYPE_STRING,
278 'size' => 40,
279 'default' => 'address' ),
280 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
281 'type' => SMOPT_TYPE_STRING,
282 'size' => 40 ),
283 '$prefs_table' => array( 'name' => _("Preferences table"),
284 'type' => SMOPT_TYPE_STRING,
285 'size' => 40,
286 'default' => 'userprefs' ),
287 '$prefs_user_field' => array('name' => _("Preferences username field"),
288 'type' => SMOPT_TYPE_STRING,
289 'size' => 40,
290 'default' => 'user' ),
291 '$prefs_key_field' => array('name' => _("Preferences key field"),
292 'type' => SMOPT_TYPE_STRING,
293 'size' => 40,
294 'default' => 'prefkey' ),
295 '$prefs_val_field' => array('name' => _("Preferences value field"),
296 'type' => SMOPT_TYPE_STRING,
297 'size' => 40,
298 'default' => 'prefval' ),
299 /* --------------------------------------------------------*/
300 'Group7' => array( 'name' => _("Themes"),
301 'type' => SMOPT_TYPE_TITLE ),
302 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
303 'type' => SMOPT_TYPE_PATH,
304 'size' => 40 ),
305 '$theme_default' => array( 'name' => _("Default theme"),
306 'type' => SMOPT_TYPE_INTEGER,
307 'default' => 0,
308 'comment' => _("Use index number of theme") ),
309 /* --------------------------------------------------------*/
310 '$config_use_color' => array( 'name' => '',
311 'type' => SMOPT_TYPE_HIDDEN ),
312 '$no_list_for_subscribe' => array( 'name' => '',
313 'type' => SMOPT_TYPE_HIDDEN ),
314 /* --------------------------------------------------------*/
315
316 );
317
318 ?>