Пример #1
0
 * @license         http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
defined('_JEXEC') or die;
$user = JFactory::getUser();
if ($user->get('guest') || !$user->authorise('core.edit', 'com_content') && !$user->authorise('core.create', 'com_content')) {
    JError::raiseError(403, JText::_("ALERTNOTAUTH"));
}
require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
$parameters = nnParameters::getInstance();
$params = $parameters->getPluginParams('articlesanywhere');
if (JFactory::getApplication()->isSite()) {
    if (!$params->enable_frontend) {
        JError::raiseError(403, JText::_("ALERTNOTAUTH"));
    }
}
$class = new plgButtonArticlesAnywherePopup();
$class->render($params);
class plgButtonArticlesAnywherePopup
{
    function render(&$params)
    {
        $app = JFactory::getApplication();
        // load the admin language file
        require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
        nnFrameworkFunctions::loadLanguage('plg_system_nnframework');
        nnFrameworkFunctions::loadLanguage('plg_editors-xtd_articlesanywhere');
        nnFrameworkFunctions::loadLanguage('plg_system_articlesanywhere');
        nnFrameworkFunctions::loadLanguage('com_content');
        JHtml::stylesheet('nnframework/style.min.css', false, true);
        require_once JPATH_ADMINISTRATOR . '/components/com_content/helpers/content.php';
        $content_type = 'core';
Пример #2
0
 *
 * @package     Articles Anywhere
 * @version     1.11.0
 *
 * @author      Peter van Westen <*****@*****.**>
 * @link        http://www.nonumber.nl
 * @copyright   Copyright © 2011 NoNumber! All Rights Reserved
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
// No direct access
defined('_JEXEC') or die('Restricted access');
$user =& JFactory::getUser();
if ($user->get('guest')) {
    JError::raiseError(403, JText::_("ALERTNOTAUTH"));
}
$class = new plgButtonArticlesAnywherePopup();
$params = $class->getPluginParamValues('articlesanywhere', 'editors-xtd');
$mainframe =& JFactory::getApplication();
if ($mainframe->isSite()) {
    if (!$params->enable_frontend) {
        JError::raiseError(403, JText::_("ALERTNOTAUTH"));
    }
}
$class->render($params);
class plgButtonArticlesAnywherePopup
{
    function getPluginParamValues($name, $type = 'system')
    {
        jimport('joomla.plugin.plugin');
        $plugin = JPluginHelper::getPlugin($type, $name);
        require_once JPATH_PLUGINS . DS . 'system' . DS . 'nonumberelements' . DS . 'helpers' . DS . 'parameters.php';