"-= M.J. Prinsen =-" <various@bovendelft.xs4all.nl>
[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 ),
0e66bc84 66 '$org_title' => array( 'name' => _("Organization Title"),
abd7a3f8 67 'type' => SMOPT_TYPE_STRING,
68 'size' => 40 ),
0e66bc84 69 '$signout_page' => array( 'name' => _("Signout Page"),
70 'type' => SMOPT_TYPE_STRING,
71 'size' => 40 ),
abd7a3f8 72 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
73 'type' => SMOPT_TYPE_STRLIST,
74 'size' => 7,
75 'posvals' => $language_values ),
dcd6f144 76 '$frame_top' => array( 'name' => _("Top Frame"),
77 'type' => SMOPT_TYPE_STRING,
feba1a41 78 'size' => 40,
79 'default' => '_top' ),
0e66bc84 80 /* --------------------------------------------------------*/
81 'Group2' => array( 'name' => _("Server Settings"),
82 'type' => SMOPT_TYPE_TITLE ),
83 '$domain' => array( 'name' => _("Mail Domain"),
88cb1b4d 84 'type' => SMOPT_TYPE_STRING,
85 'size' => 40 ),
abd7a3f8 86 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
87 'type' => SMOPT_TYPE_STRING,
88 'size' => 40 ),
89 '$imapPort' => array( 'name' => _("IMAP Server Port"),
88cb1b4d 90 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 91 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
92 'type' => SMOPT_TYPE_STRLIST,
0e66bc84 93 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
94 'uw' => _("University of Washington's IMAP server"),
95 'exchange' => _("Microsoft Exchange IMAP server"),
96 'courier' => _("Courier IMAP server"),
97 'other' => _("Not one of the above servers") ) ),
98 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
99 'type' => SMOPT_TYPE_STRING,
edd4a552 100 'comment' => _("Use \"detect\" to auto-detect."),
2586d588 101 'size' => 10,
102 'default' => 'detect' ),
0e66bc84 103 '$useSendmail' => array( 'name' => _("Use Sendmail"),
104 'type' => SMOPT_TYPE_BOOLEAN ),
dcd6f144 105 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
106 'type' => SMOPT_TYPE_STRING,
107 'size' => 40 ),
abd7a3f8 108 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
109 'type' => SMOPT_TYPE_STRING,
110 'size' => 40 ),
111 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
88cb1b4d 112 'type' => SMOPT_TYPE_INTEGER ),
0e66bc84 113 '$use_authenticated_smtp' => array( 'name' => _("Authenticated SMTP"),
114 'type' => SMOPT_TYPE_BOOLEAN ),
115 '$invert_time' => array( 'name' => _("Invert Time"),
116 'type' => SMOPT_TYPE_BOOLEAN ),
117 /* --------------------------------------------------------*/
118 'Group3' => array( 'name' => _("Folders Defaults"),
119 'type' => SMOPT_TYPE_TITLE ),
dcd6f144 120 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
121 'type' => SMOPT_TYPE_STRING,
122 'size' => 40 ),
123 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
124 'type' => SMOPT_TYPE_BOOLEAN ),
125 '$trash_folder' => array( 'name' => _("Trash Folder"),
126 'type' => SMOPT_TYPE_STRING,
127 'size' => 40 ),
128 '$sent_folder' => array( 'name' => _("Sent Folder"),
129 'type' => SMOPT_TYPE_STRING,
130 'size' => 40 ),
131 '$draft_folder' => array( 'name' => _("Draft Folder"),
132 'type' => SMOPT_TYPE_STRING,
133 'size' => 40 ),
134 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
135 'type' => SMOPT_TYPE_BOOLEAN ),
136 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
137 'type' => SMOPT_TYPE_BOOLEAN ),
138 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
139 'type' => SMOPT_TYPE_BOOLEAN ),
140 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
141 'type' => SMOPT_TYPE_BOOLEAN ),
142 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
143 'type' => SMOPT_TYPE_BOOLEAN ),
144 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
145 'type' => SMOPT_TYPE_BOOLEAN ),
146 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
147 'type' => SMOPT_TYPE_BOOLEAN ),
148 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
149 'type' => SMOPT_TYPE_BOOLEAN ),
150 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
5ed13ec8 151 'type' => SMOPT_TYPE_NUMLIST,
152 'posvals' => array( SMPREF_UNSEEN_NONE => _("No Notification"),
153 SMPREF_UNSEEN_INBOX => _("Only INBOX"),
154 SMPREF_UNSEEN_ALL => _("All Folders")) ),
dcd6f144 155 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
5ed13ec8 156 'type' => SMOPT_TYPE_NUMLIST ,
157 'posvals' => array( SMPREF_UNSEEN_ONLY => _("Only Unseen"),
158 SMPREF_UNSEEN_TOTAL => _("Unseen and Total") ) ),
dcd6f144 159 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
160 'type' => SMOPT_TYPE_BOOLEAN ),
e91cf665 161 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
162 'type' => SMOPT_TYPE_BOOLEAN ),
4e85a37f 163 '$delete_folder' => array( 'name' => _("Auto delete folders"),
164 'type' => SMOPT_TYPE_BOOLEAN ),
dcd6f144 165 /* --------------------------------------------------------*/
d0102e1a 166 'Group4' => array( 'name' => _("General Options"),
dcd6f144 167 'type' => SMOPT_TYPE_TITLE ),
168 '$default_charset' => array( 'name' => _("Default Charset"),
edd4a552 169 'type' => SMOPT_TYPE_STRLIST,
170 'posvals' => array( 'iso_8859_1' => 'iso_8859_1',
171 'iso_8859_2' => 'iso_8859_2',
172 'iso_8859_7' => 'iso_8859_7',
173 'iso_8859_15' => 'iso_8859_15',
174 'iso_8859_15' => 'iso_8859_15',
175 'ns_4551_1' => 'ns_4551_1',
176 'koi8-r' => 'koi8-r',
177 'euc-KR' => 'euc-KR',
178 'windows-1251' => 'windows-1251' ) ),
dcd6f144 179 '$data_dir' => array( 'name' => _("Data Directory"),
180 'type' => SMOPT_TYPE_STRING,
181 'size' => 40 ),
182 '$attachment_dir' => array( 'name' => _("Temp Directory"),
abd7a3f8 183 'type' => SMOPT_TYPE_STRING,
184 'size' => 40 ),
dcd6f144 185 '$dir_hash_level' => array( 'name' => _("Hash Level"),
186 'type' => SMOPT_TYPE_NUMLIST,
187 'posvals' => array( 0 => _("Hash Disabled"),
188 1 => _("Low"),
189 2 => _("Moderate"),
190 3 => _("Medium"),
191 4 => _("High") ) ),
edd4a552 192 '$default_left_size' => array( 'name' => _("Default Left Size"),
dcd6f144 193 'type' => SMOPT_TYPE_NUMLIST,
194 'posvals' => $left_size_values ),
195 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
196 'type' => SMOPT_TYPE_BOOLEAN ),
197 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
198 'type' => SMOPT_TYPE_BOOLEAN ),
199 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
200 'type' => SMOPT_TYPE_BOOLEAN ),
201 /* --------------------------------------------------------*/
edd4a552 202 'Group5' => array( 'name' => _("Message of the Day"),
203 'type' => SMOPT_TYPE_TITLE ),
204 '$motd' => array( 'name' => _("Message of the Day"),
205 'type' => SMOPT_TYPE_TEXTAREA,
206 'size' => 40 ),
207 /* --------------------------------------------------------*/
497203d4 208 'Group6' => array( 'name' => _("Database"),
209 'type' => SMOPT_TYPE_TITLE ),
210 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
211 'type' => SMOPT_TYPE_STRING,
88cb1b4d 212 'size' => 40 ),
4f40a59d 213 '$addrbook_table' => array( 'name' => _("Address book table"),
214 'type' => SMOPT_TYPE_STRING,
2586d588 215 'size' => 40,
216 'default' => 'address' ),
f58f1fd8 217 '$prefs_dsn' => array( 'name' => _("Preferences DSN"),
218 'type' => SMOPT_TYPE_STRING,
219 'size' => 40 ),
220 '$prefs_table' => array( 'name' => _("Preferences table"),
221 'type' => SMOPT_TYPE_STRING,
222 'size' => 40,
223 'default' => 'userprefs' ),
497203d4 224 /* --------------------------------------------------------*/
225 'Group7' => array( 'name' => _("Themes"),
edd4a552 226 'type' => SMOPT_TYPE_TITLE ),
227 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
228 'type' => SMOPT_TYPE_STRING,
229 'size' => 40 ),
230 /* --------------------------------------------------------*/
88cb1b4d 231 '$config_use_color' => array( 'name' => '',
232 'type' => SMOPT_TYPE_HIDDEN )
497203d4 233 /* --------------------------------------------------------*/
dcd6f144 234
edd4a552 235 );
dcd6f144 236
4f40a59d 237?>