state->get('params'); $params = $params->toArray(); $saveHistory = $this->state->get('params')->get('save_history', 0); // This checks if the config options have ever been saved. If they haven't they will fall back to the original settings. $editoroptions = isset($params['show_publishing_options']); $input = JFactory::getApplication()->input; if (!$editoroptions): $params['show_publishing_options'] = '1'; $params['show_article_options'] = '1'; $params['show_urls_images_backend'] = '0'; $params['show_urls_images_frontend'] = '0'; endif; // Check if the article uses configuration settings besides global. If so, use them. if (!empty($this->item->attribs['show_publishing_options'])): $params['show_publishing_options'] = $this->item->attribs['show_publishing_options']; endif; if (!empty($this->item->attribs['show_article_options'])): $params['show_article_options'] = $this->item->attribs['show_article_options']; endif; if (!empty($this->item->attribs['show_urls_images_backend'])): $params['show_urls_images_backend'] = $this->item->attribs['show_urls_images_backend']; endif; $assoc = JLanguageAssociations::isEnabled(); JFactory::getDocument()->addScriptDeclaration(" Joomla.submitbutton = function(task) { if (task == 'article.cancel' || document.formvalidator.isValid(document.getElementById('item-form'))) { " . $this->form->getField('articletext')->save() . " Joomla.submitform(task, document.getElementById('item-form')); } } "); ?>