Skip to content
Newer
Older
100644 654 lines (489 sloc) 21.1 KB
3549785 @thomascube First steps to implement an installer
thomascube authored
1 <form action="index.php" method="post">
2 <input type="hidden" name="_step" value="2" />
3 <?php
4
b3f9dfb @thomascube Allow to skip the config step if config files already exist
thomascube authored
5 // also load the default config to fill in the fields
190e97e @thomascube Fix database initialization and check write access on the DB; update …
thomascube authored
6 $RCI->load_defaults();
c5042d4 @thomascube More installer stuff
thomascube authored
7
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
8 // register these boolean fields
871ca9a @thomascube Add dependency checks for config options + update database schema wit…
thomascube authored
9 $RCI->bool_config_props = array(
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
10 'ip_check' => 1,
11 'enable_caching' => 1,
12 'enable_spellcheck' => 1,
13 'auto_create_user' => 1,
14 'smtp_log' => 1,
15 'prefer_html' => 1,
16 'preview_pane' => 1,
b77d0dd @alecpl - added options to use syslog instead of log file (#1484850)
alecpl authored
17 'debug_level' => 1,
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
18 );
19
967b342 @thomascube Disable installer by default; add config option to enable it again
thomascube authored
20 // allow the current user to get to the next step
21 $_SESSION['allowinstaller'] = true;
22
c5042d4 @thomascube More installer stuff
thomascube authored
23 if (!empty($_POST['submit'])) {
24
c060677 Enable direct download of (main|db).inc.php from the installer.
svncommit authored
25 echo '<p class="notice">Copy or download the following configurations and save them in two files';
e019f2d @alecpl - s/RoundCube/Roundcube/
alecpl authored
26 echo ' (names above the text box) within the <tt>'.RCMAIL_CONFIG_DIR.'</tt> directory of your Roundcube installation.<br/>';
c0dc907 @thomascube Add hint for saving config files + stop DB initialization if en error…
thomascube authored
27 echo ' Make sure that there are no characters outside the <tt>&lt;?php ?&gt;</tt> brackets when saving the files.</p>';
c5042d4 @thomascube More installer stuff
thomascube authored
28
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
29 $textbox = new html_textarea(array('rows' => 16, 'cols' => 60, 'class' => "configfile"));
c5042d4 @thomascube More installer stuff
thomascube authored
30
c060677 Enable direct download of (main|db).inc.php from the installer.
svncommit authored
31 echo '<div><em>main.inc.php (<a href="index.php?_getfile=main">download</a>)</em></div>';
7d7f67d @thomascube Apply changes of installer script to trunk
thomascube authored
32 echo $textbox->show(($_SESSION['main.inc.php'] = $RCI->create_config('main')));
c5042d4 @thomascube More installer stuff
thomascube authored
33
c060677 Enable direct download of (main|db).inc.php from the installer.
svncommit authored
34 echo '<div style="margin-top:1em"><em>db.inc.php (<a href="index.php?_getfile=db">download</a>)</em></div>';
7d7f67d @thomascube Apply changes of installer script to trunk
thomascube authored
35 echo $textbox->show($_SESSION['db.inc.php'] = $RCI->create_config('db'));
c5042d4 @thomascube More installer stuff
thomascube authored
36
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
37 echo '<p class="hint">Of course there are more options to configure.
38 Have a look at the config files or visit <a href="http://trac.roundcube.net/wiki/Howto_Config">Howto_Config</a> to find out.</p>';
39
c5042d4 @thomascube More installer stuff
thomascube authored
40 echo '<p><input type="button" onclick="location.href=\'./index.php?_step=3\'" value="CONTINUE" /></p>';
41
42 // echo '<style type="text/css"> .configblock { display:none } </style>';
43 echo "\n<hr style='margin-bottom:1.6em' />\n";
44 }
3549785 @thomascube First steps to implement an installer
thomascube authored
45
46 ?>
47 <fieldset>
48 <legend>General configuration</legend>
c5042d4 @thomascube More installer stuff
thomascube authored
49 <dl class="configblock">
3549785 @thomascube First steps to implement an installer
thomascube authored
50
51 <dt class="propname">product_name</dt>
52 <dd>
53 <?php
54
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
55 $input_prodname = new html_inputfield(array('name' => '_product_name', 'size' => 30, 'id' => "cfgprodname"));
3549785 @thomascube First steps to implement an installer
thomascube authored
56 echo $input_prodname->show($RCI->getprop('product_name'));
57
58 ?>
59 <div>The name of your service (used to compose page titles)</div>
60 </dd>
61
62 <dt class="propname">temp_dir</dt>
63 <dd>
64 <?php
65
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
66 $input_tempdir = new html_inputfield(array('name' => '_temp_dir', 'size' => 30, 'id' => "cfgtempdir"));
3549785 @thomascube First steps to implement an installer
thomascube authored
67 echo $input_tempdir->show($RCI->getprop('temp_dir'));
68
69 ?>
a91c9ba @alecpl #1485307: typos fixed
alecpl authored
70 <div>Use this folder to store temp files (must be writeable for webserver)</div>
3549785 @thomascube First steps to implement an installer
thomascube authored
71 </dd>
72
73
74 <dt class="propname">ip_check</dt>
75 <dd>
76 <?php
77
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
78 $check_ipcheck = new html_checkbox(array('name' => '_ip_check', 'id' => "cfgipcheck"));
3549785 @thomascube First steps to implement an installer
thomascube authored
79 echo $check_ipcheck->show(intval($RCI->getprop('ip_check')), array('value' => 1));
80
81 ?>
c5042d4 @thomascube More installer stuff
thomascube authored
82 <label for="cfgipcheck">Check client IP in session authorization</label><br />
3549785 @thomascube First steps to implement an installer
thomascube authored
83
2912de6 @alecpl - Fix typos
alecpl authored
84 <p class="hint">This increases security but can cause sudden logouts when someone uses a proxy with changing IPs.</p>
3549785 @thomascube First steps to implement an installer
thomascube authored
85 </dd>
86
87 <dt class="propname">des_key</dt>
88 <dd>
89 <?php
90
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
91 $input_deskey = new html_inputfield(array('name' => '_des_key', 'size' => 30, 'id' => "cfgdeskey"));
3549785 @thomascube First steps to implement an installer
thomascube authored
92 echo $input_deskey->show($RCI->getprop('des_key'));
93
94 ?>
95 <div>This key is used to encrypt the users imap password before storing in the session record</div>
2912de6 @alecpl - Fix typos
alecpl authored
96 <p class="hint">It's a random generated string to ensure that every installation has its own key.
3549785 @thomascube First steps to implement an installer
thomascube authored
97 If you enter it manually please provide a string of exactly 24 chars.</p>
98 </dd>
99
100 <dt class="propname">enable_caching</dt>
101 <dd>
102 <?php
103
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
104 $check_caching = new html_checkbox(array('name' => '_enable_caching', 'id' => "cfgcache"));
3549785 @thomascube First steps to implement an installer
thomascube authored
105 echo $check_caching->show(intval($RCI->getprop('enable_caching')), array('value' => 1));
106
107 ?>
108 <label for="cfgcache">Cache messages in local database</label><br />
109 </dd>
110
c5042d4 @thomascube More installer stuff
thomascube authored
111 <dt class="propname">enable_spellcheck</dt>
112 <dd>
113 <?php
82475f4 @thomascube Add pspell option to installer script (patch from #1485588)
thomascube authored
114 $check_spell = new html_checkbox(array('name' => '_enable_spellcheck', 'id' => "cfgspellcheck"));
115 echo $check_spell->show(intval($RCI->getprop('enable_spellcheck')), array('value' => 1));
116 ?>
117 <label for="cfgspellcheck">Make use of the spell checker</label><br />
118 </dd>
119
120 <dt class="propname">spellcheck_engine</dt>
121 <dd>
122 <?php
123 $select_spell = new html_select(array('name' => '_spellcheck_engine', 'id' => "cfgspellcheckengine"));
124 if (extension_loaded('pspell'))
125 $select_spell->add('pspell', 'pspell');
df7d6f5 @alecpl - typo (s/googlie/googie/)
alecpl authored
126 $select_spell->add('Googie', 'googie');
c5042d4 @thomascube More installer stuff
thomascube authored
127
82475f4 @thomascube Add pspell option to installer script (patch from #1485588)
thomascube authored
128 echo $select_spell->show($RCI->is_post ? $_POST['_spellcheck_engine'] : 'pspell');
c5042d4 @thomascube More installer stuff
thomascube authored
129
130 ?>
82475f4 @thomascube Add pspell option to installer script (patch from #1485588)
thomascube authored
131 <label for="cfgspellcheckengine">Which spell checker to use</label><br />
c5042d4 @thomascube More installer stuff
thomascube authored
132
82475f4 @thomascube Add pspell option to installer script (patch from #1485588)
thomascube authored
133 <p class="hint">GoogieSpell implies that the message content will be sent to Google in order to check the spelling.</p>
c5042d4 @thomascube More installer stuff
thomascube authored
134 </dd>
135
ec01712 @alecpl - Added option 'identities_level', removed 'multiple_identities'
alecpl authored
136 <dt class="propname">identities_level</dt>
137 <dd>
138 <?php
139
140 $input_ilevel = new html_select(array('name' => '_identities_level', 'id' => "cfgidentitieslevel"));
141 $input_ilevel->add('many identities with possibility to edit all params', 0);
142 $input_ilevel->add('many identities with possibility to edit all params but not email address', 1);
143 $input_ilevel->add('one identity with possibility to edit all params', 2);
144 $input_ilevel->add('one identity with possibility to edit all params but not email address', 3);
145 echo $input_ilevel->show($RCI->getprop('identities_level'), 0);
146
147 ?>
148 <div>Level of identities access</div>
149 <p class="hint">Defines what users can do with their identities.</p>
150 </dd>
151
3549785 @thomascube First steps to implement an installer
thomascube authored
152 </dl>
153 </fieldset>
154
155 <fieldset>
b77d0dd @alecpl - added options to use syslog instead of log file (#1484850)
alecpl authored
156 <legend>Logging & Debugging</legend>
157 <dl class="loggingblock">
158
159 <dt class="propname">debug_level</dt>
160 <dd>
161 <?php
162
163 $value = $RCI->getprop('debug_level');
164 $check_debug = new html_checkbox(array('name' => '_debug_level[]'));
165 echo $check_debug->show(($value & 1) ? 1 : 0 , array('value' => 1, 'id' => 'cfgdebug1'));
166 echo '<label for="cfgdebug1">Log errors</label><br />';
167
168 echo $check_debug->show(($value & 4) ? 4 : 0, array('value' => 4, 'id' => 'cfgdebug4'));
169 echo '<label for="cfgdebug4">Print errors (to the browser)</label><br />';
170
171 echo $check_debug->show(($value & 8) ? 8 : 0, array('value' => 8, 'id' => 'cfgdebug8'));
172 echo '<label for="cfgdebug8">Verbose display (enables debug console)</label><br />';
173
174 ?>
175 </dd>
176
177 <dt class="propname">log_driver</dt>
178 <dd>
179 <?php
180
181 $select_log_driver = new html_select(array('name' => '_log_driver', 'id' => "cfglogdriver"));
182 $select_log_driver->add(array('file', 'syslog'), array('file', 'syslog'));
183 echo $select_log_driver->show($RCI->getprop('log_driver', 'file'));
184
185 ?>
186 <div>How to do logging? 'file' - write to files in the log directory, 'syslog' - use the syslog facility.</div>
187 </dd>
188
189 <dt class="propname">log_dir</dt>
190 <dd>
191 <?php
192
193 $input_logdir = new html_inputfield(array('name' => '_log_dir', 'size' => 30, 'id' => "cfglogdir"));
194 echo $input_logdir->show($RCI->getprop('log_dir'));
195
196 ?>
a91c9ba @alecpl #1485307: typos fixed
alecpl authored
197 <div>Use this folder to store log files (must be writeable for webserver). Note that this only applies if you are using the 'file' log_driver.</div>
b77d0dd @alecpl - added options to use syslog instead of log file (#1484850)
alecpl authored
198 </dd>
199
200 <dt class="propname">syslog_id</dt>
201 <dd>
202 <?php
203
204 $input_syslogid = new html_inputfield(array('name' => '_syslog_id', 'size' => 30, 'id' => "cfgsyslogid"));
205 echo $input_syslogid->show($RCI->getprop('syslog_id', 'roundcube'));
206
207 ?>
208 <div>What ID to use when logging with syslog. Note that this only applies if you are using the 'syslog' log_driver.</div>
209 </dd>
210
211 <dt class="propname">syslog_facility</dt>
212 <dd>
213 <?php
214
215 $input_syslogfacility = new html_select(array('name' => '_syslog_facility', 'id' => "cfgsyslogfacility"));
216 $input_syslogfacility->add('user-level messages', LOG_USER);
217 $input_syslogfacility->add('mail subsystem', LOG_MAIL);
218 $input_syslogfacility->add('local level 0', LOG_LOCAL0);
219 $input_syslogfacility->add('local level 1', LOG_LOCAL1);
220 $input_syslogfacility->add('local level 2', LOG_LOCAL2);
221 $input_syslogfacility->add('local level 3', LOG_LOCAL3);
222 $input_syslogfacility->add('local level 4', LOG_LOCAL4);
223 $input_syslogfacility->add('local level 5', LOG_LOCAL5);
224 $input_syslogfacility->add('local level 6', LOG_LOCAL6);
225 $input_syslogfacility->add('local level 7', LOG_LOCAL7);
226 echo $input_syslogfacility->show($RCI->getprop('syslog_facility'), LOG_USER);
227
228 ?>
229 <div>What ID to use when logging with syslog. Note that this only applies if you are using the 'syslog' log_driver.</div>
230 </dd>
231
232
233
234
235 </dl>
236 </fieldset>
237
238
239 <fieldset>
6557d30 @thomascube Added environment checks from check.php-dist
thomascube authored
240 <legend>Database setup</legend>
c5042d4 @thomascube More installer stuff
thomascube authored
241 <dl class="configblock" id="cgfblockdb">
242 <dt class="propname">db_dsnw</dt>
243 <dd>
244 <p>Database settings for read/write operations:</p>
245 <?php
246
d5eb5cd @thomascube Use MDB2 instead of DB in installer (#1485124)
thomascube authored
247 require_once 'MDB2.php';
ad43e63 @thomascube Add SMTP test to installer script
thomascube authored
248
c5042d4 @thomascube More installer stuff
thomascube authored
249 $supported_dbs = array('MySQL' => 'mysql', 'MySQLi' => 'mysqli',
250 'PgSQL' => 'pgsql', 'SQLite' => 'sqlite');
251
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
252 $select_dbtype = new html_select(array('name' => '_dbtype', 'id' => "cfgdbtype"));
c5042d4 @thomascube More installer stuff
thomascube authored
253 foreach ($supported_dbs AS $database => $ext) {
254 if (extension_loaded($ext)) {
255 $select_dbtype->add($database, $ext);
256 }
257 }
258
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
259 $input_dbhost = new html_inputfield(array('name' => '_dbhost', 'size' => 20, 'id' => "cfgdbhost"));
260 $input_dbname = new html_inputfield(array('name' => '_dbname', 'size' => 20, 'id' => "cfgdbname"));
261 $input_dbuser = new html_inputfield(array('name' => '_dbuser', 'size' => 20, 'id' => "cfgdbuser"));
2e90ff5 @alecpl - Make password input fields of type password in installer (#1484886)
alecpl authored
262 $input_dbpass = new html_passwordfield(array('name' => '_dbpass', 'size' => 20, 'id' => "cfgdbpass"));
c5042d4 @thomascube More installer stuff
thomascube authored
263
d5eb5cd @thomascube Use MDB2 instead of DB in installer (#1485124)
thomascube authored
264 $dsnw = MDB2::parseDSN($RCI->getprop('db_dsnw'));
c5042d4 @thomascube More installer stuff
thomascube authored
265
2371191 @thomascube Fix sqlite dsn composing
thomascube authored
266 echo $select_dbtype->show($RCI->is_post ? $_POST['_dbtype'] : $dsnw['phptype']);
c5042d4 @thomascube More installer stuff
thomascube authored
267 echo '<label for="cfgdbtype">Database type</label><br />';
2371191 @thomascube Fix sqlite dsn composing
thomascube authored
268 echo $input_dbhost->show($RCI->is_post ? $_POST['_dbhost'] : $dsnw['hostspec']);
82475f4 @thomascube Add pspell option to installer script (patch from #1485588)
thomascube authored
269 echo '<label for="cfgdbhost">Database server (omit for sqlite)</label><br />';
2371191 @thomascube Fix sqlite dsn composing
thomascube authored
270 echo $input_dbname->show($RCI->is_post ? $_POST['_dbname'] : $dsnw['database']);
fafe5dc @alecpl - added comments to set absolute path for SQLite DSN (#1486095)
alecpl authored
271 echo '<label for="cfgdbname">Database name (use absolute path and filename for sqlite)</label><br />';
2371191 @thomascube Fix sqlite dsn composing
thomascube authored
272 echo $input_dbuser->show($RCI->is_post ? $_POST['_dbuser'] : $dsnw['username']);
82475f4 @thomascube Add pspell option to installer script (patch from #1485588)
thomascube authored
273 echo '<label for="cfgdbuser">Database user name (needs write permissions)(omit for sqlite)</label><br />';
2371191 @thomascube Fix sqlite dsn composing
thomascube authored
274 echo $input_dbpass->show($RCI->is_post ? $_POST['_dbpass'] : $dsnw['password']);
82475f4 @thomascube Add pspell option to installer script (patch from #1485588)
thomascube authored
275 echo '<label for="cfgdbpass">Database password (omit for sqlite)</label><br />';
c5042d4 @thomascube More installer stuff
thomascube authored
276
277 ?>
278 </dd>
6557d30 @thomascube Added environment checks from check.php-dist
thomascube authored
279 </dl>
280 </fieldset>
281
c5042d4 @thomascube More installer stuff
thomascube authored
282
6557d30 @thomascube Added environment checks from check.php-dist
thomascube authored
283 <fieldset>
3549785 @thomascube First steps to implement an installer
thomascube authored
284 <legend>IMAP Settings</legend>
c5042d4 @thomascube More installer stuff
thomascube authored
285 <dl class="configblock" id="cgfblockimap">
286 <dt class="propname">default_host</dt>
287 <dd>
288 <div>The IMAP host(s) chosen to perform the log-in</div>
289 <div id="defaulthostlist">
290 <?php
291
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
292 $text_imaphost = new html_inputfield(array('name' => '_default_host[]', 'size' => 30));
1c4e5dd @thomascube Some more bugfixes for the install script
thomascube authored
293 $default_hosts = $RCI->get_hostlist();
294
295 if (empty($default_hosts))
296 $default_hosts = array('');
c5042d4 @thomascube More installer stuff
thomascube authored
297
b3f9dfb @thomascube Allow to skip the config step if config files already exist
thomascube authored
298 $i = 0;
1c4e5dd @thomascube Some more bugfixes for the install script
thomascube authored
299 foreach ($default_hosts as $host) {
b3f9dfb @thomascube Allow to skip the config step if config files already exist
thomascube authored
300 echo '<div id="defaulthostentry'.$i.'">' . $text_imaphost->show($host);
301 if ($i++ > 0)
c5042d4 @thomascube More installer stuff
thomascube authored
302 echo '<a href="#" onclick="removehostfield(this.parentNode);return false" class="removelink" title="Remove this entry">remove</a>';
303 echo '</div>';
304 }
305
306 ?>
307 </div>
308 <div><a href="javascript:addhostfield()" class="addlink" title="Add another field">add</a></div>
309
b3f9dfb @thomascube Allow to skip the config step if config files already exist
thomascube authored
310 <p class="hint">Leave blank to show a textbox at login. To use SSL/IMAPS connection, type ssl://hostname</p>
c5042d4 @thomascube More installer stuff
thomascube authored
311 </dd>
312
313 <dt class="propname">default_port</dt>
314 <dd>
315 <?php
316
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
317 $text_imapport = new html_inputfield(array('name' => '_default_port', 'size' => 6, 'id' => "cfgimapport"));
c5042d4 @thomascube More installer stuff
thomascube authored
318 echo $text_imapport->show($RCI->getprop('default_port'));
319
320 ?>
321 <div>TCP port used for IMAP connections</div>
322 </dd>
323
324 <dt class="propname">username_domain</dt>
325 <dd>
326 <?php
327
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
328 $text_userdomain = new html_inputfield(array('name' => '_username_domain', 'size' => 30, 'id' => "cfguserdomain"));
c5042d4 @thomascube More installer stuff
thomascube authored
329 echo $text_userdomain->show($RCI->getprop('username_domain'));
330
331 ?>
332 <div>Automatically add this domain to user names for login</div>
333
334 <p class="hint">Only for IMAP servers that require full e-mail addresses for login</p>
335 </dd>
336
3549785 @thomascube First steps to implement an installer
thomascube authored
337 <dt class="propname">auto_create_user</dt>
338 <dd>
339 <?php
340
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
341 $check_autocreate = new html_checkbox(array('name' => '_auto_create_user', 'id' => "cfgautocreate"));
3549785 @thomascube First steps to implement an installer
thomascube authored
342 echo $check_autocreate->show(intval($RCI->getprop('auto_create_user')), array('value' => 1));
343
344 ?>
e019f2d @alecpl - s/RoundCube/Roundcube/
alecpl authored
345 <label for="cfgautocreate">Automatically create a new Roundcube user when log-in the first time</label><br />
3549785 @thomascube First steps to implement an installer
thomascube authored
346
347 <p class="hint">A user is authenticated by the IMAP server but it requires a local record to store settings
348 and contacts. With this option enabled a new user record will automatically be created once the IMAP login succeeds.</p>
349
e019f2d @alecpl - s/RoundCube/Roundcube/
alecpl authored
350 <p class="hint">If this option is disabled, the login only succeeds if there's a matching user-record in the local Roundcube database
3549785 @thomascube First steps to implement an installer
thomascube authored
351 what means that you have to create those records manually or disable this option after the first login.</p>
352 </dd>
353
c5042d4 @thomascube More installer stuff
thomascube authored
354 <dt class="propname">sent_mbox</dt>
355 <dd>
356 <?php
357
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
358 $text_sentmbox = new html_inputfield(array('name' => '_sent_mbox', 'size' => 20, 'id' => "cfgsentmbox"));
c5042d4 @thomascube More installer stuff
thomascube authored
359 echo $text_sentmbox->show($RCI->getprop('sent_mbox'));
360
361 ?>
9abd0f0 @alecpl - Allow UTF-8 folder names in config (#1485579)
alecpl authored
362 <div>Store sent messages in this folder</div>
c5042d4 @thomascube More installer stuff
thomascube authored
363
d08333e @alecpl - Fix problems with subfolders of INBOX folder on some IMAP servers (…
alecpl authored
364 <p class="hint">Leave blank if sent messages should not be stored. Note: folder must include namespace prefix if any.</p>
c5042d4 @thomascube More installer stuff
thomascube authored
365 </dd>
366
367 <dt class="propname">trash_mbox</dt>
368 <dd>
369 <?php
370
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
371 $text_trashmbox = new html_inputfield(array('name' => '_trash_mbox', 'size' => 20, 'id' => "cfgtrashmbox"));
c5042d4 @thomascube More installer stuff
thomascube authored
372 echo $text_trashmbox->show($RCI->getprop('trash_mbox'));
373
374 ?>
375 <div>Move messages to this folder when deleting them</div>
376
d08333e @alecpl - Fix problems with subfolders of INBOX folder on some IMAP servers (…
alecpl authored
377 <p class="hint">Leave blank if they should be deleted directly. Note: folder must include namespace prefix if any.</p>
c5042d4 @thomascube More installer stuff
thomascube authored
378 </dd>
379
380 <dt class="propname">drafts_mbox</dt>
381 <dd>
382 <?php
383
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
384 $text_draftsmbox = new html_inputfield(array('name' => '_drafts_mbox', 'size' => 20, 'id' => "cfgdraftsmbox"));
c5042d4 @thomascube More installer stuff
thomascube authored
385 echo $text_draftsmbox->show($RCI->getprop('drafts_mbox'));
386
387 ?>
9abd0f0 @alecpl - Allow UTF-8 folder names in config (#1485579)
alecpl authored
388 <div>Store draft messages in this folder</div>
389
d08333e @alecpl - Fix problems with subfolders of INBOX folder on some IMAP servers (…
alecpl authored
390 <p class="hint">Leave blank if they should not be stored. Note: folder must include namespace prefix if any.</p>
c5042d4 @thomascube More installer stuff
thomascube authored
391 </dd>
392
9abd0f0 @alecpl - Allow UTF-8 folder names in config (#1485579)
alecpl authored
393 <dt class="propname">junk_mbox</dt>
394 <dd>
395 <?php
396
397 $text_junkmbox = new html_inputfield(array('name' => '_junk_mbox', 'size' => 20, 'id' => "cfgjunkmbox"));
398 echo $text_junkmbox->show($RCI->getprop('junk_mbox'));
399
400 ?>
401 <div>Store spam messages in this folder</div>
d08333e @alecpl - Fix problems with subfolders of INBOX folder on some IMAP servers (…
alecpl authored
402
403 <p class="hint">Note: folder must include namespace prefix if any.</p>
404 </dd>
405
9abd0f0 @alecpl - Allow UTF-8 folder names in config (#1485579)
alecpl authored
406 </dd>
3549785 @thomascube First steps to implement an installer
thomascube authored
407 </dl>
408 </fieldset>
409
c5042d4 @thomascube More installer stuff
thomascube authored
410
3549785 @thomascube First steps to implement an installer
thomascube authored
411 <fieldset>
412 <legend>SMTP Settings</legend>
c5042d4 @thomascube More installer stuff
thomascube authored
413 <dl class="configblock" id="cgfblocksmtp">
414 <dt class="propname">smtp_server</dt>
415 <dd>
416 <?php
417
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
418 $text_smtphost = new html_inputfield(array('name' => '_smtp_server', 'size' => 30, 'id' => "cfgsmtphost"));
c5042d4 @thomascube More installer stuff
thomascube authored
419 echo $text_smtphost->show($RCI->getprop('smtp_server'));
420
421 ?>
422 <div>Use this host for sending mails</div>
423
424 <p class="hint">To use SSL connection, set ssl://smtp.host.com. If left blank, the PHP mail() function is used</p>
425 </dd>
426
427 <dt class="propname">smtp_port</dt>
428 <dd>
429 <?php
430
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
431 $text_smtpport = new html_inputfield(array('name' => '_smtp_port', 'size' => 6, 'id' => "cfgsmtpport"));
c5042d4 @thomascube More installer stuff
thomascube authored
432 echo $text_smtpport->show($RCI->getprop('smtp_port'));
433
434 ?>
82475f4 @thomascube Add pspell option to installer script (patch from #1485588)
thomascube authored
435 <div>SMTP port (default is 25; 465 for SSL; 587 for submission)</div>
c5042d4 @thomascube More installer stuff
thomascube authored
436 </dd>
437
438 <dt class="propname">smtp_user/smtp_pass</dt>
439 <dd>
440 <?php
441
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
442 $text_smtpuser = new html_inputfield(array('name' => '_smtp_user', 'size' => 20, 'id' => "cfgsmtpuser"));
2e90ff5 @alecpl - Make password input fields of type password in installer (#1484886)
alecpl authored
443 $text_smtppass = new html_passwordfield(array('name' => '_smtp_pass', 'size' => 20, 'id' => "cfgsmtppass"));
c5042d4 @thomascube More installer stuff
thomascube authored
444 echo $text_smtpuser->show($RCI->getprop('smtp_user'));
445 echo $text_smtppass->show($RCI->getprop('smtp_pass'));
446
447 ?>
448 <div>SMTP username and password (if required)</div>
449 <p>
450 <?php
451
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
452 $check_smtpuser = new html_checkbox(array('name' => '_smtp_user_u', 'id' => "cfgsmtpuseru"));
c5042d4 @thomascube More installer stuff
thomascube authored
453 echo $check_smtpuser->show($RCI->getprop('smtp_user') == '%u' || $_POST['_smtp_user_u'] ? 1 : 0, array('value' => 1));
454
455 ?>
456 <label for="cfgsmtpuseru">Use the current IMAP username and password for SMTP authentication</label>
457 </p>
458 </dd>
459 <!--
460 <dt class="propname">smtp_auth_type</dt>
461 <dd>
462 <?php
463 /*
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
464 $select_smtpauth = new html_select(array('name' => '_smtp_auth_type', 'id' => "cfgsmtpauth"));
c5042d4 @thomascube More installer stuff
thomascube authored
465 $select_smtpauth->add(array('(auto)', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'), array('0', 'PLAIN', 'DIGEST-MD5', 'CRAM-MD5', 'LOGIN'));
466 echo $select_smtpauth->show(intval($RCI->getprop('smtp_auth_type')));
467 */
468 ?>
469 <div>Method to authenticate at the SMTP server. Choose (auto) if you don't know what this is</div>
470 </dd>
471 -->
472 <dt class="propname">smtp_log</dt>
473 <dd>
474 <?php
475
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
476 $check_smtplog = new html_checkbox(array('name' => '_smtp_log', 'id' => "cfgsmtplog"));
c5042d4 @thomascube More installer stuff
thomascube authored
477 echo $check_smtplog->show(intval($RCI->getprop('smtp_log')), array('value' => 1));
478
479 ?>
b77d0dd @alecpl - added options to use syslog instead of log file (#1484850)
alecpl authored
480 <label for="cfgsmtplog">Log sent messages in <tt>{log_dir}/sendmail</tt> or to syslog.</label><br />
c5042d4 @thomascube More installer stuff
thomascube authored
481 </dd>
482
3549785 @thomascube First steps to implement an installer
thomascube authored
483 </dl>
484 </fieldset>
485
c5042d4 @thomascube More installer stuff
thomascube authored
486
3549785 @thomascube First steps to implement an installer
thomascube authored
487 <fieldset>
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
488 <legend>Display settings &amp; user prefs</legend>
c5042d4 @thomascube More installer stuff
thomascube authored
489 <dl class="configblock" id="cgfblockdisplay">
3549785 @thomascube First steps to implement an installer
thomascube authored
490
569654a @alecpl - overwrite default_imap_folders according to *_mbox settings (#14856…
alecpl authored
491 <dt class="propname">language <span class="userconf">*</span></dt>
3549785 @thomascube First steps to implement an installer
thomascube authored
492 <dd>
493 <?php
494
522007b @thomascube Switch installer from obsolete locale_string to language config option
thomascube authored
495 $input_locale = new html_inputfield(array('name' => '_language', 'size' => 6, 'id' => "cfglocale"));
496 echo $input_locale->show($RCI->getprop('language'));
3549785 @thomascube First steps to implement an installer
thomascube authored
497
498 ?>
c8ae249 @thomascube Auto-detect client language and timezone if desired by config/prefs
thomascube authored
499 <div>The default locale setting. This also defines the language of the login screen.<br/>Leave it empty to auto-detect the user agent language.</div>
522007b @thomascube Switch installer from obsolete locale_string to language config option
thomascube authored
500 <p class="hint">Enter a <a href="http://www.faqs.org/rfcs/rfc1766">RFC1766</a> formatted language name. Examples: en_US, de_DE, de_CH, fr_FR, pt_BR</p>
3549785 @thomascube First steps to implement an installer
thomascube authored
501 </dd>
502
9e8e5fa @alecpl - Removed support for PEAR::DB driver
alecpl authored
503 <dt class="propname">skin <span class="userconf">*</span></dt>
504 <dd>
505 <?php
506
e490642 @thomascube Add skin_logo config option to installer; show drop-down list for ski…
thomascube authored
507 $input_skin = new html_select(array('name' => '_skin', 'id' => "cfgskin"));
508 $input_skin->add($RCI->list_skins());
9e8e5fa @alecpl - Removed support for PEAR::DB driver
alecpl authored
509 echo $input_skin->show($RCI->getprop('skin'));
510
511 ?>
512 <div>Name of interface skin (folder in /skins)</div>
513 </dd>
514
e490642 @thomascube Add skin_logo config option to installer; show drop-down list for ski…
thomascube authored
515 <dt class="propname">skin_logo</dt>
516 <dd>
517 <?php
518
519 $input_skin = new html_inputfield(array('name' => '_skin_logo', 'size' => 50, 'id' => "cfgskinlogo"));
520 echo $input_skin->show($RCI->getprop('skin_logo'));
521
522 ?>
523 <div>Custom image to display instead of the Roundcube logo.</div>
524 <p class="hint">Enter a URL relative to the document root of this Roundcube installation.</p>
525 </dd>
526
08ffd93 @alecpl - Add separate pagesize setting for mail messages and contacts (#1488…
alecpl authored
527 <dt class="propname">mail_pagesize <span class="userconf">*</span></dt>
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
528 <dd>
529 <?php
530
08ffd93 @alecpl - Add separate pagesize setting for mail messages and contacts (#1488…
alecpl authored
531 $pagesize = $RCI->getprop('mail_pagesize');
532 if (!$pagesize) {
533 $pagesize = $RCI->getprop('pagesize');
534 }
535 $input_pagesize = new html_inputfield(array('name' => '_mail_pagesize', 'size' => 6, 'id' => "cfgmailpagesize"));
536 echo $input_pagesize->show($pagesize);
537
538 ?>
539 <div>Show up to X items in the mail messages list view.</div>
540 </dd>
541
542 <dt class="propname">addressbook_pagesize <span class="userconf">*</span></dt>
543 <dd>
544 <?php
545
546 $pagesize = $RCI->getprop('addressbook_pagesize');
547 if (!$pagesize) {
548 $pagesize = $RCI->getprop('pagesize');
549 }
550 $input_pagesize = new html_inputfield(array('name' => '_addressbook_pagesize', 'size' => 6, 'id' => "cfgabookpagesize"));
551 echo $input_pagesize->show($pagesize);
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
552
553 ?>
08ffd93 @alecpl - Add separate pagesize setting for mail messages and contacts (#1488…
alecpl authored
554 <div>Show up to X items in the contacts list view.</div>
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
555 </dd>
556
557 <dt class="propname">prefer_html <span class="userconf">*</span></dt>
558 <dd>
559 <?php
560
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
561 $check_htmlview = new html_checkbox(array('name' => '_prefer_html', 'id' => "cfghtmlview", 'value' => 1));
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
562 echo $check_htmlview->show(intval($RCI->getprop('prefer_html')));
563
564 ?>
565 <label for="cfghtmlview">Prefer displaying HTML messages</label><br />
566 </dd>
567
568 <dt class="propname">preview_pane <span class="userconf">*</span></dt>
569 <dd>
570 <?php
571
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
572 $check_prevpane = new html_checkbox(array('name' => '_preview_pane', 'id' => "cfgprevpane", 'value' => 1));
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
573 echo $check_prevpane->show(intval($RCI->getprop('preview_pane')));
574
575 ?>
576 <label for="cfgprevpane">If preview pane is enabled</label><br />
577 </dd>
578
579 <dt class="propname">htmleditor <span class="userconf">*</span></dt>
580 <dd>
868deb5 @alecpl - Make htmleditor option behaviour consistent, add option to use HTML…
alecpl authored
581 <label for="cfghtmlcompose">Compose HTML formatted messages</label>
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
582 <?php
583
868deb5 @alecpl - Make htmleditor option behaviour consistent, add option to use HTML…
alecpl authored
584 $select_htmlcomp = new html_select(array('name' => '_htmleditor', 'id' => "cfghtmlcompose"));
585 $select_htmlcomp->add('never', 0);
586 $select_htmlcomp->add('always', 1);
587 $select_htmlcomp->add('on reply to HTML message only', 2);
588 echo $select_htmlcomp->show(intval($RCI->getprop('htmleditor')));
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
589
590 ?>
591 </dd>
592
593 <dt class="propname">draft_autosave <span class="userconf">*</span></dt>
594 <dd>
595 <label for="cfgautosave">Save compose message every</label>
596 <?php
597
47124c2 @thomascube Changed codebase to PHP5 with autoloader + added some new classes fro…
thomascube authored
598 $select_autosave = new html_select(array('name' => '_draft_autosave', 'id' => 'cfgautosave'));
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
599 $select_autosave->add('never', 0);
569654a @alecpl - overwrite default_imap_folders according to *_mbox settings (#14856…
alecpl authored
600 foreach (array(1, 3, 5, 10) as $i => $min)
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
601 $select_autosave->add("$min min", $min*60);
602
603 echo $select_autosave->show(intval($RCI->getprop('draft_autosave')));
604
605 ?>
606 </dd>
607
9e8e5fa @alecpl - Removed support for PEAR::DB driver
alecpl authored
608 <dt class="propname">mdn_requests <span class="userconf">*</span></dt>
609 <dd>
610 <?php
611
50baa6c @alecpl - Add mdn_requests=3 to the installer
alecpl authored
612 $mdn_opts = array(
613 0 => 'ask the user',
614 1 => 'send automatically',
6c6bb09 @alecpl - Add mdn_request=4
alecpl authored
615 3 => 'send receipt to user contacts, otherwise ask the user',
616 4 => 'send receipt to user contacts, otherwise ignore',
50baa6c @alecpl - Add mdn_requests=3 to the installer
alecpl authored
617 2 => 'ignore',
618 );
619
9e8e5fa @alecpl - Removed support for PEAR::DB driver
alecpl authored
620 $select_mdnreq = new html_select(array('name' => '_mdn_requests', 'id' => "cfgmdnreq"));
50baa6c @alecpl - Add mdn_requests=3 to the installer
alecpl authored
621 $select_mdnreq->add(array_values($mdn_opts), array_keys($mdn_opts));
9e8e5fa @alecpl - Removed support for PEAR::DB driver
alecpl authored
622 echo $select_mdnreq->show(intval($RCI->getprop('mdn_requests')));
623
624 ?>
625 <div>Behavior if a received message requests a message delivery notification (read receipt)</div>
626 </dd>
627
ffae15e @alecpl - Added 'mime_param_folding' option with possibility to choose
alecpl authored
628 <dt class="propname">mime_param_folding <span class="userconf">*</span></dt>
629 <dd>
630 <?php
631
632 $select_param_folding = new html_select(array('name' => '_mime_param_folding', 'id' => "cfgmimeparamfolding"));
633 $select_param_folding->add('Full RFC 2231 (Roundcube, Thunderbird)', '0');
634 $select_param_folding->add('RFC 2047/2231 (MS Outlook, OE)', '1');
635 $select_param_folding->add('Full RFC 2047 (deprecated)', '2');
636
637 echo $select_param_folding->show(intval($RCI->getprop('mime_param_folding')));
638
639 ?>
640 <div>How to encode attachment long/non-ascii names</div>
641 </dd>
642
3549785 @thomascube First steps to implement an installer
thomascube authored
643 </dl>
27564f1 @thomascube Add IMAP test and some more options to installer script
thomascube authored
644
645 <p class="hint"><span class="userconf">*</span>&nbsp; These settings are defaults for the user preferences</p>
3549785 @thomascube First steps to implement an installer
thomascube authored
646 </fieldset>
647
648 <?php
649
b3f9dfb @thomascube Allow to skip the config step if config files already exist
thomascube authored
650 echo '<p><input type="submit" name="submit" value="' . ($RCI->configured ? 'UPDATE' : 'CREATE') . ' CONFIG" ' . ($RCI->failures ? 'disabled' : '') . ' /></p>';
3549785 @thomascube First steps to implement an installer
thomascube authored
651
652 ?>
653 </form>
Something went wrong with that request. Please try again.