Fix a bunch of plugins to cope with moved load_prefs/validate files.
[squirrelmail.git] / plugins / administrator / defines.php
CommitLineData
abd7a3f8 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
5ed13ec8 14require_once( '../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);
abd7a3f8 32
33global $languages;
34
35be4418 35$language_values = array( );
abd7a3f8 36foreach ($languages as $lang_key => $lang_attributes) {
37 if (isset($lang_attributes['NAME'])) {
38 $language_values[$lang_key] = $lang_attributes['NAME'];
39 }
40}
41asort( $language_values );
35be4418 42$language_values = array_merge(array('' => _("Default")), $language_values);
dcd6f144 43$left_size_values = array();
44for ($lsv = 100; $lsv <= 300; $lsv += 10) {
45 $left_size_values[$lsv] = "$lsv " . _("pixels");
46}
47
0e66bc84 48$defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
49 'type' => SMOPT_TYPE_COMMENT,
abd7a3f8 50 'size' => 7 ),
88cb1b4d 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() ),
0e66bc84 57 /* --------------------------------------------------------*/
58 'Group1' => array( 'name' => _("Organization Preferences"),
59 'type' => SMOPT_TYPE_TITLE ),
60 '$org_name' => array( 'name' => _("Organization Name"),
abd7a3f8 61 'type' => SMOPT_TYPE_STRING,
62 'size' => 40 ),
0e66bc84 63 '$org_logo' => array( 'name' => _("Organization Logo"),
abd7a3f8 64 'type' => SMOPT_TYPE_STRING,
65 'size' => 40 ),
99ac8983 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),
0e66bc84 74 '$org_title' => array( 'name' => _("Organization Title"),
abd7a3f8 75 'type' => SMOPT_TYPE_STRING,
76 'size' => 40 ),
0e66bc84 77 '$signout_page' => array( 'name' => _("Signout Page"),
78 'type' => SMOPT_TYPE_STRING,
79 'size' => 40 ),
abd7a3f8 80 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
81 'type' => SMOPT_TYPE_STRLIST,
82 'size' => 7,
83 'posvals' => $language_values ),
dcd6f144 84 '$frame_top' => array( 'name' => _("Top Frame"),
85 'type' => SMOPT_TYPE_STRING,
feba1a41 86 'size' => 40,
87 'default' => '_top' ),
0e66bc84 88 /* --------------------------------------------------------*/
89 'Group2' => array( 'name' => _("Server Settings"),
90 'type' => SMOPT_TYPE_TITLE ),
91 '$domain' => array( 'name' => _("Mail Domain"),
88cb1b4d 92 'type' => SMOPT_TYPE_STRING,
93 'size' => 40 ),
abd7a3f8 94 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
95 'type' => SMOPT_TYPE_STRING,
96 'size' => 40 ),
97 '$imapPort' => array( 'name' => _("IMAP Server Port"),
88cb1b4d 98 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 99 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
100 'type' => SMOPT_TYPE_STRLIST,
0e66bc84 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,
edd4a552 108 'comment' => _("Use \"detect\" to auto-detect."),
2586d588 109 'size' => 10,
110 'default' => 'detect' ),
0e66bc84 111 '$useSendmail' => array( 'name' => _("Use Sendmail"),
112 'type' => SMOPT_TYPE_BOOLEAN ),
dcd6f144 113 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
114 'type' => SMOPT_TYPE_STRING,
115 'size' => 40 ),
abd7a3f8 116 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
117 'type' => SMOPT_TYPE_STRING,
118 'size' => 40 ),
119 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
88cb1b4d 120 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 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 ),
ad0a71ac 125 '$default_use_mdn' => array( 'name' => _("Use Confirmation Flags"),
126 'type' => SMOPT_TYPE_BOOLEAN ),
0e66bc84 127 /* --------------------------------------------------------*/
128 'Group3' => array( 'name' => _("Folders Defaults"),
129 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 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"),
5ed13ec8 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")) ),
dcd6f144 165 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
5ed13ec8 166 'type' => SMOPT_TYPE_NUMLIST ,
167 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
168 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
dcd6f144 169 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
170 'type' => SMOPT_TYPE_BOOLEAN ),
e91cf665 171 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
172 'type' => SMOPT_TYPE_BOOLEAN ),
4e85a37f 173 '$delete_folder' => array( 'name' => _("Auto delete folders"),
174 'type' => SMOPT_TYPE_BOOLEAN ),
dcd6f144 175 /* --------------------------------------------------------*/
d0102e1a 176 'Group4' => array( 'name' => _("General Options"),
dcd6f144 177 'type' => SMOPT_TYPE_TITLE ),
178 '$default_charset' => array( 'name' => _("Default Charset"),
edd4a552 179 'type' => SMOPT_TYPE_STRLIST,
491e1525 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',
edd4a552 185 'ns_4551_1' => 'ns_4551_1',
186 'koi8-r' => 'koi8-r',
187 'euc-KR' => 'euc-KR',
fc0dec58 188 'windows-1251' => 'windows-1251',
83be314a 189 'ISO-2022-JP' => 'ISO-2022-JP' ) ),
dcd6f144 190 '$data_dir' => array( 'name' => _("Data Directory"),
191 'type' => SMOPT_TYPE_STRING,
192 'size' => 40 ),
193 '$attachment_dir' => array( 'name' => _("Temp Directory"),
abd7a3f8 194 'type' => SMOPT_TYPE_STRING,
195 'size' => 40 ),
dcd6f144 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") ) ),
edd4a552 203 '$default_left_size' => array( 'name' => _("Default Left Size"),
dcd6f144 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 ),
6fa38b33 212 'default_use_mdn' => array( 'name' => _("Enable use of delivery receipts"),
213 'type' => SMOPT_TYPE_BOOLEAN ),
8a7d0669 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 ),
dcd6f144 218 /* --------------------------------------------------------*/
edd4a552 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 /* --------------------------------------------------------*/
497203d4 225 'Group6' => array( 'name' => _("Database"),
226 'type' => SMOPT_TYPE_TITLE ),
227 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
228 'type' => SMOPT_TYPE_STRING,
88cb1b4d 229 'size' => 40 ),
4f40a59d 230 '$addrbook_table' => array( 'name' => _("Address book table"),
231 'type' => SMOPT_TYPE_STRING,
2586d588 232 'size' => 40,
233 'default' => 'address' ),
f58f1fd8 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' ),
99a6c222 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' ),
497203d4 253 /* --------------------------------------------------------*/
254 'Group7' => array( 'name' => _("Themes"),
edd4a552 255 'type' => SMOPT_TYPE_TITLE ),
256 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
257 'type' => SMOPT_TYPE_STRING,
258 'size' => 40 ),
259 /* --------------------------------------------------------*/
88cb1b4d 260 '$config_use_color' => array( 'name' => '',
261 'type' => SMOPT_TYPE_HIDDEN )
497203d4 262 /* --------------------------------------------------------*/
dcd6f144 263
edd4a552 264 );
dcd6f144 265
4f40a59d 266?>