summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-10-20 21:47:11 +0000
committerthomascube <thomas@roundcube.net>2007-10-20 21:47:11 +0000
commit111b278fe0d15fd1eccf44048cb4a0643b5ffc49 (patch)
treeeb58bf224d365611e6990da566bb7453e0315ce0
parent1ee2cf3b220a23903c1be2897366c243fdaf2f16 (diff)
Disable HTML the editor by default
-rw-r--r--config/main.inc.php.dist13
-rw-r--r--program/steps/mail/compose.inc15
-rw-r--r--program/steps/settings/func.inc4
-rw-r--r--skins/default/templates/compose.html6
4 files changed, 24 insertions, 14 deletions
diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index adea9b553..591c1ce1e 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -130,7 +130,7 @@ $rcmail_config['date_long'] = 'd.m.Y H:i';
$rcmail_config['date_today'] = 'H:i';
// add this user-agent to message headers when sending
-$rcmail_config['useragent'] = 'RoundCube Webmail/0.1b';
+$rcmail_config['useragent'] = 'RoundCube Webmail/0.1-rc2';
// use this name to compose page titles
$rcmail_config['product_name'] = 'RoundCube Webmail';
@@ -174,6 +174,8 @@ $rcmail_config['read_when_deleted'] = TRUE;
$rcmail_config['flag_for_deletion'] = TRUE;
// Make use of the built-in spell checker. It is based on GoogieSpell.
+// Since Google only accepts connections over https your PHP installatation
+// requires to be compiled with Open SSL support
$rcmail_config['enable_spellcheck'] = TRUE;
// For a locally installed Nox Spell Server, please specify the URI to call it.
@@ -219,6 +221,9 @@ $rcmail_config['mail_header_delimiter'] = NULL;
* 'fuzzy_search' => true); // server allows wildcard search
*/
+// enable composing html formatted messages (experimental)
+$rcmail_config['enable_htmleditor'] = FALSE;
+
// don't allow these settings to be overriden by the user
$rcmail_config['dont_override'] = array();
@@ -243,9 +248,6 @@ $rcmail_config['dst_active'] = (bool)date('I');
// prefer displaying HTML messages
$rcmail_config['prefer_html'] = TRUE;
-// compose html formatted messages by default
-$rcmail_config['htmleditor'] = TRUE;
-
// show pretty dates as standard
$rcmail_config['prettydate'] = TRUE;
@@ -258,9 +260,6 @@ $rcmail_config['message_sort_order'] = 'DESC';
// save compose message every 300 seconds (5min)
$rcmail_config['draft_autosave'] = 300;
-// default setting if preview pane is enabled
-$rcmail_config['preview_pane'] = FALSE;
-
// don't let users set pagesize to more than this value if set
$rcmail_config['max_pagesize'] = 200;
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index d13f71aa2..ce36839ca 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -63,6 +63,9 @@ rcube_add_label('nosubject', 'norecipientwarning', 'nosubjectwarning', 'nobodywa
// add config parameter to client script
$OUTPUT->set_env('draft_autosave', !empty($CONFIG['drafts_mbox']) ? $CONFIG['draft_autosave'] : 0);
+// no html editor if globally disabled
+if (!$CONFIG['enable_htmleditor'])
+ $CONFIG['htmleditor'] = false;
// get reference message and set compose mode
if ($msg_uid = get_input_value('_reply_uid', RCUBE_INPUT_GET))
@@ -407,9 +410,12 @@ function rcmail_compose_body($attrib)
$body = rcmail_create_draft_body($body, $isHtml);
}
- $OUTPUT->include_script('tiny_mce/tiny_mce.js');
- $OUTPUT->include_script("editor.js");
- $OUTPUT->add_script('rcmail_editor_init("$__skin_path");');
+ if ($CONFIG['enable_htmleditor'])
+ {
+ $OUTPUT->include_script('tiny_mce/tiny_mce.js');
+ $OUTPUT->include_script("editor.js");
+ $OUTPUT->add_script('rcmail_editor_init("$__skin_path");');
+ }
$out = $form_start ? "$form_start\n" : '';
@@ -781,6 +787,9 @@ function rcmail_receipt_checkbox($attrib)
function rcmail_editor_selector($attrib)
{
global $CONFIG, $MESSAGE, $compose_mode;
+
+ if (!$CONFIG['enable_htmleditor'])
+ return '';
$choices = array(
'html' => 'htmltoggle',
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 18e8e523d..32eb0c5bd 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -37,7 +37,7 @@ function rcmail_user_prefs_form($attrib)
{
global $DB, $CONFIG, $sess_user_lang;
- $no_override = is_array($CONFIG['dont_override']) ? array_flip($CONFIG['dont_override']) : array();
+ $no_override = !empty($CONFIG['dont_override']) ? array_flip((array)$CONFIG['dont_override']) : array('preview_pane'=>true);
// add some labels to client
rcube_add_label('nopagesizewarning');
@@ -161,7 +161,7 @@ function rcmail_user_prefs_form($attrib)
}
// Show checkbox for HTML Editor
- if (!isset($no_override['htmleditor']))
+ if (!isset($no_override['htmleditor']) && $CONFIG['enable_htmleditor'])
{
$field_id = 'rcmfd_htmleditor';
$input_htmleditor = new checkbox(array('name' => '_htmleditor', 'id' => $field_id, 'value' => 1));
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index f45c63bcb..7e02ff542 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -137,8 +137,10 @@ function rcmail_prev_sibling(elm)
<roundcube:button type="input" command="list" class="button" label="cancel" />
</td>
<td align="right">
- <roundcube:label name="editortype" />:&nbsp;
- <span class="radios-left"><roundcube:object name="editorSelector" tabindex="9" /></span>
+ <roundcube:if condition="config:enable_htmleditor" />
+ <roundcube:label name="editortype" />:&nbsp;
+ <span class="radios-left"><roundcube:object name="editorSelector" tabindex="9" /></span>
+ <roundcube:endif />
</td>
</tr>
</tbody></table>