hiddenFieldsets = array(); $this->hiddenFieldsets[0] = 'basic-limited'; $this->configFieldsets = array(); $this->configFieldsets[0] = 'editorConfig'; // Create shortcut to parameters. $params = $this->state->get('params'); $app = JFactory::getApplication(); $input = $app->input; $assoc = JLanguageAssociations::isEnabled(); // This checks if the config options have ever been saved. If they haven't they will fall back to the original settings. $params = json_decode($params); $editoroptions = isset($params->show_publishing_options); if (!$editoroptions) { $params->show_publishing_options = '1'; $params->show_article_options = '1'; $params->show_urls_images_backend = '0'; $params->show_urls_images_frontend = '0'; } // Check if the article uses configuration settings besides global. If so, use them. if (isset($this->item->attribs['show_publishing_options']) && $this->item->attribs['show_publishing_options'] != '') { $params->show_publishing_options = $this->item->attribs['show_publishing_options']; } if (isset($this->item->attribs['show_article_options']) && $this->item->attribs['show_article_options'] != '') { $params->show_article_options = $this->item->attribs['show_article_options']; } if (isset($this->item->attribs['show_urls_images_frontend']) && $this->item->attribs['show_urls_images_frontend'] != '') { $params->show_urls_images_frontend = $this->item->attribs['show_urls_images_frontend']; } if (isset($this->item->attribs['show_urls_images_backend']) && $this->item->attribs['show_urls_images_backend'] != '') { $params->show_urls_images_backend = $this->item->attribs['show_urls_images_backend']; } JFactory::getDocument()->addScriptDeclaration(' Joomla.submitbutton = function(task) { if (task == "article.cancel" || document.formvalidator.isValid(document.getElementById("item-form"))) { ' . $this->form->getField('articletext')->save() . ' if (window.opener && (task == "article.save" || task == "article.cancel")) { window.opener.document.closeEditWindow = self; window.opener.setTimeout("window.document.closeEditWindow.close()", 1000); } Joomla.submitform(task, document.getElementById("item-form")); } }; '); ?>