6 * Copyright (c) 1999-2002 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
15 /* Define constants for the various option types. */
16 define('SMOPT_TYPE_UNDEFINED', -1);
17 define('SMOPT_TYPE_STRING', 0);
18 define('SMOPT_TYPE_STRLIST', 1);
19 define('SMOPT_TYPE_TEXTAREA', 2);
20 define('SMOPT_TYPE_INTEGER', 3);
21 define('SMOPT_TYPE_FLOAT', 4);
22 define('SMOPT_TYPE_BOOLEAN', 5);
23 define('SMOPT_TYPE_HIDDEN', 6);
24 define('SMOPT_TYPE_COMMENT', 7);
25 define('SMOPT_TYPE_NUMLIST', 8);
26 define('SMOPT_TYPE_TITLE', 9);
27 define('SMOPT_TYPE_THEME', 10);
28 define('SMOPT_TYPE_PLUGINS', 11);
29 define('SMOPT_TYPE_LDAP', 12);
33 $language_values = array( );
34 foreach ($languages as $lang_key => $lang_attributes) {
35 if (isset($lang_attributes['NAME'])) {
36 $language_values[$lang_key] = $lang_attributes['NAME'];
39 asort( $language_values );
40 $language_values = array_merge(array('' => _("Default")), $language_values);
41 $left_size_values = array();
42 for ($lsv = 100; $lsv <= 300; $lsv +
= 10) {
43 $left_size_values[$lsv] = "$lsv " . _("pixels");
46 $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
47 'type' => SMOPT_TYPE_COMMENT
,
49 /* --------------------------------------------------------*/
50 'Group1' => array( 'name' => _("Organization Preferences"),
51 'type' => SMOPT_TYPE_TITLE
),
52 '$org_name' => array( 'name' => _("Organization Name"),
53 'type' => SMOPT_TYPE_STRING
,
55 '$org_logo' => array( 'name' => _("Organization Logo"),
56 'type' => SMOPT_TYPE_STRING
,
58 '$org_title' => array( 'name' => _("Organization Title"),
59 'type' => SMOPT_TYPE_STRING
,
61 '$signout_page' => array( 'name' => _("Signout Page"),
62 'type' => SMOPT_TYPE_STRING
,
64 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
65 'type' => SMOPT_TYPE_STRLIST
,
67 'posvals' => $language_values ),
68 '$frame_top' => array( 'name' => _("Top Frame"),
69 'type' => SMOPT_TYPE_STRING
,
71 /* --------------------------------------------------------*/
72 'Group2' => array( 'name' => _("Server Settings"),
73 'type' => SMOPT_TYPE_TITLE
),
74 '$domain' => array( 'name' => _("Mail Domain"),
75 'type' => SMOPT_TYPE_STRING
,
77 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
78 'type' => SMOPT_TYPE_STRING
,
80 '$imapPort' => array( 'name' => _("IMAP Server Port"),
81 'type' => SMOPT_TYPE_INTEGER
),
82 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
83 'type' => SMOPT_TYPE_STRLIST
,
84 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
85 'uw' => _("University of Washington's IMAP server"),
86 'exchange' => _("Microsoft Exchange IMAP server"),
87 'courier' => _("Courier IMAP server"),
88 'other' => _("Not one of the above servers") ) ),
89 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
90 'type' => SMOPT_TYPE_STRING
,
91 'comment' => _("Use \"detect\" to auto-detect."),
93 '$useSendmail' => array( 'name' => _("Use Sendmail"),
94 'type' => SMOPT_TYPE_BOOLEAN
),
95 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
96 'type' => SMOPT_TYPE_STRING
,
98 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
99 'type' => SMOPT_TYPE_STRING
,
101 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
102 'type' => SMOPT_TYPE_INTEGER
),
103 '$use_authenticated_smtp' => array( 'name' => _("Authenticated SMTP"),
104 'type' => SMOPT_TYPE_BOOLEAN
),
105 '$invert_time' => array( 'name' => _("Invert Time"),
106 'type' => SMOPT_TYPE_BOOLEAN
),
107 /* --------------------------------------------------------*/
108 'Group3' => array( 'name' => _("Folders Defaults"),
109 'type' => SMOPT_TYPE_TITLE
),
110 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
111 'type' => SMOPT_TYPE_STRING
,
113 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
114 'type' => SMOPT_TYPE_BOOLEAN
),
115 '$trash_folder' => array( 'name' => _("Trash Folder"),
116 'type' => SMOPT_TYPE_STRING
,
118 '$sent_folder' => array( 'name' => _("Sent Folder"),
119 'type' => SMOPT_TYPE_STRING
,
121 '$draft_folder' => array( 'name' => _("Draft Folder"),
122 'type' => SMOPT_TYPE_STRING
,
124 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
125 'type' => SMOPT_TYPE_BOOLEAN
),
126 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
127 'type' => SMOPT_TYPE_BOOLEAN
),
128 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
129 'type' => SMOPT_TYPE_BOOLEAN
),
130 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
131 'type' => SMOPT_TYPE_BOOLEAN
),
132 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
133 'type' => SMOPT_TYPE_BOOLEAN
),
134 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
135 'type' => SMOPT_TYPE_BOOLEAN
),
136 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
137 'type' => SMOPT_TYPE_BOOLEAN
),
138 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
139 'type' => SMOPT_TYPE_BOOLEAN
),
140 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
141 'type' => SMOPT_TYPE_INTEGER
),
142 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
143 'type' => SMOPT_TYPE_INTEGER
),
144 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
145 'type' => SMOPT_TYPE_BOOLEAN
),
146 '$default_use_javascript_addr_book' => array( 'name' => _("Default Javascript Adrressbook"),
147 'type' => SMOPT_TYPE_BOOLEAN
),
148 /* --------------------------------------------------------*/
149 'Group4' => array( 'name' => _("General Options"),
150 'type' => SMOPT_TYPE_TITLE
),
151 '$default_charset' => array( 'name' => _("Default Charset"),
152 'type' => SMOPT_TYPE_STRLIST
,
153 'posvals' => array( 'iso_8859_1' => 'iso_8859_1',
154 'iso_8859_2' => 'iso_8859_2',
155 'iso_8859_7' => 'iso_8859_7',
156 'iso_8859_15' => 'iso_8859_15',
157 'iso_8859_15' => 'iso_8859_15',
158 'ns_4551_1' => 'ns_4551_1',
159 'koi8-r' => 'koi8-r',
160 'euc-KR' => 'euc-KR',
161 'windows-1251' => 'windows-1251' ) ),
162 '$data_dir' => array( 'name' => _("Data Directory"),
163 'type' => SMOPT_TYPE_STRING
,
165 '$attachment_dir' => array( 'name' => _("Temp Directory"),
166 'type' => SMOPT_TYPE_STRING
,
168 '$dir_hash_level' => array( 'name' => _("Hash Level"),
169 'type' => SMOPT_TYPE_NUMLIST
,
170 'posvals' => array( 0 => _("Hash Disabled"),
175 '$default_left_size' => array( 'name' => _("Default Left Size"),
176 'type' => SMOPT_TYPE_NUMLIST
,
177 'posvals' => $left_size_values ),
178 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
179 'type' => SMOPT_TYPE_BOOLEAN
),
180 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
181 'type' => SMOPT_TYPE_BOOLEAN
),
182 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
183 'type' => SMOPT_TYPE_BOOLEAN
),
184 /* --------------------------------------------------------*/
185 'Group5' => array( 'name' => _("Message of the Day"),
186 'type' => SMOPT_TYPE_TITLE
),
187 '$motd' => array( 'name' => _("Message of the Day"),
188 'type' => SMOPT_TYPE_TEXTAREA
,
190 /* --------------------------------------------------------*/
191 'Group6' => array( 'name' => _("Database"),
192 'type' => SMOPT_TYPE_TITLE
),
193 '$addrbook_dsn' => array( 'name' => _("Address book DSN"),
194 'type' => SMOPT_TYPE_STRING
,
196 /* --------------------------------------------------------*/
197 'Group7' => array( 'name' => _("Themes"),
198 'type' => SMOPT_TYPE_TITLE
),
199 '$theme_css' => array( 'name' => _("Style Sheet URL (css)"),
200 'type' => SMOPT_TYPE_STRING
,
202 /* --------------------------------------------------------*/
203 '$config_use_color' => array( 'type' => SMOPT_TYPE_HIDDEN
)
204 /* --------------------------------------------------------*/