Index: /extensions/FCKEditor/fckeditor.php
===================================================================
--- /extensions/FCKEditor/fckeditor.php (revision 4629)
+++ /extensions/FCKEditor/fckeditor.php (revision 4630)
@@ -9,8 +9,4 @@
if (!isset($page['page'])) return $plugin_menu_links;
- if (!($config = unserialize($conf['FCKEditor'])))
- {
- $config = array();
- }
$toolbar = 'Full';
$width = '750px';
@@ -40,4 +36,12 @@
$template->set_prefilter('notification_by_mail', 'add_remove_button');
}
+ // Page banner
+ elseif ($page['page'] == 'configuration')
+ {
+ $areas[] = 'page_banner';
+ $width = '70%';
+ $toolbar = 'Basic';
+ $template->set_outputfilter('config', 'add_remove_button_banner');
+ }
elseif ($page['page'] == 'plugin')
{
@@ -48,6 +52,5 @@
$areas[] = 'ap_content';
$width = '100%';
- $height = '400px';
- $template->set_prefilter('plugin_admin_content', 'add_remove_button');
+ $template->set_outputfilter('module_options', 'add_remove_button_br');
}
// PWG Stuffs
@@ -55,5 +58,5 @@
{
$areas[] = 'personal_content';
- $width = '100%';
+ $width = '99%';
$height = '250px';
$template->set_prefilter('module_options', 'add_remove_button_stuffs');
@@ -63,45 +66,5 @@
if (!empty($areas))
{
- $head_element = '
-
-
-';
-
- $template->append('head_elements', $head_element);
+ set_fckeditor_instance($areas, $toolbar, $width, $height);
}
return $plugin_menu_links;
@@ -123,3 +86,10 @@
}
+function add_remove_button_banner($content, &$smarty)
+{
+ $pattern = '#()#ims';
+ $replacement = '$1FCK Editor On/Off';
+ return preg_replace($pattern, $replacement, $content);
+}
+
?>
Index: /extensions/FCKEditor/fckeditor.tpl
===================================================================
--- /extensions/FCKEditor/fckeditor.tpl (revision 4630)
+++ /extensions/FCKEditor/fckeditor.tpl (revision 4630)
@@ -0,0 +1,42 @@
+{known_script id="ckeditor" src=$FCK_PATH|@cat:"ckeditor/ckeditor.js"}
+{html_head}
+
+
+
+{/html_head}
Index: /extensions/FCKEditor/main.inc.php
===================================================================
--- /extensions/FCKEditor/main.inc.php (revision 4629)
+++ /extensions/FCKEditor/main.inc.php (revision 4630)
@@ -17,3 +17,29 @@
include(FCK_PATH.'fckeditor.php');
}
+
+function set_fckeditor_instance($areas=array(), $toolbar='Basic', $width='750px', $height='200px')
+{
+ global $template, $conf;
+
+ if (is_string($areas))
+ {
+ $areas = array($areas);
+ }
+ if (!($config = unserialize($conf['FCKEditor'])))
+ {
+ $config = array();
+ }
+ $template->set_filename('fckeditor', realpath(FCK_PATH.'fckeditor.tpl'));
+ $template->assign(
+ array(
+ 'FCK_PATH' => FCK_PATH,
+ 'FCK_config' => $config,
+ 'FCK_areas' => $areas,
+ 'FCK_WIDTH' => $width,
+ 'FCK_HEIGHT' => $height,
+ 'FCK_TOOLBAR' => $toolbar,
+ )
+ );
+ $template->parse('fckeditor');
+}
?>