Your IP : 216.73.216.50


Current Path : /proc/1908984/root/proc/self/root/proc/self/root/proc/2411249/cwd/
Upload File :
Current File : //proc/1908984/root/proc/self/root/proc/self/root/proc/2411249/cwd/editors-xtd.tar

article/article.php000064400000003517152325656600010343 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.article
 *
 * @copyright   (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Article button
 *
 * @since  1.5
 */
class PlgButtonArticle extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   1.5
	 */
	public function onDisplay($name)
	{
		$input = JFactory::getApplication()->input;
		$user  = JFactory::getUser();

		// Can create in any category (component permission) or at least in one category
		$canCreateRecords = $user->authorise('core.create', 'com_content')
			|| count($user->getAuthorisedCategories('com_content', 'core.create')) > 0;

		// Instead of checking edit on all records, we can use **same** check as the form editing view
		$values = (array) JFactory::getApplication()->getUserState('com_content.edit.article.id');
		$isEditingRecords = count($values);

		// This ACL check is probably a double-check (form view already performed checks)
		$hasAccess = $canCreateRecords || $isEditingRecords;
		if (!$hasAccess)
		{
			return;
		}

		$link = 'index.php?option=com_content&amp;view=articles&amp;layout=modal&amp;tmpl=component&amp;'
			. JSession::getFormToken() . '=1&amp;editor=' . $name;

		$button = new JObject;
		$button->modal   = true;
		$button->class   = 'btn';
		$button->link    = $link;
		$button->text    = JText::_('PLG_ARTICLE_BUTTON_ARTICLE');
		$button->name    = 'file-add';
		$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

		return $button;
	}
}
article/article.xml000064400000001430152325656600010344 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_article</name>
	<author>Joomla! Project</author>
	<creationDate>October 2009</creationDate>
	<copyright>(C) 2009 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_ARTICLE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="article">article.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_article.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_article.sys.ini</language>
	</languages>
</extension>
article/index.html000064400000000037152325656600010176 0ustar00<!DOCTYPE html><title></title>
contact/contact.php000064400000002622152325656600010357 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.contact
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Contact button
 *
 * @since  3.7.0
 */
class PlgButtonContact extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.7.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   3.7.0
	 */
	public function onDisplay($name)
	{
		$user  = JFactory::getUser();

		if ($user->authorise('core.create', 'com_contact')
			|| $user->authorise('core.edit', 'com_contact')
			|| $user->authorise('core.edit.own', 'com_contact'))
		{
			// The URL for the contacts list
			$link = 'index.php?option=com_contact&amp;view=contacts&amp;layout=modal&amp;tmpl=component&amp;'
				. JSession::getFormToken() . '=1&amp;editor=' . $name;

			$button          = new JObject;
			$button->modal   = true;
			$button->class   = 'btn';
			$button->link    = $link;
			$button->text    = JText::_('PLG_EDITORS-XTD_CONTACT_BUTTON_CONTACT');
			$button->name    = 'address';
			$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

			return $button;
		}
	}
}
contact/contact.xml000064400000001444152325656600010371 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.7" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_contact</name>
	<author>Joomla! Project</author>
	<creationDate>October 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_EDITORS-XTD_CONTACT_XML_DESCRIPTION</description>
	<files>
		<filename plugin="contact">contact.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_contact.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_contact.sys.ini</language>
	</languages>
</extension>
fields/fields.php000064400000003317152325656600010007 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.fields
 *
 * @copyright   (C) 2017 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Fields button
 *
 * @since  3.7.0
 */
class PlgButtonFields extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.7.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since  3.7.0
	 */
	public function onDisplay($name)
	{
		// Check if com_fields is enabled
		if (!JComponentHelper::isEnabled('com_fields'))
		{
			return;
		}

		// Register FieldsHelper
		JLoader::register('FieldsHelper', JPATH_ADMINISTRATOR . '/components/com_fields/helpers/fields.php');

		// Guess the field context based on view.
		$jinput = JFactory::getApplication()->input;
		$context = $jinput->get('option') . '.' . $jinput->get('view');

		// Validate context.
		$context = implode('.', FieldsHelper::extract($context));
		if (!FieldsHelper::getFields($context))
		{
			return;
		}

		$link = 'index.php?option=com_fields&amp;view=fields&amp;layout=modal&amp;tmpl=component&amp;context='
			. $context . '&amp;editor=' . $name . '&amp;' . JSession::getFormToken() . '=1';

		$button          = new JObject;
		$button->modal   = true;
		$button->class   = 'btn';
		$button->link    = $link;
		$button->text    = JText::_('PLG_EDITORS-XTD_FIELDS_BUTTON_FIELD');
		$button->name    = 'puzzle';
		$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

		return $button;
	}
}
fields/fields.xml000064400000001437152325656600010021 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.7" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_fields</name>
	<author>Joomla! Project</author>
	<creationDate>February 2017</creationDate>
	<copyright>(C) 2017 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_EDITORS-XTD_FIELDS_XML_DESCRIPTION</description>
	<files>
		<filename plugin="fields">fields.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_fields.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_fields.sys.ini</language>
	</languages>
</extension>
image/image.php000064400000004175152325656600007442 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.image
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Image buton
 *
 * @since  1.5
 */
class PlgButtonImage extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button.
	 *
	 * @param   string   $name    The name of the button to display.
	 * @param   string   $asset   The name of the asset being edited.
	 * @param   integer  $author  The id of the author owning the asset being edited.
	 *
	 * @return  JObject  The button options as JObject or false if not allowed
	 *
	 * @since   1.5
	 */
	public function onDisplay($name, $asset, $author)
	{
		$app       = JFactory::getApplication();
		$user      = JFactory::getUser();
		$extension = $app->input->get('option');

		// For categories we check the extension (ex: component.section)
		if ($extension === 'com_categories')
		{
			$parts     = explode('.', $app->input->get('extension', 'com_content'));
			$extension = $parts[0];
		}

		$asset = $asset !== '' ? $asset : $extension;

		if ($user->authorise('core.edit', $asset)
			|| $user->authorise('core.create', $asset)
			|| (count($user->getAuthorisedCategories($asset, 'core.create')) > 0)
			|| ($user->authorise('core.edit.own', $asset) && $author === $user->id)
			|| (count($user->getAuthorisedCategories($extension, 'core.edit')) > 0)
			|| (count($user->getAuthorisedCategories($extension, 'core.edit.own')) > 0 && $author === $user->id))
		{
			$link = 'index.php?option=com_media&amp;view=images&amp;tmpl=component&amp;e_name=' . $name . '&amp;asset=' . $asset . '&amp;author=' . $author;

			$button = new JObject;
			$button->modal   = true;
			$button->class   = 'btn';
			$button->link    = $link;
			$button->text    = JText::_('PLG_IMAGE_BUTTON_IMAGE');
			$button->name    = 'pictures';
			$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

			return $button;
		}

		return false;
	}
}
image/image.xml000064400000001413152325656600007443 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_image</name>
	<author>Joomla! Project</author>
	<creationDate>August 2004</creationDate>
	<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_IMAGE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="image">image.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_image.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_image.sys.ini</language>
	</languages>
</extension>
image/index.html000064400000000037152325656600007635 0ustar00<!DOCTYPE html><title></title>
menu/menu.php000064400000002530152325656600007177 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.menu
 *
 * @copyright   (C) 2016 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor menu button
 *
 * @since  3.7.0
 */
class PlgButtonMenu extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.7.0
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @since  3.7.0
	 * @return array
	 */
	public function onDisplay($name)
	{
		/*
		 * Use the built-in element view to select the menu item.
		 * Currently uses blank class.
		 */
		$user  = JFactory::getUser();

		if ($user->authorise('core.create', 'com_menus')
			|| $user->authorise('core.edit', 'com_menus'))
		{
		$link = 'index.php?option=com_menus&amp;view=items&amp;layout=modal&amp;tmpl=component&amp;'
			. JSession::getFormToken() . '=1&amp;editor=' . $name;

		$button          = new JObject;
		$button->modal   = true;
		$button->class   = 'btn';
		$button->link    = $link;
		$button->text    = JText::_('PLG_EDITORS-XTD_MENU_BUTTON_MENU');
		$button->name    = 'share-alt';
		$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

		return $button;
		}
	}
}
menu/menu.xml000064400000001421152325656600007206 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.7" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_menu</name>
	<author>Joomla! Project</author>
	<creationDate>August 2016</creationDate>
	<copyright>(C) 2016 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.7.0</version>
	<description>PLG_EDITORS-XTD_MENU_XML_DESCRIPTION</description>
	<files>
		<filename plugin="menu">menu.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_menu.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_menu.sys.ini</language>
	</languages>
</extension>
module/module.php000064400000002702152325656600010042 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.module
 *
 * @copyright   (C) 2015 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Module button
 *
 * @since  3.5
 */
class PlgButtonModule extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.5
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   3.5
	 */
	public function onDisplay($name)
	{
		/*
		 * Use the built-in element view to select the module.
		 * Currently uses blank class.
		 */
		$user  = JFactory::getUser();

		if ($user->authorise('core.create', 'com_modules')
			|| $user->authorise('core.edit', 'com_modules')
			|| $user->authorise('core.edit.own', 'com_modules'))
		{
			$link = 'index.php?option=com_modules&amp;view=modules&amp;layout=modal&amp;tmpl=component&amp;editor='
					. $name . '&amp;' . JSession::getFormToken() . '=1';

			$button          = new JObject;
			$button->modal   = true;
			$button->class   = 'btn';
			$button->link    = $link;
			$button->text    = JText::_('PLG_MODULE_BUTTON_MODULE');
			$button->name    = 'file-add';
			$button->options = "{handler: 'iframe', size: {x: 800, y: 500}}";

			return $button;
		}
	}
}
module/module.xml000064400000001422152325656600010051 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.6" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_module</name>
	<author>Joomla! Project</author>
	<creationDate>October 2015</creationDate>
	<copyright>(C) 2015 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.5.0</version>
	<description>PLG_MODULE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="module">module.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_module.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_module.sys.ini</language>
	</languages>
</extension>
pagebreak/index.html000064400000000037152325656600010474 0ustar00<!DOCTYPE html><title></title>
pagebreak/pagebreak.php000064400000003632152325656600011135 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.pagebreak
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Pagebreak button
 *
 * @since  1.5
 */
class PlgButtonPagebreak extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   1.5
	 */
	public function onDisplay($name)
	{
		$input = JFactory::getApplication()->input;
		$user  = JFactory::getUser();

		// Can create in any category (component permission) or at least in one category
		$canCreateRecords = $user->authorise('core.create', 'com_content')
			|| count($user->getAuthorisedCategories('com_content', 'core.create')) > 0;

		// Instead of checking edit on all records, we can use **same** check as the form editing view
		$values = (array) JFactory::getApplication()->getUserState('com_content.edit.article.id');
		$isEditingRecords = count($values);

		// This ACL check is probably a double-check (form view already performed checks)
		$hasAccess = $canCreateRecords || $isEditingRecords;
		if (!$hasAccess)
		{
			return;
		}

		JFactory::getDocument()->addScriptOptions('xtd-pagebreak', array('editor' => $name));
		$link = 'index.php?option=com_content&amp;view=article&amp;layout=pagebreak&amp;tmpl=component&amp;e_name=' . $name;

		$button          = new JObject;
		$button->modal   = true;
		$button->class   = 'btn';
		$button->link    = $link;
		$button->text    = JText::_('PLG_EDITORSXTD_PAGEBREAK_BUTTON_PAGEBREAK');
		$button->name    = 'copy';
		$button->options = "{handler: 'iframe', size: {x: 500, y: 300}}";

		return $button;
	}
}
pagebreak/pagebreak.xml000064400000001456152325656600011150 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_pagebreak</name>
	<author>Joomla! Project</author>
	<creationDate>August 2004</creationDate>
	<copyright>(C) 2005 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_EDITORSXTD_PAGEBREAK_XML_DESCRIPTION</description>
	<files>
		<filename plugin="pagebreak">pagebreak.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_pagebreak.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_pagebreak.sys.ini</language>
	</languages>
</extension>
readmore/index.html000064400000000037152325656600010351 0ustar00<!DOCTYPE html><title></title>
readmore/readmore.php000064400000002507152325656600010667 0ustar00<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Editors-xtd.readmore
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor Readmore button
 *
 * @since  1.5
 */
class PlgButtonReadmore extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Readmore button
	 *
	 * @param   string  $name  The name of the button to add
	 *
	 * @return  JObject  The button options as JObject
	 *
	 * @since   1.5
	 */
	public function onDisplay($name)
	{
		JHtml::_('script', 'com_content/admin-article-readmore.min.js', array('version' => 'auto', 'relative' => true));

		// Pass some data to javascript
		JFactory::getDocument()->addScriptOptions(
			'xtd-readmore',
			array(
				'editor' => $this->_subject->getContent($name),
				'exists' => JText::_('PLG_READMORE_ALREADY_EXISTS', true),
			)
		);

		$button = new JObject;
		$button->modal   = false;
		$button->class   = 'btn';
		$button->onclick = 'insertReadmore(\'' . $name . '\');return false;';
		$button->text    = JText::_('PLG_READMORE_BUTTON_READMORE');
		$button->name    = 'arrow-down';
		$button->link    = '#';

		return $button;
	}
}
readmore/readmore.xml000064400000001434152325656600010676 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.1" type="plugin" group="editors-xtd" method="upgrade">
	<name>plg_editors-xtd_readmore</name>
	<author>Joomla! Project</author>
	<creationDate>March 2006</creationDate>
	<copyright>(C) 2006 Open Source Matters, Inc.</copyright>
	<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
	<authorEmail>admin@joomla.org</authorEmail>
	<authorUrl>www.joomla.org</authorUrl>
	<version>3.0.0</version>
	<description>PLG_READMORE_XML_DESCRIPTION</description>
	<files>
		<filename plugin="readmore">readmore.php</filename>
	</files>
	<languages>
		<language tag="en-GB">en-GB.plg_editors-xtd_readmore.ini</language>
		<language tag="en-GB">en-GB.plg_editors-xtd_readmore.sys.ini</language>
	</languages>
</extension>
shortcode_ultimate/index.html000064400000000037152325656600012451 0ustar00<!DOCTYPE html><title></title>
shortcode_ultimate/shortcode_ultimate.php000064400000005157152325656600015073 0ustar00<?php
/**
 * @package     Shortcode Ultimate
 * @subpackage  Editors-xtd insert shortcode
 *
 * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * Editor SHortcode Ultimate button
 *
 * @package     Shortcode Ultimate
 * @subpackage  Editors-xtd insert shortcode
 * @since       1.0
 */
class PlgButtonShortcode_Ultimate extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 *
	 * @var    boolean
	 * @since  3.1
	 */
	protected $autoloadLanguage = true;

	/**
	 * Display the button.
	 *
	 * @param   string   $name    The name of the button to display.
	 * @param   string   $asset   The name of the asset being edited.
	 * @param   integer  $author  The id of the author owning the asset being edited.
	 *
	 * @return  array    A two element array of (shortcode, textToInsert) or false if not authorised.
	 */
	public function onDisplay($name, $asset, $author)
	{
		$app = JFactory::getApplication();
		$user = JFactory::getUser();
		$extension = $app->input->get('option');

		$plugin = JPluginHelper::getPlugin('system', 'bdthemes_shortcodes');
		$params = new JRegistry($plugin->params);


		if ($asset == '')
		{
			$asset = $extension;
		}

		if (	($user->authorise('core.edit', $asset)
			||	$user->authorise('core.create', $asset)
			||	(count($user->getAuthorisedCategories($asset, 'core.create')) > 0)
			||	($user->authorise('core.edit.own', $asset) && $author == $user->id)
			||	(count($user->getAuthorisedCategories($extension, 'core.edit')) > 0)
			||	(count($user->getAuthorisedCategories($extension, 'core.edit.own')) > 0 && $author == $user->id)) && class_exists('plgSystemBdthemes_Shortcodes'))
		{	


			if ($params->get('shortcode_intro', 1) ) {
				// For showing intro in shortcode ultimate button.
				$doc = JFactory::getDocument();
				$doc->addScript(BDT_SU_URI . '/js/intro-su-button.js');
			}

			JHtml::_('behavior.modal');
            $link = 'index.php?option=com_bdthemes_shortcodes&amp;view=config&amp;tmpl=component&amp;e_name=' . $name . '&amp;asset=' . $asset . '&amp;author=' . $author;                       
			$button = new JObject;
			$button->class = 'btn btn-default';
			$button->link = $link;
			$button->text = JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_INSERT_SHORTCODE');
			$button->title = JText::_('PLG_SYSTEM_BDTHEMES_SHORTCODES_INSERT_SHORTCODE_DESC');
			$button->name = 'apply sug-button';
			$button->modal = true;
			$button->options = "{handler: 'iframe', size: {x: 960, y: 640}}";
			return $button;
		}
		else
		{
			return false;
		}
	}
}
shortcode_ultimate/shortcode_ultimate.xml000064400000001433152325656600015075 0ustar00<?xml version="1.0" encoding="utf-8"?>
<extension version="3.0" type="plugin" group="editors-xtd" method="upgrade">
	<name>Button - Shortcodes Ultimate</name>
	<author>BdThemes Ltd</author>
	<creationDate>5th August 2016</creationDate>
	<authorEmail>info@bdthemes.com</authorEmail>
	<authorUrl>http://www.bdthemes.com</authorUrl>
	<copyright>(C) 2012 BDThemes Ltd. All rights reserved.</copyright>
	<license>http://www.gnu.org/copyright/gpl.html GNU/GPL</license>
	<version>2.0.1</version>
	<description>This is the Shortcodes system buttom that enables the use of shortcodes in the entire site. it's work like wordpress shortcodes system.</description>
	<files>
		<filename plugin="shortcode_ultimate">shortcode_ultimate.php</filename>
		<filename>index.html</filename>	
	</files>
</extension>
index.html000064400000000037152325656600006553 0ustar00<!DOCTYPE html><title></title>