first commit
This commit is contained in:
57
plugins/quickicon/jce/jce.php
Normal file
57
plugins/quickicon/jce/jce.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2009-2022 Ryan Demmer. All rights reserved
|
||||
* @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
* JCE is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses
|
||||
*/
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
/**
|
||||
* JCE File Browser Quick Icon plugin.
|
||||
*
|
||||
* @since 2.1
|
||||
*/
|
||||
class plgQuickiconJce extends JPlugin
|
||||
{
|
||||
public function __construct(&$subject, $config)
|
||||
{
|
||||
parent::__construct($subject, $config);
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
|
||||
// only in Admin and only if the component is enabled
|
||||
if ($app->getClientId() !== 1 || JComponentHelper::getComponent('com_jce', true)->enabled === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->loadLanguage();
|
||||
}
|
||||
|
||||
public function onGetIcons($context)
|
||||
{
|
||||
if ($context != $this->params->get('context', 'mod_quickicon')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$user = JFactory::getUser();
|
||||
|
||||
if (!$user->authorise('jce.browser', 'com_jce')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$language = JFactory::getLanguage();
|
||||
$language->load('com_jce', JPATH_ADMINISTRATOR);
|
||||
|
||||
return array(array(
|
||||
'link' => 'index.php?option=com_jce&view=browser',
|
||||
'image' => 'picture fas fa-image',
|
||||
'access' => array('jce.browser', 'com_jce'),
|
||||
'text' => JText::_('PLG_QUICKICON_JCE_TITLE'),
|
||||
'id' => 'plg_quickicon_jce',
|
||||
));
|
||||
}
|
||||
}
|
||||
19
plugins/quickicon/jce/jce.xml
Normal file
19
plugins/quickicon/jce/jce.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension version="3.8" type="plugin" group="quickicon" method="upgrade">
|
||||
<name>plg_quickicon_jce</name>
|
||||
<version>2.9.32</version>
|
||||
<creationDate>01-11-2022</creationDate>
|
||||
<author>Ryan Demmer</author>
|
||||
<authorEmail>info@joomlacontenteditor.net</authorEmail>
|
||||
<authorUrl>http://www.joomlacontenteditor.net</authorUrl>
|
||||
<copyright>Copyright (C) 2006 - 2022 Ryan Demmer. All rights reserved</copyright>
|
||||
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
|
||||
<description>PLG_QUICKICON_JCE_XML_DESCRIPTION</description>
|
||||
<files folder="plugins/quickicon/jce">
|
||||
<filename plugin="jce">jce.php</filename>
|
||||
</files>
|
||||
<languages folder="administrator/language/en-GB">
|
||||
<language tag="en-GB">en-GB.plg_quickicon_jce.ini</language>
|
||||
<language tag="en-GB">en-GB.plg_quickicon_jce.sys.ini</language>
|
||||
</languages>
|
||||
</extension>
|
||||
Reference in New Issue
Block a user