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