Fix a bunch of plugins to cope with moved load_prefs/validate files.
[squirrelmail.git] / plugins / administrator / defines.php
1 <?PHP
2
3 /**
4 * defines.php
5 *
6 * Copyright (c) 1999-2002 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( '../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
33 global $languages;
34
35 $language_values = array( );
36 foreach ($languages as $lang_key => $lang_attributes) {
37 if (isset($lang_attributes['NAME'])) {
38 $language_values[$lang_key] = $lang_attributes['NAME'];
39 }
40 }
41 asort( $language_values );
42 $language_values = array_merge(array('' => _("Default")), $language_values);
43 $left_size_values = array();
44 for ($lsv = 100; $lsv <= 300; $lsv += 10) {
45 $left_size_values[$lsv] = "$lsv " . _("pixels");
46 }
47
48 $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
49 'type' => SMOPT_TYPE_COMMENT,
50 'size' => 7 ),
51 'SM_ver' => array( 'name' => _("Squirrelmail Version"),
52 'type' => SMOPT_TYPE_EXTERNAL,
53 'value' => "$version" ),
54 'PHP_ver' => array( 'name' => _("PHP Version"),
55 'type' => SMOPT_TYPE_EXTERNAL,
56 'value' => phpversion() ),
57 /* --------------------------------------------------------*/
58 'Group1' => array( 'name' => _("Organization Preferences"),
59 'type' => SMOPT_TYPE_TITLE ),
60 '$org_name' => array( 'name' => _("Organization Name"),
61 'type' => SMOPT_TYPE_STRING,
62 'size' => 40 ),
63 '$org_logo' => array( 'name' => _("Organization Logo"),
64 'type' => SMOPT_TYPE_STRING,
65 'size' => 40 ),
66 '$org_logo_width' => array( 'name' => _("Organization Logo Width"),
67 'type' => SMOPT_TYPE_INTEGER,
68 'size' => 5,
69 'default' => 0),
70 '$org_logo_height' => array( 'name' => _("Organization Logo Height"),
71 'type' => SMOPT_TYPE_INTEGER,
72 'size' => 5,
73 'default' => 0),
74 '$org_title' => array( 'name' => _("Organization Title"),
75 'type' => SMOPT_TYPE_STRING,
76 'size' => 40 ),
77 '$signout_page' => array( 'name' => _("Signout Page"),
78 'type' => SMOPT_TYPE_STRING,
79 'size' => 40 ),
80 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
81 'type' => SMOPT_TYPE_STRLIST,
82 'size' => 7,
83 'posvals' => $language_values ),
84 '$frame_top' => array( 'name' => _("Top Frame"),
85 'type' => SMOPT_TYPE_STRING,
86 'size' => 40,
87 'default' => '_top' ),
88 /* --------------------------------------------------------*/
89 'Group2' => array( 'name' => _("Server Settings"),
90 'type' => SMOPT_TYPE_TITLE ),
91 '$domain' => array( 'name' => _("Mail Domain"),
92 'type' => SMOPT_TYPE_STRING,
93 'size' => 40 ),
94 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
95 'type' => SMOPT_TYPE_STRING,
96 'size' => 40 ),
97 '$imapPort' => array( 'name' => _("IMAP Server Port"),
98 'type' => SMOPT_TYPE_INTEGER ),
99 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
100 'type' => SMOPT_TYPE_STRLIST,
101 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
102 'uw' => _("University of Washington's IMAP server"),
103 'exchange' => _("Microsoft Exchange IMAP server"),
104 'courier' => _("Courier IMAP server"),
105 'other' => _("Not one of the above servers") ) ),
106 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
107 'type' => SMOPT_TYPE_STRING,
108 'comment' => _("Use \"detect\" to auto-detect."),
109 'size' => 10,
110 'default' => 'detect' ),
111 '$useSendmail' => array( 'name' => _("Use Sendmail"),
112 'type' => SMOPT_TYPE_BOOLEAN ),
113 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
114 'type' => SMOPT_TYPE_STRING,
115 'size' => 40 ),
116 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
117 'type' => SMOPT_TYPE_STRING,
118 'size' => 40 ),
119 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
120 'type' => SMOPT_TYPE_INTEGER ),
121 '$use_authenticated_smtp' => array( 'name' => _("Authenticated SMTP"),
122 'type' => SMOPT_TYPE_BOOLEAN ),
123 '$invert_time' => array( 'name' => _("Invert Time"),
124 'type' => SMOPT_TYPE_BOOLEAN ),
125 '$default_use_mdn' => array( 'name' => _("Use Confirmation Flags"),
126 'type' => SMOPT_TYPE_BOOLEAN ),
127 /* --------------------------------------------------------*/
128 'Group3' => array( 'name' => _("Folders Defaults"),
129 'type' => SMOPT_TYPE_TITLE ),
130 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
131 'type' => SMOPT_TYPE_STRING,
132 'size' => 40 ),
133 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
134 'type' => SMOPT_TYPE_BOOLEAN ),
135 '$trash_folder' => array( 'name' => _("Trash Folder"),
136 'type' => SMOPT_TYPE_STRING,
137 'size' => 40 ),
138 '$sent_folder' => array( 'name' => _("Sent Folder"),
139 'type' => SMOPT_TYPE_STRING,
140 'size' => 40 ),
141 '$draft_folder' => array( 'name' => _("Draft Folder"),
142 'type' => SMOPT_TYPE_STRING,
143 'size' => 40 ),
144 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
145 'type' => SMOPT_TYPE_BOOLEAN ),
146 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
147 'type' => SMOPT_TYPE_BOOLEAN ),
148 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
149 'type' => SMOPT_TYPE_BOOLEAN ),
150 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
151 'type' => SMOPT_TYPE_BOOLEAN ),
152 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
153 'type' => SMOPT_TYPE_BOOLEAN ),
154 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
155 'type' => SMOPT_TYPE_BOOLEAN ),
156 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
157 'type' => SMOPT_TYPE_BOOLEAN ),
158 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
159 'type' => SMOPT_TYPE_BOOLEAN ),
160 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
161 'type' => SMOPT_TYPE_NUMLIST,
162 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
163 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
164 SMPREF_UNSEEN_ALL => _("All Folders")) ),
165 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
166 'type' => SMOPT_TYPE_NUMLIST ,
167 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
168 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
169 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
170 'type' => SMOPT_TYPE_BOOLEAN ),
171 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
172 'type' => SMOPT_TYPE_BOOLEAN ),
173 '$delete_folder' => array( 'name' => _("Auto delete folders"),
174 'type' => SMOPT_TYPE_BOOLEAN ),
175 /* --------------------------------------------------------*/
176 'Group4' => array( 'name' => _("General Options"),
177 'type' => SMOPT_TYPE_TITLE ),
178 '$default_charset' => array( 'name' => _("Default Charset"),
179 'type' => SMOPT_TYPE_STRLIST,
180 'posvals' => array( 'iso-8859-1' => 'iso-8859-1',
181 'iso-8859-2' => 'iso-8859-2',
182 'iso-8859-7' => 'iso-8859-7',
183 'iso-8859-15' => 'iso-8859-15',
184 'iso-8859-15' => 'iso-8859-15',
185 'ns_4551_1' => 'ns_4551_1',
186 'koi8-r' => 'koi8-r',
187 'euc-KR' => 'euc-KR',
188 'windows-1251' => 'windows-1251',
189 'ISO-2022-JP' => 'ISO-2022-JP' ) ),
190 '$data_dir' => array( 'name' => _("Data Directory"),
191 'type' => SMOPT_TYPE_STRING,
192 'size' => 40 ),
193 '$attachment_dir' => array( 'name' => _("Temp Directory"),
194 'type' => SMOPT_TYPE_STRING,
195 'size' => 40 ),
196 '$dir_hash_level' => array( 'name' => _("Hash Level"),
197 'type' => SMOPT_TYPE_NUMLIST,
198 'posvals' => array( 0 => _("Hash Disabled"),
199 1 => _("Low"),
200 2 => _("Moderate"),
201 3 => _("Medium"),
202 4 => _("High") ) ),
203 '$default_left_size' => array( 'name' => _("Default Left Size"),
204 'type' => SMOPT_TYPE_NUMLIST,
205 'posvals' => $left_size_values ),
206 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
207 'type' => SMOPT_TYPE_BOOLEAN ),
208 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
209 'type' => SMOPT_TYPE_BOOLEAN ),
210 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
211 'type' => SMOPT_TYPE_BOOLEAN ),
212 'default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
213 'type' => SMOPT_TYPE_BOOLEAN ),
214 '$edit_identity' => array( 'name' => _("Allow editing of identities"),
215 'type' => SMOPT_TYPE_BOOLEAN ),
216 '$edit_name' => array( 'name' => _("Allow editing of full name"),
217 'type' => SMOPT_TYPE_BOOLEAN ),
218 /* --------------------------------------------------------*/
219 'Group5' => array( 'name' => _("Message of the Day"),
220 'type' => SMOPT_TYPE_TITLE ),
221 '$motd' => array( 'name' => _("Message of the Day"),
222 'type' => SMOPT_TYPE_TEXTAREA,
223 'size' => 40 ),
224 /* --------------------------------------------------------*/
225 'Group6' => array( 'name' => _("Database"),
226 'type' => SMOPT_TYPE_TITLE ),
227 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
228 'type' => SMOPT_TYPE_STRING,
229 'size' => 40 ),
230 '$addrbook_table' => array( 'name' => _("Address book table"),
231 'type' => SMOPT_TYPE_STRING,
232 'size' => 40,
233 'default' => 'address' ),
234 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
235 'type' => SMOPT_TYPE_STRING,
236 'size' => 40 ),
237 '$prefs_table' => array( 'name' => _("Preferences table"),
238 'type' => SMOPT_TYPE_STRING,
239 'size' => 40,
240 'default' => 'userprefs' ),
241 '$prefs_user_field' => array('name' => _("Preferences username field"),
242 'type' => SMOPT_TYPE_STRING,
243 'size' => 40,
244 'default' => 'user' ),
245 '$prefs_key_field' => array('name' => _("Preferences key field"),
246 'type' => SMOPT_TYPE_STRING,
247 'size' => 40,
248 'default' => 'prefkey' ),
249 '$prefs_val_field' => array('name' => _("Preferences value field"),
250 'type' => SMOPT_TYPE_STRING,
251 'size' => 40,
252 'default' => 'prefval' ),
253 /* --------------------------------------------------------*/
254 'Group7' => array( 'name' => _("Themes"),
255 'type' => SMOPT_TYPE_TITLE ),
256 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
257 'type' => SMOPT_TYPE_STRING,
258 'size' => 40 ),
259 /* --------------------------------------------------------*/
260 '$config_use_color' => array( 'name' => '',
261 'type' => SMOPT_TYPE_HIDDEN )
262 /* --------------------------------------------------------*/
263
264 );
265
266 ?>