Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

JoomDoc 4.0.2 - Editor Button Not Showing Fix
(1 viewing) (1) Guest
Support forum for users using free edition of JoomDOC. These forums are mainly for mutual help between users.

NOTE: Due to our capacity limitations, ARTIO does not monitor this forum category regularly. If you want direct support from ARTIO, please start a ticket at Support Dashboard. If you have no support ticket available, you need to purchase it.
  • Page:
  • 1

TOPIC: JoomDoc 4.0.2 - Editor Button Not Showing Fix

JoomDoc 4.0.2 - Editor Button Not Showing Fix 10 years, 5 months ago #44753

The Editor button to insert a JoomDoc document was not showing. I checked the plugin and note that it is missing the
$button->set('class', 'btn');
in the joomdoc.php file (in plugins\editors-xtd\joomdoc).

Adding this line restores the button and it now works.

Pat Ryan
Pat Ryan
The topic has been locked.

Re: JoomDoc 4.0.2 - Editor Button Not Showing Fix 10 years, 5 months ago #44756

  • jitr
  • OFFLINE
  • ARTIO Support
  • Posts: 1432
Hello, thanks for the information. What Joomla version it is?
ARTIO Support Team
The topic has been locked.

Re: JoomDoc 4.0.2 - Editor Button Not Showing Fix 10 years, 5 months ago #44780

I've got Joomla 3.3.0 running.

The revised file is shown below with the edit near the bottom:

<?php
/**
* @version $Id$
* @package Joomla.Administrator
* @subpackage JoomDOC
* @author ARTIO s.r.o., This e-mail address is being protected from spambots. You need JavaScript enabled to view it , http:://www.artio.net
* @copyright Copyright (C) 2011 Artio s.r.o.. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

jimport('joomla.plugin.plugin');
JHtml::_('behavior.modal');
JLoader::register('JoomDOCRoute', JPATH_ROOT . DIRECTORY_SEPARATOR . 'administrator' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_joomdoc' . DIRECTORY_SEPARATOR . 'libraries' . DIRECTORY_SEPARATOR . 'joomdoc' . DIRECTORY_SEPARATOR . 'application' . DIRECTORY_SEPARATOR . 'route.php');
include_once(JPATH_ROOT . DIRECTORY_SEPARATOR . 'administrator' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_joomdoc' . DIRECTORY_SEPARATOR . 'defines.php');

class plgButtonJoomDOC extends JPlugin {
/**
* Constructor
*
* @access protected
* @param object $subject The object to observe
* @param array $config An array that holds the plugin configuration
* @since 1.5
*/
public function __construct (&$subject, $config) {
parent::__construct($subject, $config);
$this->loadLanguage();
}

/**
* Display the button.
*
* @param string $name field name
* @return JObject button settings
*/
function onDisplay ($name) {

$doc =& JFactory::getDocument();
/* @var $doc JDocumentHTML */

$script[] = '//<![CDATA[';
$script[] = 'function jSelectJoomdocDocument(id, title, url) {';
$script[] = ' var tag = \'<a href="\' + url + \'" title="">\' + title + \'</a>\';';
$script[] = ' jInsertEditorText(tag, \'' . addslashes($name) . '\');';
$script[] = ' SqueezeBox.close();';
$script[] = '}';
$script[] = '//]]>';

$script = implode(PHP_EOL, $script);

$doc->addScriptDeclaration($script);

$button = new JObject();
$button->set('modal', true);
$button->set('link', str_replace('&', '&amp;', JoomDOCRoute::modalDocuments(null, true)));
$button->set('text', JText::_('PLG_EDITORS-XTD_JOOMDOC_BTN'));
$button->set('name', 'article');
/* Add button class - Pat Ryan
*/
$button->set('class', 'btn');
$button->set('options', "{handler: 'iframe', size: {x: 770, y: 400}}");

return $button;
}
}
?>
Pat Ryan
Last Edit: 10 years, 5 months ago by Pat.Ryan.
The topic has been locked.

Re: JoomDoc 4.0.2 - Editor Button Not Showing Fix 10 years, 5 months ago #44801

  • jitr
  • OFFLINE
  • ARTIO Support
  • Posts: 1432
OK, thanks.
ARTIO Support Team
The topic has been locked.
  • Page:
  • 1
User Login Empty