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', 128);
28 /* Define constants for the options refresh levels. */
29 define('SMOPT_REFRESH_NONE', 0);
30 define('SMOPT_REFRESH_FOLDERLIST', 1);
31 define('SMOPT_REFRESH_ALL', 2);
33 /* Define constants for the options size. */
34 define('SMOPT_SIZE_TINY', 0);
35 define('SMOPT_SIZE_SMALL', 1);
36 define('SMOPT_SIZE_MEDIUM', 2);
37 define('SMOPT_SIZE_LARGE', 3);
38 define('SMOPT_SIZE_HUGE', 4);
40 define('SMOPT_SAVE_DEFAULT', 'save_option');
41 define('SMOPT_SAVE_NOOP', 'save_option_noop');
45 $language_values = array();
46 foreach ($languages as $lang_key => $lang_attributes) {
47 if (isset($lang_attributes['NAME'])) {
48 $language_values[$lang_key] = $lang_attributes['NAME'];
51 asort( $language_values );
53 $left_size_values = array();
54 for ($lsv = 100; $lsv <= 300; $lsv +
= 10) {
55 $left_size_values[$lsv] = "$lsv " . _("pixels");
58 $defcfg = array( '$config_version' => array( 'name' => _("Config File Version"),
59 'type' => SMOPT_TYPE_COMMENT
,
61 /* --------------------------------------------------------*/
62 'Group1' => array( 'name' => _("Organization Preferences"),
63 'type' => SMOPT_TYPE_TITLE
),
64 '$org_name' => array( 'name' => _("Organization Name"),
65 'type' => SMOPT_TYPE_STRING
,
67 '$org_logo' => array( 'name' => _("Organization Logo"),
68 'type' => SMOPT_TYPE_STRING
,
70 '$org_title' => array( 'name' => _("Organization Title"),
71 'type' => SMOPT_TYPE_STRING
,
73 '$signout_page' => array( 'name' => _("Signout Page"),
74 'type' => SMOPT_TYPE_STRING
,
76 '$squirrelmail_default_language' => array( 'name' => _("Default Language"),
77 'type' => SMOPT_TYPE_STRLIST
,
79 'posvals' => $language_values ),
80 '$frame_top' => array( 'name' => _("Top Frame"),
81 'type' => SMOPT_TYPE_STRING
,
83 /* --------------------------------------------------------*/
84 'Group2' => array( 'name' => _("Server Settings"),
85 'type' => SMOPT_TYPE_TITLE
),
86 '$domain' => array( 'name' => _("Mail Domain"),
87 'type' => SMOPT_TYPE_STRING
,
89 '$imapServerAddress' => array( 'name' => _("IMAP Server Address"),
90 'type' => SMOPT_TYPE_STRING
,
92 '$imapPort' => array( 'name' => _("IMAP Server Port"),
93 'type' => SMOPT_TYPE_INTEGER
),
94 '$imap_server_type' => array( 'name' => _("IMAP Server Type"),
95 'type' => SMOPT_TYPE_STRLIST
,
96 'posvals' => array( 'cyrus' => _("Cyrus IMAP server"),
97 'uw' => _("University of Washington's IMAP server"),
98 'exchange' => _("Microsoft Exchange IMAP server"),
99 'courier' => _("Courier IMAP server"),
100 'other' => _("Not one of the above servers") ) ),
101 '$optional_delimiter' => array( 'name' => _("IMAP Folder Delimiter"),
102 'type' => SMOPT_TYPE_STRING
,
104 '$useSendmail' => array( 'name' => _("Use Sendmail"),
105 'type' => SMOPT_TYPE_BOOLEAN
),
106 '$sendmail_path' => array( 'name' => _("Sendmail Path"),
107 'type' => SMOPT_TYPE_STRING
,
109 '$smtpServerAddress' => array( 'name' => _("SMTP Server Address"),
110 'type' => SMOPT_TYPE_STRING
,
112 '$smtpPort' => array( 'name' => _("SMTP Server Port"),
113 'type' => SMOPT_TYPE_INTEGER
),
114 '$use_authenticated_smtp' => array( 'name' => _("Authenticated SMTP"),
115 'type' => SMOPT_TYPE_BOOLEAN
),
116 '$invert_time' => array( 'name' => _("Invert Time"),
117 'type' => SMOPT_TYPE_BOOLEAN
),
118 /* --------------------------------------------------------*/
119 'Group3' => array( 'name' => _("Folders Defaults"),
120 'type' => SMOPT_TYPE_TITLE
),
121 '$default_folder_prefix' => array( 'name' => _("Default Folder Prefix"),
122 'type' => SMOPT_TYPE_STRING
,
124 '$show_prefix_option' => array( 'name' => _("Show Folder Prefix Option"),
125 'type' => SMOPT_TYPE_BOOLEAN
),
126 '$trash_folder' => array( 'name' => _("Trash Folder"),
127 'type' => SMOPT_TYPE_STRING
,
129 '$sent_folder' => array( 'name' => _("Sent Folder"),
130 'type' => SMOPT_TYPE_STRING
,
132 '$draft_folder' => array( 'name' => _("Draft Folder"),
133 'type' => SMOPT_TYPE_STRING
,
135 '$default_move_to_trash' => array( 'name' => _("By default, move to trash"),
136 'type' => SMOPT_TYPE_BOOLEAN
),
137 '$default_move_to_sent' => array( 'name' => _("By default, move to sent"),
138 'type' => SMOPT_TYPE_BOOLEAN
),
139 '$default_save_as_draft' => array( 'name' => _("By default, save as draft"),
140 'type' => SMOPT_TYPE_BOOLEAN
),
141 '$list_special_folders_first' => array( 'name' => _("List Special Folders First"),
142 'type' => SMOPT_TYPE_BOOLEAN
),
143 '$use_special_folder_color' => array( 'name' => _("Show Special Folders Color"),
144 'type' => SMOPT_TYPE_BOOLEAN
),
145 '$auto_expunge' => array( 'name' => _("Auto Expunge"),
146 'type' => SMOPT_TYPE_BOOLEAN
),
147 '$default_sub_of_inbox' => array( 'name' => _("Default Sub. of INBOX"),
148 'type' => SMOPT_TYPE_BOOLEAN
),
149 '$show_contain_subfolders_option' => array( 'name' => _("Show 'Contain Sub.' Option"),
150 'type' => SMOPT_TYPE_BOOLEAN
),
151 '$default_unseen_notify' => array( 'name' => _("Default Unseen Notify"),
152 'type' => SMOPT_TYPE_INTEGER
),
153 '$default_unseen_type' => array( 'name' => _("Default Unseen Type"),
154 'type' => SMOPT_TYPE_INTEGER
),
155 '$auto_create_special' => array( 'name' => _("Auto Create Special Folders"),
156 'type' => SMOPT_TYPE_BOOLEAN
),
157 /* --------------------------------------------------------*/
158 'Group4' => array( 'name' => _("General OPtions"),
159 'type' => SMOPT_TYPE_TITLE
),
160 '$default_charset' => array( 'name' => _("Default Charset"),
161 'type' => SMOPT_TYPE_STRING
,
163 '$data_dir' => array( 'name' => _("Data Directory"),
164 'type' => SMOPT_TYPE_STRING
,
166 '$attachment_dir' => array( 'name' => _("Temp Directory"),
167 'type' => SMOPT_TYPE_STRING
,
169 '$dir_hash_level' => array( 'name' => _("Hash Level"),
170 'type' => SMOPT_TYPE_NUMLIST
,
171 'posvals' => array( 0 => _("Hash Disabled"),
176 '$default_left_size' => array( 'name' => _("Hash Level"),
177 'type' => SMOPT_TYPE_NUMLIST
,
178 'posvals' => $left_size_values ),
179 '$force_username_lowercase' => array( 'name' => _("Usernames in Lowercase"),
180 'type' => SMOPT_TYPE_BOOLEAN
),
181 '$default_use_priority' => array( 'name' => _("Allow use of priority"),
182 'type' => SMOPT_TYPE_BOOLEAN
),
183 '$hide_sm_attributions' => array( 'name' => _("Hide SM attributions"),
184 'type' => SMOPT_TYPE_BOOLEAN
),
185 /* --------------------------------------------------------*/
186 'Group5' => array( 'name' => _("Themes"),
187 'type' => SMOPT_TYPE_TITLE
)
191 $defcfg['$motd'] = array( 'name' => _("Message of the Day"),
192 'type' => SMOPT_TYPE_STRING
,