From 3977f41672d060583e51aeb4f0608339aebb2bf3 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 30 Aug 2004 07:45:03 +0000 Subject: [PATCH] MOved the Editor on/off to the editor settings page, and tidied up a bit --- admin/editor.html | 50 +++++++++++++++++++++++++++++++++-------------- admin/editor.php | 8 +++++--- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/admin/editor.html b/admin/editor.html index 90dc971b43c..2226d0c5650 100644 --- a/admin/editor.html +++ b/admin/editor.html @@ -1,24 +1,36 @@
- - + + + + + - + - + - + - + - + - - + $fontvalue) { ?> - - + + - - + +
.

htmleditor:

+ htmleditor, "", "", ""); + ?> + + +
:editorbackgroundcolor:
:editorfontfamily:
:editorfontsize:
:editorkillword:
:editorspelling:

  +
  +
">
-
\ No newline at end of file + + +
+
+ +
+
+ diff --git a/admin/editor.php b/admin/editor.php index 32305b60f28..ac621579a7e 100644 --- a/admin/editor.php +++ b/admin/editor.php @@ -8,10 +8,10 @@ error("Only admins can access this page"); } - if($data = data_submitted()) { + if ($data = data_submitted()) { // do we want default values? - if(isset($data->resettodefaults)) { + if (isset($data->resettodefaults)) { if(!(reset_to_defaults())) { error("Editor settings could not be restored!"); } @@ -95,6 +95,7 @@ function editor_update_config ($data) { // make array of values to update $updatedata = array(); + $updatedata['htmleditor'] = $data->htmleditor; $updatedata['editorbackgroundcolor'] = !empty($data->backgroundcolor) ? $data->backgroundcolor : "#ffffff"; $updatedata['editorfontfamily'] = !empty($data->fontfamily) ? str_replace($nochars,"",$data->fontfamily) : "Times New Roman, Times"; $updatedata['editorfontsize'] = !empty($data->fontsize) ? $data->fontsize : ""; @@ -117,6 +118,7 @@ function reset_to_defaults () { $updatedata = array(); + $updatedata['htmleditor'] = $defaults['htmleditor']; $updatedata['editorbackgroundcolor'] = $defaults['editorbackgroundcolor']; $updatedata['editorfontfamily'] = $defaults['editorfontfamily']; $updatedata['editorfontsize'] = $defaults['editorfontsize']; @@ -131,4 +133,4 @@ function reset_to_defaults () { } return true; } -?> \ No newline at end of file +?>