コード例 #1
0
ファイル: config.php プロジェクト: sangkasi/joomla
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $params = $jce->getPluginParams('spellchecker');
     $vars['spellchecker_languages'] = '+' . $jce->getParam($params, 'spellchecker_languages', 'English=en', '');
     $vars['spellchecker_engine'] = $jce->getParam($params, 'spellchecker_engine', 'googlespell', 'googlespell');
 }
コード例 #2
0
ファイル: plugin.php プロジェクト: rlee1962/diylegalcenter
 /**
  * Constructor activating the default information of the class
  *
  * @access  protected
  */
 function __construct()
 {
     // Call parent
     parent::__construct();
     $db =& JFactory::getDBO();
     $plugin = JRequest::getVar('plugin');
     if ($plugin) {
         $query = "SELECT id" . " FROM #__jce_plugins" . " WHERE name = '" . $plugin . "'";
         $db->setQuery($query);
         $id = $db->loadResult();
         $this->plugin = new JObject();
         $this->plugin->name = $plugin;
         $this->plugin->id = $id;
         $this->plugin->params = $this->getPluginParams();
         $this->plugin->type = JRequest::getVar('type', 'standard');
         define('JCE_PLUGIN', JCE_PLUGINS . DS . $plugin);
     } else {
         die(JError::raiseError(403, JText::_('Access Forbidden')));
     }
     // Set javascript file array
     $this->script(array('tiny_mce_popup'), 'tiny_mce');
     $this->script(array('mootools', 'tiny_mce_utils', 'jce', 'plugin', 'window'), 'libraries');
     $this->css(array('plugin'));
     $this->css(array('window', 'dialog'), 'skins');
 }
コード例 #3
0
ファイル: config.php プロジェクト: rlee1962/diylegalcenter
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $params = $jce->getPluginParams('spellchecker');
     $vars['spellchecker_languages'] = '+' . $jce->getParam($params, 'spellchecker_languages', 'English=en', '');
     $vars['spellchecker_engine'] = $jce->getParam($params, 'spellchecker_engine', 'googlespell', 'googlespell');
     $vars['spellchecker_rpc_url'] = JURI::base(true) . '/index.php?option=com_jce&task=plugin&plugin=spellchecker&file=rpc&cid=' . $vars['component_id'];
 }
コード例 #4
0
ファイル: config.php プロジェクト: eliasrosa/eJoomla
 function getConfig(&$vars)
 {
     $document =& JFactory::getDocument();
     $jce =& JContentEditor::getInstance();
     $toggle = $jce->getSharedParam('advcode', 'toggle', '1');
     $state = $jce->getSharedParam('advcode', 'editor_state', '1');
     $text = htmlspecialchars($jce->getSharedParam('advcode', 'toggle_text', '[show/hide]'));
     $document->addScript(JURI::root(true) . '/plugins/editors/jce/tiny_mce/plugins/advcode/js/toggle.js?version=' . $jce->getVersion());
     $vars['onpageload'] = "function(){AdvCode.init('" . $text . "', " . $state . ", " . $toggle . ");}";
 }
コード例 #5
0
ファイル: config.php プロジェクト: eliasrosa/eJoomla
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $params = $jce->getPluginParams('paste');
     $vars['paste_keep_linebreaks'] = $jce->getParam($params, 'paste_keep_linebreaks', '1', '1');
     $vars['paste_auto_cleanup_on_paste'] = $jce->getParam($params, 'paste_auto_cleanup_on_paste', '1', '1');
     $vars['paste_remove_styles'] = $jce->getParam($params, 'paste_remove_styles', '0', '0');
     $vars['paste_strip_class_attributes'] = $jce->getParam($params, 'paste_strip_class_attributes', 'all', 'all');
     $vars['paste_strip_class_attributes'] = $jce->getParam($params, 'paste_retain_style_properties', '', '');
     $vars['paste_remove_spans'] = $jce->getParam($params, 'paste_remove_spans', '1', '1');
 }
コード例 #6
0
ファイル: config.php プロジェクト: sangkasi/joomla
 function getStyleSheet()
 {
     jimport('joomla.filesystem.file');
     $jce =& JContentEditor::getInstance();
     $params = $jce->getEditorParams();
     // Template CSS
     $path = JPATH_SITE . DS . 'templates' . DS . $jce->getSiteTemplate() . DS . 'css';
     $url = "/templates/" . $jce->getSiteTemplate() . "/css";
     $stylesheet = '';
     // Joomla! 1.5 standard
     $file = 'template.css';
     // Check for template.css
     if (!JFile::exists($path . DS . $file)) {
         // check for legacy template_css.css
         if (JFile::exists($path . DS . 'template_css.css')) {
             $file = 'template_css.css';
         }
     }
     // Custom template css URL
     if (intval($params->get('editor_content_css', 1)) == 0) {
         $custom = $params->get('editor_content_css_custom', '');
         if ($custom) {
             // Replace $template variable with site template name
             $custom = str_replace('$template', $jce->getSiteTemplate(), $custom);
             // Show error if file does not exist and use default
             if (!JFile::exists(JPATH_SITE . DS . $custom)) {
                 JError::raiseNotice('SOME_ERROR_CODE', sprintf(JText::_('CUSTOMCSSFILENOTPRESENT'), $custom));
             } else {
                 $stylesheet = JURI::root(true) . '/' . $custom;
             }
         }
     } else {
         if (!JFile::exists($path . DS . $file)) {
             // display error
             JError::raiseNotice('SOME_ERROR_CODE', sprintf(JText::_('TEMPLATECSSFILENOTPRESENT'), $file));
         } else {
             $stylesheet = JURI::root(true) . $url . '/' . $file;
         }
     }
     // default to template.css or template_css.css or system editor.css
     if (!$stylesheet) {
         if (!JFile::exists($path . DS . $file)) {
             $file = '/templates/system/css/editor.css';
             $stylesheet = JURI::root(true) . '/templates/system/css/editor.css';
         } else {
             $file = $url . '/' . $file;
         }
         $stylesheet = JURI::root(true) . $file;
         JError::raiseNotice('SOME_ERROR_CODE', sprintf(JText::_('CSSFILEDEFAULT'), $file));
     }
     return $stylesheet;
 }
コード例 #7
0
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $params = $jce->getPluginParams('paste');
     $vars['paste_dialog_width'] = $jce->getParam($params, 'paste_dialog_width', '450', '450');
     $vars['paste_dialog_height'] = $jce->getParam($params, 'paste_dialog_height', '400', '400');
     $vars['paste_remove_empty_paragraphs'] = $jce->getParam($params, 'paste_remove_empty_paragraphs', '1', '1');
     $vars['paste_auto_cleanup_on_paste'] = $jce->getParam($params, 'paste_auto_cleanup_on_paste', '1', '1');
     $vars['paste_remove_styles'] = $jce->getParam($params, 'paste_remove_styles', '0', '0');
     $vars['paste_strip_class_attributes'] = $jce->getParam($params, 'paste_strip_class_attributes', 'all', 'all');
     $vars['paste_strip_class_attributes'] = $jce->getParam($params, 'paste_retain_style_properties', '', '');
     $vars['paste_remove_spans'] = $jce->getParam($params, 'paste_remove_spans', '1', '1');
     $vars['paste_remove_styles_if_webkit'] = $jce->getParam($params, 'paste_remove_styles_if_webkit', '0', '0');
 }
コード例 #8
0
ファイル: config.php プロジェクト: sangkasi/joomla
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     if (!in_array('cleanup', $vars['plugins'])) {
         $vars['plugins'][] = 'cleanup';
     }
     $vars['cleanup_pluginmode'] = $jce->getEditorParam('cleanup_pluginmode', 0, 0);
     $vars['verify_html'] = $jce->getEditorParam('editor_verify_html', 0, 1);
     $vars['event_elements'] = $jce->getEditorParam('editor_event_elements', 'a,img', 'a,img');
     // Tables & Lists
     $vars['table_inline_editing'] = 1;
     $vars['fix_list_elements'] = 1;
     $vars['fix_table_elements'] = 1;
 }
コード例 #9
0
 function getConfig(&$vars)
 {
     // Get JContentEditor instance
     $jce =& JContentEditor::getInstance();
     $vars['code_php'] = $jce->getSharedParam('code', 'allow_php', '0');
     $vars['code_javascript'] = $jce->getSharedParam('code', 'allow_javascript', '0');
     $vars['code_css'] = $jce->getSharedParam('code', 'allow_css', '0');
     // Invalid Elements
     if ($vars['code_javascript'] == 1) {
         $jce->removeKeys($vars['invalid_elements'], 'script');
     }
     if ($vars['code_css'] == 1) {
         $jce->removeKeys($vars['invalid_elements'], 'style');
     }
 }
コード例 #10
0
ファイル: config.php プロジェクト: rlee1962/diylegalcenter
 function getConfig(&$vars)
 {
     $document =& JFactory::getDocument();
     $jce =& JContentEditor::getInstance();
     $toggle = $jce->getEditorParam('editor_toggle', 1);
     $state = $jce->getEditorParam('editor_state', 1);
     $text = htmlspecialchars($jce->getEditorParam('editor_toggle_text', '[show/hide]'));
     // legacy issue?
     if ($state == 1 || strpos($state, 'mceEditor') !== false) {
         $state = 1;
     } else {
         $state = 0;
     }
     $document->addScript(JURI::root(true) . '/plugins/editors/jce/tiny_mce/plugins/advcode/js/toggle.js?version=' . $jce->getVersion());
     $vars['onpageload'] = "function(){AdvCode.init('" . $text . "', " . $state . ", " . $toggle . ");}";
 }
コード例 #11
0
ファイル: config.php プロジェクト: rlee1962/diylegalcenter
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $params = $jce->getPluginParams('paste');
     $vars['paste_dialog_width'] = $jce->getParam($params, 'paste_dialog_width', 450, 450);
     $vars['paste_dialog_height'] = $jce->getParam($params, 'paste_dialog_height', 400, 400);
     $vars['paste_keep_linebreaks'] = $jce->getParam($params, 'paste_keep_linebreaks', 1, 1);
     $vars['paste_use_dialog'] = $jce->getParam($params, 'paste_use_dialog', 0, 0);
     $vars['paste_remove_styles'] = $jce->getParam($params, 'paste_remove_styles', 0, 0);
     $vars['paste_strip_class_attributes'] = $jce->getParam($params, 'paste_strip_class_attributes', 'all', 'all');
     $vars['paste_retain_style_properties'] = $jce->getParam($params, 'paste_retain_style_properties', '', '');
     $vars['paste_remove_empty_paragraphs'] = $jce->getParam($params, 'paste_remove_empty_paragraphs', 1, 1);
     $vars['paste_remove_spans'] = $jce->getParam($params, 'paste_remove_spans', 0, 0);
     $vars['paste_text'] = $jce->getParam($params, 'paste_text', 1, 1);
     $vars['paste_html'] = $jce->getParam($params, 'paste_html', 1, 1);
 }
コード例 #12
0
ファイル: config.php プロジェクト: eliasrosa/eJoomla
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $params = $jce->getPluginParams('media');
     if ($params->get('media_use_script', '0') == '1') {
         $vars['media_use_script'] = '1';
         $vars['code_javascript'] = '1';
         $jce->removeKeys($vars['invalid_elements'], array('script'));
     } else {
         $jce->removeKeys($vars['invalid_elements'], array('object', 'param', 'embed'));
     }
     $vars['media_version_flash'] = $jce->getParam($params, 'media_version_flash', '9,0,124,0', '9,0,124,0');
     $vars['media_version_shockwave'] = $jce->getParam($params, 'media_version_shockwave', '11,0,0,458', '11,0,0,458');
     $vars['media_version_windowsmedia'] = $jce->getParam($params, 'media_version_windowsmedia', '5,1,52,701', '5,1,52,701');
     $vars['media_version_quicktime'] = $jce->getParam($params, 'media_version_quicktime', '6,0,2,0', '6,0,2,0');
     $vars['media_version_reallpayer'] = $jce->getParam($params, 'media_version_reallpayer', '7,0,0,0', '7,0,0,0');
 }
コード例 #13
0
ファイル: config.php プロジェクト: rlee1962/diylegalcenter
 function getStyleSheet()
 {
     jimport('joomla.filesystem.file');
     $jce =& JContentEditor::getInstance();
     $params = $jce->getEditorParams();
     // Template CSS
     $path = JPATH_SITE . DS . 'templates' . DS . $jce->getSiteTemplate() . DS . 'css';
     $url = "/templates/" . $jce->getSiteTemplate() . "/css";
     $stylesheet = '';
     // Joomla! 1.5 standard
     $file = 'template.css';
     if (is_dir($path)) {
         $css = JFolder::files($path, '(core|template|template_css)\\.css$');
         foreach ($css as $item) {
             if (JFile::exists($path . DS . $item)) {
                 $file = $item;
                 // look for php equivalent eg: template.css.php
                 if (JFile::exists($path . DS . $item . '.php')) {
                     $file = $item . '.php';
                 }
             }
         }
     }
     $content_css = intval($params->get('editor_content_css', 1));
     // use template stylesheet
     if ($content_css) {
         if (JFile::exists($path . DS . $file)) {
             $stylesheet = JURI::root(true) . $url . '/' . basename($file);
         }
         // Custom template css URL
     } else {
         $custom = $params->get('editor_content_css_custom', '');
         if ($custom) {
             // Replace $template variable with site template name
             $custom = str_replace('$template', $jce->getSiteTemplate(), $custom);
             // Show error if file does not exist and use default
             if (JFile::exists(JPATH_SITE . DS . $custom)) {
                 $stylesheet = JURI::root(true) . '/' . $custom;
             }
         }
     }
     return $stylesheet;
 }
コード例 #14
0
ファイル: editor.php プロジェクト: rlee1962/diylegalcenter
 /**
  * Load Plugin files
  */
 function load()
 {
     $task = JRequest::getCmd('task');
     if ($task) {
         switch ($task) {
             case 'pack':
                 require_once JCE_CLASSES . DS . 'editor.php';
                 $jce =& JContentEditor::getInstance();
                 $jce->pack();
                 break;
             case 'plugin':
                 $plugin = JRequest::getVar('plugin');
                 if ($this->checkPlugin($plugin)) {
                     $file = basename(JRequest::getVar('file'));
                     $path = JCE_PLUGINS . DS . $plugin;
                     if (is_dir($path) && file_exists($path . DS . $file . '.php')) {
                         require_once $path . DS . $file . '.php';
                     } else {
                         JError::raiseError(500, JText::_('File ' . $file . ' not found!'));
                     }
                 } else {
                     JError::raiseError(500, JText::_('Plugin not found!'));
                 }
                 exit;
                 break;
             case 'help':
                 $plugin = JRequest::getVar('plugin');
                 if ($this->checkPlugin($plugin)) {
                     jimport('joomla.application.component.view');
                     $help = new JView($config = array('base_path' => JCE_LIBRARIES, 'layout' => 'help'));
                     $help->display();
                 } else {
                     JError::raiseError(500, JText::_('Plugin not found!'));
                 }
                 exit;
                 break;
         }
     } else {
         JError::raiseError(500, JText::_('No Task'));
         exit;
     }
 }
コード例 #15
0
ファイル: plugin.php プロジェクト: sangkasi/joomla
 /**
  * Constructor activating the default information of the class
  *
  * @access	protected
  */
 function __construct()
 {
     // Call parent
     parent::__construct();
     $db =& JFactory::getDBO();
     $plugin = JRequest::getVar('plugin');
     if ($plugin) {
         $query = "SELECT id" . " FROM #__jce_plugins" . " WHERE name = '" . $plugin . "'";
         $db->setQuery($query);
         $id = $db->loadResult();
         $this->plugin = new JObject();
         $this->plugin->name = $plugin;
         $this->plugin->id = $id;
         $this->plugin->params = $this->getPluginParams();
         $this->plugin->type = JRequest::getVar('type', 'standard');
         define('JCE_PLUGIN', JCE_PLUGINS . DS . $plugin);
     } else {
         die(JError::raiseError(403, JText::_('Access Forbidden')));
     }
 }
コード例 #16
0
ファイル: config.php プロジェクト: sangkasi/joomla
 function getConfig(&$vars)
 {
     // Get JContentEditor instance
     $jce =& JContentEditor::getInstance();
     $params = $jce->getPluginParams('code');
     if (!in_array('code', $vars['plugins'])) {
         $vars['plugins'][] = 'code';
     }
     $vars['code_php'] = $jce->getParam($params, 'code_allow_php', 0);
     $vars['code_javascript'] = $jce->getParam($params, 'code_allow_javascript', 0);
     $vars['code_css'] = $jce->getParam($params, 'code_allow_css', 0);
     $vars['code_cdata'] = $jce->getParam($params, 'code_cdata', 0);
     // Invalid Elements
     if ($vars['code_javascript'] == 1) {
         $jce->removeKeys($vars['invalid_elements'], 'script');
     }
     if ($vars['code_css'] == 1) {
         $jce->removeKeys($vars['invalid_elements'], 'style');
     }
 }
コード例 #17
0
ファイル: config.php プロジェクト: rlee1962/diylegalcenter
 function getConfig(&$vars)
 {
     // Get JContentEditor instance
     $jce =& JContentEditor::getInstance();
     $params = $jce->getPluginParams('fullpage');
     $doctypes = array('XHTML 1.0 Transitional' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', 'XHTML 1.0 Frameset' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">', 'XHTML 1.0 Strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', 'XHTML 1.1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', 'HTML 4.01 Transitional' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">', 'HTML 4.01 Strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', 'HTML 4.01 Frameset' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">', 'HTML 5' => '<!DOCTYPE HTML>');
     $doctype = $jce->getParam($params, 'fullpage_default_doctype', 'HTML 4.01 Transitional', 'HTML 4.01 Transitional');
     $default_fonts = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
     $fonts = $jce->getEditorFonts($jce->getEditorParam('editor_theme_advanced_fonts_add', ''), $jce->getEditorParam('editor_theme_advanced_fonts_remove', ''));
     $vars['fullpage_fonts'] = $fonts == $default_fonts ? '' : $fonts;
     $vars['fullpage_fontsizes'] = $jce->getParam($params, 'editor_theme_advanced_font_sizes', '8pt,10pt,12pt,14pt,18pt,24pt,36pt', '10px,11px,12px,13px,14px,15px,16px');
     if ($doctype) {
         $vars['fullpage_default_doctype'] = '"' . addslashes($doctypes[$doctype]) . '"';
     }
     $vars['fullpage_hide_in_source_view'] = $jce->getParam($params, 'fullpage_hide_in_source_view', 0, 0);
     $vars['fullpage_default_encoding'] = $params->get('fullpage_default_encoding');
     $vars['fullpage_default_xml_pi'] = $jce->getParam($params, 'fullpage_default_xml_pi', 0, 0);
     $vars['fullpage_default_font_family'] = $params->get('fullpage_default_font_family');
     $vars['fullpage_default_title'] = $jce->getParam($params, 'fullpage_default_title', 'Untitled Document', 'Untitled Document');
     $vars['fullpage_default_font_size'] = $params->get('fullpage_default_font_size');
     $vars['fullpage_default_text_color'] = $params->get('fullpage_default_text_color');
 }
コード例 #18
0
ファイル: config.php プロジェクト: rlee1962/diylegalcenter
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     if (!in_array('cleanup', $vars['plugins'])) {
         $vars['plugins'][] = 'cleanup';
     }
     $vars['cleanup_pluginmode'] = $jce->getEditorParam('cleanup_pluginmode', 0, 0);
     $vars['verify_html'] = $jce->getEditorParam('editor_verify_html', 0, 1);
     $vars['event_elements'] = $jce->getEditorParam('editor_event_elements', 'a,img', 'a,img');
     // Tables & Lists
     $vars['table_inline_editing'] = 1;
     $vars['fix_list_elements'] = 1;
     $vars['fix_table_elements'] = 1;
     $iframes = $jce->getEditorParam('editor_allow_iframes', 0, 0);
     $applet = $jce->getEditorParam('editor_allow_applet', 0, 0);
     // Invalid Elements
     if ($iframes == 1) {
         $jce->removeKeys($vars['invalid_elements'], 'iframe');
     }
     if ($applet == 1) {
         $jce->removeKeys($vars['invalid_elements'], 'applet');
     }
 }
コード例 #19
0
ファイル: jce.php プロジェクト: rlee1962/diylegalcenter
 /**
  * Method to handle the onInit event.
  *  - Initializes the JCE WYSIWYG Editor
  *
  * @access public
  * @return string JavaScript Initialization string
  * @since 1.5
  */
 function onInit()
 {
     global $mainframe;
     // might be loaded twice?
     if (defined('JCE_LOADED')) {
         return;
     }
     JPlugin::loadLanguage('plg_editors_jce', JPATH_ADMINISTRATOR);
     // Check for existence of Admin Component
     if (!is_dir(JPATH_SITE . DS . 'components' . DS . 'com_jce') || !is_dir(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_jce')) {
         JError::raiseWarning('404', 'COMPONENTNOTINSTALLED');
     }
     // Load base Editor class
     require_once dirname(__FILE__) . DS . 'jce' . DS . 'libraries' . DS . 'classes' . DS . 'editor.php';
     // Create instance
     $jce =& JContentEditor::getInstance();
     $jce->addPlugins(array('advlist', 'autolink', 'code', 'cleanup', 'format', 'lists', 'tabfocus', 'wordcount'));
     $document =& JFactory::getDocument();
     $params = $jce->getEditorParams();
     $option = $jce->getComponentOption();
     $component =& JComponentHelper::getComponent($option);
     $version = $jce->getVersion();
     // create token
     $token = JCEToken::getToken();
     // get component version
     $adminXML = JApplicationHelper::parseXMLInstallFile(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_jce' . DS . 'jce.xml');
     $gzip = 0;
     // Use packer if supported
     if ($jce->getParam($params, 'editor_gzip', 0) && version_compare($adminXML['version'], '1.5.7.8', '>=')) {
         $document->addScript(JURI::base(true) . '/index.php?option=com_jce&task=pack&version=' . $version . '&' . $token . '=1&cid=' . $component->id);
         $gzip = 1;
     } else {
         $document->addScript(JURI::root(true) . '/plugins/editors/jce/tiny_mce/tiny_mce.js?version=' . $version . '&cid=' . $component->id);
         // Utility functions for saving
         $document->addScript(JURI::root(true) . '/plugins/editors/jce/libraries/js/editor.js?version=' . $version);
     }
     // Set parameter array
     $vars = array();
     //Languages
     $vars['language'] = $jce->getLanguage();
     $vars['directionality'] = $jce->getLanguageDir();
     $settings = '';
     // Defaults
     $vars['theme'] = 'none';
     $vars['invalid_elements'] = 'applet,iframe,object,embed,script,style';
     $vars['plugins'] = '';
     if ($jce->checkUser()) {
         $vars['theme'] = 'advanced';
         // Url
         $vars['document_base_url'] = JURI::root();
         $vars['site_url'] = JURI::base(true) . '/';
         // Component ID (required for non-popup plugins)
         $vars['component_id'] = $component->id;
         // Theme
         $vars['theme_advanced_toolbar_location'] = $jce->getParam($params, 'editor_theme_advanced_toolbar_location', 'top', 'bottom');
         $vars['theme_advanced_toolbar_align'] = $jce->getParam($params, 'editor_theme_advanced_toolbar_align', 'left', 'center');
         $vars['theme_advanced_path'] = '1';
         $vars['theme_advanced_statusbar_location'] = $jce->getParam($params, 'editor_theme_advanced_statusbar_location', 'bottom', 'none');
         $vars['theme_advanced_resizing'] = $jce->getParam($params, 'editor_theme_advanced_resizing', '1', '0');
         $vars['theme_advanced_resize_horizontal'] = $jce->getParam($params, 'editor_theme_advanced_resize_horizontal', '1', '0');
         $vars['theme_advanced_resizing_use_cookie'] = $jce->getParam($params, 'editor_theme_advanced_resizing_use_cookie', '1', '0');
         $vars['theme_advanced_disable'] = $jce->getRemovePlugins();
         // Defaults
         $vars['theme_advanced_buttons1'] = '';
         $vars['theme_advanced_buttons2'] = '';
         $vars['theme_advanced_buttons3'] = '';
         // Editor Dimensions
         $vars['width'] = $jce->getParam($params, 'editor_width', '');
         $vars['height'] = $jce->getParam($params, 'editor_height', '');
         // Get Extended elements
         $vars['extended_valid_elements'] = $jce->getParam($params, 'editor_extended_elements', '', '');
         // Configuration list of invalid elements as array
         $vars['invalid_elements'] = explode(',', $jce->getParam($params, 'editor_invalid_elements', 'applet', ''));
         // Add elements to invalid list (removed by plugin)
         $jce->addKeys($vars['invalid_elements'], array('iframe', 'object', 'param', 'embed', 'script', 'style'));
         // 'Look & Feel'
         $vars['skin'] = $jce->getParam($params, 'editor_skin', 'default', 'default');
         $vars['skin_variant'] = $jce->getParam($params, 'editor_skin_variant', 'default', 'default');
         $vars['inlinepopups_skin'] = $jce->getParam($params, 'editor_inlinepopups_skin', 'clearlooks2');
         $vars['body_class'] = $jce->getParam($params, 'editor_body_class_type', 'custom') == 'contrast' ? 'mceForceColors' : $jce->getParam($params, 'editor_body_class_custom', '');
         $vars['urlconverter_callback'] = 'JContentEditor.convertURL';
         //Other - user specified
         $userParams = $params->get('editor_custom_config', '');
         $baseParams = array('mode', 'cleanup_callback', 'save_callback', 'file_browser_callback', 'urlconverter_callback', 'onpageload', 'oninit', 'editor_selector');
         if ($userParams) {
             $userParams = explode(';', $userParams);
             foreach ($userParams as $userParam) {
                 $keys = explode(':', $userParam);
                 if (!in_array(trim($keys[0]), $baseParams)) {
                     $vars[trim($keys[0])] = count($keys) > 1 ? trim($keys[1]) : '';
                 }
             }
         }
         $callbackFile = $params->get('editor_callback_file', '');
         // Plugins
         $vars['plugins'] = $jce->getPlugins();
         $paste = in_array('paste', $vars['plugins']);
         // Get rows
         $rows = $jce->getRows();
         $rows = implode(';', $rows);
         // paste plugin not loaded
         if (!$paste) {
             if (strpos($rows, 'cut,copy,paste') !== false) {
                 $jce->addKeys($vars['plugins'], array('paste'));
             }
         } else {
             // remove old icons
             $rows = preg_replace('/pasteword,pastetext(,?)/', '', $rows);
         }
         $rows = explode(';', $rows);
         for ($i = 0; $i < count($rows); $i++) {
             $n = $i + 1;
             $vars['theme_advanced_buttons' . $n] = $rows[$i];
         }
         // remove plugins
         $jce->removeKeys($vars['plugins'], array('safari'));
         // Get all optional plugin configuration options
         $jce->getPluginConfig($vars);
     }
     $i = 1;
     foreach ($vars as $k => $v) {
         // If the value is an array, implode!
         if (is_array($v)) {
             $v = implode(',', $v);
             if ($v[0] == ',') {
                 $v = substr($v, 1);
             }
         }
         // Value must be set
         if ($v !== '') {
             // objects or arrays or functions or regular expression
             if (preg_match('/(\\[[^\\]*]\\]|\\{[^\\}]*\\}|function\\([^\\}]*\\}|^#(.*)#$)/', $v)) {
                 // replace hash delimiters with / for javascript regular expression
                 $v = preg_replace('@^#(.*)#$@', '/$1/', $v);
             } else {
                 if (!is_numeric($v)) {
                     $v = preg_match('/[\'"]+[^\'"]+[\'"]+/', $v) ? $v : '"' . $v . '"';
                 } else {
                     if ($v == '1' || $v == '0') {
                         $v = intval($v) ? 'true' : 'false';
                     }
                 }
             }
             $settings .= "\t\t\t" . $k . ": " . $v . "";
             if ($i < count($vars)) {
                 $settings .= ",\n";
             }
         }
         if (preg_match('/theme_advanced_buttons([1-3])/', $k) && $v == '') {
             $settings .= "\t\t\t" . $k . ": \"\"";
             if ($i < count($vars)) {
                 $settings .= ",\n";
             }
         }
         $i++;
     }
     $init = "\r\r\n        JContentEditor.init({\n";
     $init .= preg_replace('/,?\\n?$/', '', $settings) . "\r\r\n\t\t}, " . $gzip . ");";
     $document->addScriptDeclaration($init);
     if ($params->get('editor_callback_file')) {
         $document->addScript(JURI::root(true) . '/' . $callbackFile);
     }
     define('JCE_LOADED', 1);
 }
コード例 #20
0
ファイル: config.php プロジェクト: sangkasi/joomla
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $vars['plugin_preview_width'] = $jce->getEditorParam('editor_preview_width', '750', '550');
     $vars['plugin_preview_height'] = $jce->getEditorParam('editor_preview_height', '550', '600');
 }
コード例 #21
0
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $vars['cleanup_pluginmode'] = $jce->getEditorParam('cleanup_pluginmode', 0, 0);
     $vars['cleanup_keep_nbsp'] = $jce->getEditorParam('cleanup_keep_nbsp', 1, 1);
 }
コード例 #22
0
ファイル: jce.php プロジェクト: sangkasi/joomla
 /**
  * Method to handle the onInit event.
  *  - Initializes the JCE WYSIWYG Editor
  *
  * @access public
  * @return string JavaScript Initialization string
  * @since 1.5
  */
 function onInit()
 {
     global $mainframe;
     // Editor gets loaded twice in Legacy mode???
     if (JPluginHelper::isEnabled('system', 'legacy')) {
         if (defined('_JCE_ISLOADED')) {
             return false;
         }
         define('_JCE_ISLOADED', 1);
     }
     JPlugin::loadLanguage('plg_editors_jce', JPATH_ADMINISTRATOR);
     // Check for existence of Admin Component
     if (!is_dir(JPATH_SITE . DS . 'components' . DS . 'com_jce') || !is_dir(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_jce')) {
         JError::raiseWarning('404', 'COMPONENTNOTINSTALLED');
     }
     // Load base Editor class
     require_once dirname(__FILE__) . DS . 'jce' . DS . 'libraries' . DS . 'classes' . DS . 'editor.php';
     // Create instance
     $jce =& JContentEditor::getInstance();
     $jce->addPlugins(array('advlist', 'code', 'cleanup', 'format', 'tabfocus', 'wordcount'));
     $document =& JFactory::getDocument();
     $params = $jce->getEditorParams();
     $gzip = $jce->getParam($params, 'editor_gzip', '0', '0') ? '_gzip' : '';
     $option = JRequest::getVar('option');
     $component =& JComponentHelper::getComponent($option);
     $version = $jce->getVersion();
     // TinyMCE url must be absolute!
     $document->addScript(JURI::root() . 'plugins/editors/jce/tiny_mce/tiny_mce' . $gzip . '.js?version=' . $version . '&cid=' . $component->id);
     // Utility functions for saving
     $document->addScript(JURI::root(true) . '/plugins/editors/jce/libraries/js/editor.js?version=' . $version);
     // Set parameter array
     $vars = array();
     //$vars['doctype'] 								= '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">';
     $vars['mode'] = 'textareas';
     $vars['editor_selector'] = 'mceEditor';
     //Languages
     $vars['language'] = $jce->getLanguage();
     $vars['directionality'] = $jce->getLanguageDir();
     $settings = '';
     // Defaults
     $vars['theme'] = 'none';
     $vars['invalid_elements'] = 'applet,iframe,object,embed,script,style';
     $vars['plugins'] = '';
     if ($jce->checkUser()) {
         $vars['theme'] = 'advanced';
         // Url
         $vars['document_base_url'] = JURI::root();
         $vars['site_url'] = JURI::base(true) . '/';
         // Component ID (required for non-popup plugins)
         $vars['component_id'] = $component->id;
         // Theme
         $vars['theme_advanced_toolbar_location'] = $jce->getParam($params, 'editor_theme_advanced_toolbar_location', 'top', 'bottom');
         $vars['theme_advanced_toolbar_align'] = $jce->getParam($params, 'editor_theme_advanced_toolbar_align', 'left', 'center');
         $vars['theme_advanced_path'] = '1';
         $vars['theme_advanced_statusbar_location'] = $jce->getParam($params, 'editor_theme_advanced_statusbar_location', 'bottom', 'none');
         $vars['theme_advanced_resizing'] = $jce->getParam($params, 'editor_theme_advanced_resizing', '1', '0');
         $vars['theme_advanced_resize_horizontal'] = $jce->getParam($params, 'editor_theme_advanced_resize_horizontal', '1', '0');
         $vars['theme_advanced_resizing_use_cookie'] = $jce->getParam($params, 'editor_theme_advanced_resizing_use_cookie', '1', '0');
         $vars['theme_advanced_disable'] = $jce->getRemovePlugins();
         // Defaults
         $vars['theme_advanced_buttons1'] = '';
         $vars['theme_advanced_buttons2'] = '';
         $vars['theme_advanced_buttons3'] = '';
         // Editor Dimensions
         $vars['width'] = $jce->getParam($params, 'editor_width', '');
         $vars['height'] = $jce->getParam($params, 'editor_height', '');
         // Get Extended elements
         $vars['extended_valid_elements'] = $jce->getParam($params, 'editor_extended_elements', '', '');
         // Configuration list of invalid elements as array
         $vars['invalid_elements'] = explode(',', $jce->getParam($params, 'editor_invalid_elements', 'applet', ''));
         // Add elements to invalid list (removed by plugin)
         $jce->addKeys($vars['invalid_elements'], array('iframe', 'object', 'param', 'embed', 'script', 'style'));
         // 'Look & Feel'
         $vars['skin'] = $jce->getParam($params, 'editor_skin', 'default', 'default');
         $vars['skin_variant'] = $jce->getParam($params, 'editor_skin_variant', 'default', 'default');
         $vars['inlinepopups_skin'] = $jce->getParam($params, 'editor_inlinepopups_skin', 'clearlooks2');
         $vars['body_class'] = $jce->getParam($params, 'editor_body_class_type', 'custom') == 'contrast' ? 'mceForceColors' : $jce->getParam($params, 'editor_body_class_custom', '');
         //Other - user specified
         $userParams = $params->get('editor_custom_config', '');
         $baseParams = array('mode', 'cleanup_callback', 'save_callback', 'file_browser_callback', 'onpageload', 'oninit', 'editor_selector');
         if ($userParams) {
             $userParams = explode(';', $userParams);
             foreach ($userParams as $userParam) {
                 $keys = explode(':', $userParam);
                 if (!in_array(trim($keys[0]), $baseParams)) {
                     $vars[trim($keys[0])] = count($keys) > 1 ? trim($keys[1]) : '';
                 }
             }
         }
         $callbackFile = $params->get('editor_callback_file', '');
         $legacy_paste = false;
         // Plugins
         $vars['plugins'] = $jce->getPlugins();
         $paste = in_array('paste', $vars['plugins']);
         // Get rows
         $rows = $jce->getRows();
         for ($i = 1; $i <= count($rows); $i++) {
             $row = $rows[$i];
             if (strpos($row, 'cut,copy,paste') !== false) {
                 if (!$paste) {
                     $vars['plugins'][] = 'paste';
                 }
             } else {
                 if ($paste) {
                     $row = preg_replace('/pasteword,pastetext/', 'cut,copy,paste', $row);
                 }
             }
             $row = preg_replace('/pasteword,pastetext(,?)/', '', $row);
             $vars['theme_advanced_buttons' . $i] = $row;
         }
         // legacy paste plugin fix
         if ($legacy_paste && !in_array('paste', $vars['plugins'])) {
             $vars['plugins'][] = 'paste';
         }
         // remove plugins
         $jce->removeKeys($vars['plugins'], array('safari'));
         // Get all optional plugin configuration options
         $jce->getPluginConfig($vars);
     }
     $i = 1;
     foreach ($vars as $k => $v) {
         // If the value is an array, implode!
         if (is_array($v)) {
             $v = implode(',', $v);
             if ($v[0] == ',') {
                 $v = substr($v, 1);
             }
         }
         // Value must be set
         if ($v !== '') {
             // objects or arrays or functions or regular expression
             if (preg_match('/(\\[[^\\]*]\\]|\\{[^\\}]*\\}|function\\([^\\}]*\\}|^#(.*)#$)/', $v)) {
                 // replace hash delimiters with / for javascript regular expression
                 $v = preg_replace('@^#(.*)#$@', '/$1/', $v);
             } else {
                 if (!is_numeric($v)) {
                     $v = preg_match('/[\'"]+[^\'"]+[\'"]+/', $v) ? $v : '"' . $v . '"';
                 } else {
                     if ($v == '1' || $v == '0') {
                         $v = intval($v) ? 'true' : 'false';
                     }
                 }
             }
             $settings .= "\t\t\t" . $k . ": " . $v . "";
             if ($i < count($vars)) {
                 $settings .= ",\n";
             }
         }
         if (preg_match('/theme_advanced_buttons([1-3])/', $k) && $v == '') {
             $settings .= "\t\t\t" . $k . ": \"\"";
             if ($i < count($vars)) {
                 $settings .= ",\n";
             }
         }
         $i++;
     }
     $init = "\r\n\t\ttinyMCE.init({\n";
     $init .= preg_replace('/,?\\n?$/', '', $settings) . "\r\n\t\t});";
     if ($gzip) {
         $plugins = is_array($vars['plugins']) ? implode(',', $vars['plugins']) : $vars['plugins'];
         $gz = "\r\n\t\t\ttinyMCE_GZ.init({\r\n\t\t\t\tplugins : '" . $plugins . "',\r\n\t\t\t\tthemes : 'none,advanced',\r\n\t\t\t\tlanguages : '" . $vars['language'] . "',\r\n\t\t\t\tdisk_cache : false\r\n\t\t\t});";
         $document->addScriptDeclaration($gz);
     }
     $document->addScriptDeclaration($init);
     if ($params->get('editor_callback_file')) {
         $document->addScript(JURI::root(true) . '/' . $callbackFile);
     }
 }
コード例 #23
0
ファイル: config.php プロジェクト: eliasrosa/eJoomla
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $vars['cleanup_pluginmode'] = $jce->getSharedParam('cleanup', 'pluginmode', '0');
 }
コード例 #24
0
ファイル: config.php プロジェクト: rlee1962/diylegalcenter
 function getConfig(&$vars)
 {
     $jce =& JContentEditor::getInstance();
     $params = $jce->getPluginParams('article');
     $vars['article_hide_xtd_btns'] = $jce->getParam($params, 'article_hide_xtd_btns', 0, 0);
 }
コード例 #25
0
 /**
  * Get a JCE editor or plugin parameter
  *
  * @param object	The parameter object
  * @param string	The parameter object key
  * @param string	The parameter default value
  * @param string	The parameter default value
  * @access public
  * @return The parameter
  */
 function getParam($params, $key, $p, $t = '')
 {
     $v = JContentEditor::cleanParam($params->get($key, $p));
     return $v == $t ? '' : $v;
 }
コード例 #26
0
 /**
  * Method to handle the onInit event.
  *  - Initializes the JCE WYSIWYG Editor
  *
  * @access public
  * @return string JavaScript Initialization string
  * @since 1.5
  */
 function onInit()
 {
     global $mainframe;
     // Editor gets loaded twice in Legacy mode???
     if (JPluginHelper::isEnabled('system', 'legacy')) {
         if (defined('_JCE_ISLOADED')) {
             return false;
         }
         define('_JCE_ISLOADED', 1);
     }
     // Check for existence of Admin Component
     if (!is_dir(JPATH_SITE . DS . 'components' . DS . 'com_jce') || !is_dir(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_jce')) {
         JError::raiseWarning('404', 'The JCE Administration Component is not installed! The Editor cannot function without it!');
     }
     // Load base Editor class
     require_once dirname(__FILE__) . DS . 'jce' . DS . 'libraries' . DS . 'classes' . DS . 'editor.php';
     // Create instance
     $jce =& JContentEditor::getInstance();
     $jce->addPlugins(array('code', 'cleanup', 'tabfocus'));
     $document =& JFactory::getDocument();
     $params = $jce->getEditorParams();
     $gzip = $jce->getParam($params, 'editor_gzip', '0', '0') ? '_gzip' : '';
     $version = $jce->getVersion();
     $stamp = preg_match('/\\d/', $version) ? '?version=' . $version : '';
     // TinyMCE url must be absolute!
     $document->addScript(JURI::root() . 'plugins/editors/jce/tiny_mce/tiny_mce' . $gzip . '.js' . $stamp);
     // Utility functions for saving
     $document->addScript(JURI::root(true) . '/plugins/editors/jce/libraries/js/editor.js' . $stamp);
     // Set parameter array
     $vars = array();
     $vars['doctype'] = '<!DOCTYPE html PUBLIC \\"-//W3C//DTD XHTML 1.0 Transitional//EN\\" \\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\">';
     $vars['mode'] = 'textareas';
     $vars['editor_selector'] = 'mceEditor';
     //Languages
     $vars['language'] = $jce->getLanguage();
     $vars['directionality'] = $jce->getLanguageDir();
     $settings = '';
     // Defaults
     $vars['theme'] = 'none';
     $vars['invalid_elements'] = 'applet,iframe,object,embed,script,style';
     $vars['plugins'] = '';
     if ($jce->checkUser()) {
         $vars['theme'] = 'advanced';
         // Url
         $vars['document_base_url'] = JURI::root();
         $vars['site_url'] = JURI::base(true) . '/';
         // Theme
         $vars['theme_advanced_toolbar_location'] = $jce->getParam($params, 'editor_theme_advanced_toolbar_location', 'top', 'bottom');
         $vars['theme_advanced_toolbar_align'] = $jce->getParam($params, 'editor_theme_advanced_toolbar_align', 'left', 'center');
         $vars['theme_advanced_path'] = '1';
         $vars['theme_advanced_statusbar_location'] = $jce->getParam($params, 'editor_theme_advanced_statusbar_location', 'bottom', 'none');
         $vars['theme_advanced_resizing'] = $jce->getParam($params, 'editor_theme_advanced_resizing', '1', '0');
         $vars['theme_advanced_resize_horizontal'] = $jce->getParam($params, 'editor_theme_advanced_resize_horizontal', '1', '0');
         $vars['theme_advanced_resizing_use_cookie'] = $jce->getParam($params, 'editor_theme_advanced_resizing_use_cookie', '1', '0');
         $vars['theme_advanced_disable'] = $jce->getRemovePlugins();
         $vars['theme_advanced_blockformats'] = $jce->getParam($params, 'editor_theme_advanced_blockformats', 'p,div,h1,h2,h3,h4,h5,h6,blockquote,dt,dd,code,samp,pre', 'p,address,pre,h1,h2,h3,h4,h5,h6');
         $vars['removeformat_selector'] = '*';
         // Fonts
         $vars['theme_advanced_fonts'] = $jce->getEditorFonts($jce->getParam($params, 'editor_theme_advanced_fonts_add', ''), $jce->getParam($params, 'editor_theme_advanced_fonts_remove', ''));
         $vars['theme_advanced_font_sizes'] = $jce->getParam($params, 'editor_theme_advanced_font_sizes', '8pt,10pt,12pt,14pt,18pt,24pt,36pt');
         // Defaults
         $vars['theme_advanced_buttons1'] = '';
         $vars['theme_advanced_buttons2'] = '';
         $vars['theme_advanced_buttons3'] = '';
         // Cleanup
         $vars['verify_html'] = $jce->getParam($params, 'editor_verify_html', '0', '1');
         $vars['event_elements'] = $jce->getParam($params, 'editor_event_elements', 'a,img', 'a,img');
         // Editor Dimensions
         $vars['width'] = $jce->getParam($params, 'editor_width', '');
         $vars['height'] = $jce->getParam($params, 'editor_height', '');
         // Preview
         $vars['plugin_preview_width'] = $jce->getParam($params, 'preview_width', '750', '550');
         $vars['plugin_preview_height'] = $jce->getParam($params, 'preview_height', '550', '600');
         $vars['custom_colors'] = $jce->getParam($params, 'custom_colors', '', '');
         // Tables & Lists
         $vars['table_inline_editing'] = '1';
         $vars['fix_list_elements'] = '1';
         $vars['fix_table_elements'] = '1';
         // Encoding
         $vars['entity_encoding'] = $jce->getParam($params, 'editor_entity_encoding', 'raw', 'named');
         // Template CSS
         $template_path = JPATH_SITE . DS . 'templates' . DS . $jce->getSiteTemplate() . DS . 'css';
         $template_url = JURI::root(true) . "/templates/" . $jce->getSiteTemplate() . "/css/";
         // Joomla! 1.5 standard
         $template_file = 'template.css';
         // check for legacy template
         if (file_exists($template_path . DS . 'template_css.css')) {
             $template_file = 'template_css.css';
         }
         $vars['content_css'] = $template_url . $template_file;
         //Custom template url
         if ($params->get('editor_content_css', '1') == '0') {
             $custom = $params->get('editor_content_css_custom', '');
             $vars['content_css'] = JURI::root(true) . '/' . str_replace('$template', $jce->getSiteTemplate(), $custom);
         }
         // Get Extended elements
         $vars['extended_valid_elements'] = $jce->getParam($params, 'editor_extended_elements', '', '');
         // Configuration list of invalid elements as array
         $vars['invalid_elements'] = explode(',', $jce->getParam($params, 'editor_invalid_elements', '', ''));
         // Add elements to invalid list (removed by plugin)
         $jce->addKeys($vars['invalid_elements'], array('applet', 'iframe', 'object', 'param', 'embed', 'script', 'style'));
         /* End Plugin functions */
         // Paragraph handling
         $vars['forced_root_block'] = $jce->getParam($params, 'editor_forced_root_block', '0', 'p');
         if ($params->get('editor_newlines', '0') == '1') {
             $vars['force_br_newlines'] = '1';
             $vars['force_p_newlines'] = '0';
         } else {
             $vars['force_br_newlines'] = '0';
             $vars['force_p_newlines'] = '1';
         }
         // 'Look & Feel'
         $vars['skin'] = $jce->getParam($params, 'editor_skin', 'default', 'default');
         $vars['skin_variant'] = $jce->getParam($params, 'editor_skin_variant', 'default', 'default');
         $vars['inlinepopups_skin'] = $jce->getParam($params, 'editor_inlinepopups_skin', 'clearlooks2');
         $vars['body_class'] = $jce->getParam($params, 'editor_body_class_type', 'custom') == 'contrast' ? 'mceForceColors' : $jce->getParam($params, 'editor_body_class_custom', '');
         //Other - user specified
         $userParams = $params->get('editor_custom_config', '');
         $baseParams = array('mode', 'cleanup_callback', 'save_callback', 'file_browser_callback', 'onpageload', 'editor_selector');
         if ($userParams) {
             $userParams = explode(';', $userParams);
             foreach ($userParams as $userParam) {
                 $keys = explode(':', $userParam);
                 if (!in_array(trim($keys[0]), $baseParams)) {
                     $vars[trim($keys[0])] = count($keys) > 1 ? trim($keys[1]) : '';
                 }
             }
         }
         $callbackFile = $params->get('editor_callback_file', '');
         // Relative urls?
         $vars['relative_urls'] = $jce->getParam($params, 'editor_relative_urls', '1', '1');
         if ($vars['relative_urls'] == '0') {
             $vars['remove_script_host'] = '0';
         }
         // Get rows
         $rows = $jce->getRows();
         for ($i = 1; $i <= count($rows); $i++) {
             $vars['theme_advanced_buttons' . $i] = $rows[$i];
         }
         // Add Paste plugin if clipboard loaded. TODO Remove in 1.6
         if ($jce->isLoaded('clipboard') && !$jce->isLoaded('paste')) {
             $jce->addPlugins('paste');
         }
         // Plugins
         $vars['plugins'] = $jce->getPlugins();
         // Get all optional plugin configuration options
         $jce->getPluginConfig($vars);
     }
     $i = 1;
     foreach ($vars as $k => $v) {
         // If the value is an array, implode!
         if (is_array($v)) {
             $v = implode(',', $v);
             if ($v[0] == ',') {
                 $v = substr($v, 1);
             }
         }
         // Value must be set
         if ($v != '') {
             // objects or arrays or functions or regular expression
             if (preg_match('/(\\[[^\\]*]\\]|\\{[^\\}]*\\}|function\\([^\\}]*\\}|^#(.*)#$)/', $v)) {
                 // replace hash delimiters with / for javascript regular expression
                 $v = preg_replace('@^#(.*)#$@', '/$1/', $v);
             } else {
                 if (!is_numeric($v)) {
                     $v = '"' . $v . '"';
                 } else {
                     if ($v == '1' || $v == '0') {
                         $v = intval($v) ? 'true' : 'false';
                     }
                 }
             }
             $settings .= "\t\t\t" . $k . ": " . $v . "";
             if ($i < count($vars)) {
                 $settings .= ",\n";
             }
         }
         if (preg_match('/theme_advanced_buttons([1-3])/', $k) && $v == '') {
             $settings .= "\t\t\t" . $k . ": \"\"";
             if ($i < count($vars)) {
                 $settings .= ",\n";
             }
         }
         $i++;
     }
     $init = "\n\t\ttinyMCE.init({\n";
     $init .= preg_replace('/,?\\n?$/', '', $settings) . "\n\t\t});";
     if ($gzip) {
         $plugins = is_array($vars['plugins']) ? implode(',', $vars['plugins']) : $vars['plugins'];
         $gz = "\n\t\t\ttinyMCE_GZ.init({\n\t\t\t\tplugins : '" . $plugins . "',\n\t\t\t\tthemes : 'none,advanced',\n\t\t\t\tlanguages : '" . $vars['language'] . "',\n\t\t\t\tdisk_cache : false\n\t\t\t});";
         $document->addScriptDeclaration($gz);
     }
     $document->addScriptDeclaration($init);
     if ($params->get('editor_callback_file')) {
         $document->addScript(JURI::root(true) . '/' . $callbackFile);
     }
 }