protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('mijoshop')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'mijoshop_' . ($group == 'products' ? 'product' : 'category'), $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!class_exists('MijoShop')) { require_once JPATH_ROOT . '/components/com_mijoshop/mijoshop/mijoshop.php'; } $this->store_id = (int) MijoShop::get('opencart')->get('config')->get('config_store_id'); $this->language_id = (int) MijoShop::get('opencart')->get('config')->get('config_language_id'); if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; switch ($group) { case 'categories': return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); default: return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple); } }
protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('virtuemart')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'virtuemart_' . $group, $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); if ($group == 'categories') { require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); } $size = $size ? 'style="width:' . $size . 'px"' : ''; $attr = $size; $attr .= $multiple ? ' multiple="multiple"' : ''; return JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id); }
/** * Create the helper object * * @return object The plugins helper object */ private function getHelper() { // Already initialized, so return if ($this->_init) { return $this->_helper; } $this->_init = true; if (!$this->isFrameworkEnabled()) { return false; } if (!JFile::exists(JPATH_ADMINISTRATOR . '/components/com_snippets/models/list.php')) { return; } require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php'; if (nnProtect::isAdmin()) { return false; } if (nnProtect::isProtectedPage($this->_alias, 1)) { return false; } // Load component parameters require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $params = nnParameters::getInstance()->getComponentParams($this->_name); require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php'; $this->_helper = nnFrameworkHelper::getPluginHelper($this, $params); return $this->_helper; }
function modCacheCleaner() { // Load plugin parameters require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $this->params = $parameters->getPluginParams('cachecleaner'); }
public function __construct($form = null) { $this->db = JFactory::getDBO(); $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; }
protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('zoo')) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_ZOO')) . '</fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'zoo_' . ($group == 'applications' ? 'application' : 'category'), $tables)) { return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_ZOO')) . '</fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; switch ($group) { case 'categories': return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); default: return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple); } }
/** * Constructor. * * @param array An optional associative array of configuration settings. * * @see JController */ public function __construct() { // Load plugin parameters require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $this->parameters = nnParameters::getInstance(); $this->_config = $this->parameters->getComponentParams('snippets'); parent::__construct(); }
/** * Function that gets the config settings * * @return Object */ protected function getConfig() { if (!isset($this->config)) { require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $this->config = $parameters->getComponentParams('advancedmodules'); } return $this->config; }
/** * Constructor. * * @param array An optional associative array of configuration settings. * * @see JController */ public function __construct($config = array()) { if (empty($config['filter_fields'])) { $config['filter_fields'] = array('id', 'a.id', 'name', 'a.name', 'alias', 'a.alias', 'description', 'a.description', 'ordering', 'a.ordering', 'published', 'a.published'); } // Load plugin parameters require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $this->parameters = nnParameters::getInstance(); parent::__construct($config); }
public function onAfterRoute() { $this->_pass = 0; jimport('joomla.filesystem.file'); if (JFile::exists(JPATH_PLUGINS . '/system/nnframework/helpers/protect.php')) { require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php'; // return if page should be protected if (nnProtect::isProtectedPage('', 1)) { return; } } // load the admin language file require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; nnFrameworkFunctions::loadLanguage('plg_' . $this->_type . '_' . $this->_name); // return if NoNumber Framework plugin is not installed if (!JFile::exists(JPATH_PLUGINS . '/system/nnframework/nnframework.php')) { if (JFactory::getApplication()->isAdmin() && JFactory::getApplication()->input->get('option') != 'com_login') { $msg = JText::_('SRC_NONUMBER_FRAMEWORK_NOT_INSTALLED') . ' ' . JText::sprintf('SRC_EXTENSION_CAN_NOT_FUNCTION', JText::_('SOURCERER')); $mq = JFactory::getApplication()->getMessageQueue(); foreach ($mq as $m) { if ($m['message'] == $msg) { $msg = ''; break; } } if ($msg) { JFactory::getApplication()->enqueueMessage($msg, 'error'); } } return; } if (JFile::exists(JPATH_PLUGINS . '/system/nnframework/helpers/protect.php')) { require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php'; // return if current page is an admin page if (nnProtect::isAdmin()) { return; } } else { if (JFactory::getApplication()->isAdmin()) { return; } } // load the site language file require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; nnFrameworkFunctions::loadLanguage('plg_' . $this->_type . '_' . $this->_name, JPATH_SITE); // Load plugin parameters require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams($this->_name); // Include the Helper require_once JPATH_PLUGINS . '/' . $this->_type . '/' . $this->_name . '/helper.php'; $class = get_class($this) . 'Helper'; $this->_helper = new $class($params); $this->_pass = 1; }
/** * Display the view * */ public function display($tpl = null) { require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $this->parameters = nnParameters::getInstance(); $this->form = $this->get('Form'); $this->item = $this->_models['item']->getItem(null, 1); $this->state = $this->get('State'); $this->config = $this->parameters->getComponentParams('snippets', $this->state->params); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); }
protected function getInput() { $this->params = $this->element->attributes(); $this->db = JFactory::getDbo(); $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $group = $this->get('group', 'categories'); $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); }
/** * Display the view * */ public function display($tpl = null) { require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $this->parameters = nnParameters::getInstance(); $this->enabled = SnippetsHelper::isEnabled(); $this->list = $this->get('Items'); $this->pagination = $this->get('Pagination'); $this->state = $this->get('State'); $this->config = $this->parameters->getComponentParams('snippets'); $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); }
/** * Create the helper object * * @return object The plugins helper object */ private function getHelper() { // Already initialized, so return if ($this->_init) { return $this->_helper; } $this->_init = true; if (!$this->isFrameworkEnabled()) { return false; } require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php'; if (!nnProtect::isSystemPluginInstalled($this->_alias)) { return false; } // Load plugin parameters require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams($this->_name); require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php'; $this->_helper = nnFrameworkHelper::getPluginHelper($this, $params); return $this->_helper; }
protected function getInput() { if (!nnFrameworkFunctions::extensionInstalled('akeebasubs')) { return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_AKEEBASUBS')) . '</label></fieldset>'; } $this->params = $this->element->attributes(); $this->db = JFactory::getDBO(); $group = $this->get('group', 'categories'); $tables = $this->db->getTableList(); if (!in_array($this->db->getPrefix() . 'akeebasubs_' . $group, $tables)) { return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_AKEEBASUBS')) . '</label></fieldset>'; } $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); $this->max_list_count = $params->max_list_count; if (!is_array($this->value)) { $this->value = explode(',', $this->value); } $options = $this->{'get' . $group}(); $size = (int) $this->get('size'); $multiple = $this->get('multiple'); require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php'; return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple); }
static function isCategoryList($context) { $hash = md5('isCategoryList_' . $context); if (nnCache::has($hash)) { return nnCache::get($hash); } // Return false if it is not a category page if ($context != 'com_content.category' || JFactory::getApplication()->input->get('view') != 'category') { return false; } // Return false if it is not a list layout if (JFactory::getApplication()->input->get('layout') && JFactory::getApplication()->input->get('layout') != 'list') { return false; } // Return true if it IS a list layout if (JFactory::getApplication()->input->get('layout') == 'list') { return true; } // Layout is empty, so check if default layout is list (default) require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $parameters = $parameters->getComponentParams('content'); return nnCache::set($hash, $parameters->category_layout == '_:default'); }
/** * Display the button * * @return array A two element array of ( imageName, textToInsert ) */ function onDisplay($name) { jimport('joomla.filesystem.file'); // return if system plugin is not installed if (!JFile::exists(JPATH_PLUGINS . '/system/' . $this->_name . '/' . $this->_name . '.php')) { return; } // return if NoNumber Framework plugin is not installed if (!JFile::exists(JPATH_PLUGINS . '/system/nnframework/nnframework.php')) { return; } // load the admin language file require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; nnFrameworkFunctions::loadLanguage('plg_' . $this->_type . '_' . $this->_name); // Load plugin parameters require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams($this->_name); // Include the Helper require_once JPATH_PLUGINS . '/' . $this->_type . '/' . $this->_name . '/helper.php'; $class = get_class($this) . 'Helper'; $helper = new $class($params); return $helper->render($name); }
static function selectlist(&$options, $name, $value, $id, $size = 0, $multiple = 0, $simple = 0) { if (empty($options)) { return '<fieldset class="radio">' . JText::_('NN_NO_ITEMS_FOUND') . '</fieldset>'; } require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); if (!is_array($value)) { $value = explode(',', $value); } $count = 0; if ($options != -1) { foreach ($options as $option) { $count++; if (isset($option->links)) { $count += count($option->links); } if ($count > $params->max_list_count) { break; } } } if ($options == -1 || $count > $params->max_list_count) { if (is_array($value)) { $value = implode(',', $value); } if (!$value) { $input = '<textarea name="' . $name . '" id="' . $id . '" cols="40" rows="5" />' . $value . '</textarea>'; } else { $input = '<input type="text" name="' . $name . '" id="' . $id . '" value="' . $value . '" size="60" />'; } return '<fieldset class="radio"><label for="' . $id . '">' . JText::_('NN_ITEM_IDS') . ':</label>' . $input . '</fieldset>'; } if (!$multiple) { $first_level = isset($options['0']->level) ? $options['0']->level : 0; foreach ($options as &$option) { if (!isset($option->level)) { continue; } $repeat = $option->level - $first_level > 0 ? $option->level - $first_level : 0; $option->text = str_repeat(' - ', $repeat) . $option->text; } $html = JHtml::_('select.genericlist', $options, $name, 'class="inputbox"', 'value', 'text', $value); return self::handlePreparedStyles($html); } $size = (int) $size ?: 300; if ($simple) { $attr = 'style="width: ' . $size . 'px"'; $attr .= $multiple ? ' multiple="multiple"' : ''; $html = JHtml::_('select.genericlist', $options, $name, trim($attr), 'value', 'text', $value, $id); return self::handlePreparedStyles($html); } require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php'; JFactory::getLanguage()->load('com_modules', JPATH_ADMINISTRATOR); JHtml::stylesheet('nnframework/multiselect.min.css', false, true); nnFrameworkFunctions::addScriptVersion(JURI::root(true) . '/media/nnframework/js/multiselect.min.js'); $html = array(); $html[] = '<div class="well well-small nn_multiselect" id="' . $id . '">'; $html[] = ' <div class="form-inline nn_multiselect-controls"> <span class="small">' . JText::_('JSELECT') . ': <a class="nn_multiselect-checkall" href="javascript://">' . JText::_('JALL') . '</a>, <a class="nn_multiselect-uncheckall" href="javascript://">' . JText::_('JNONE') . '</a>, <a class="nn_multiselect-toggleall" href="javascript://">' . JText::_('NN_TOGGLE') . '</a> </span> <span class="width-20">|</span> <span class="small">' . JText::_('NN_EXPAND') . ': <a class="nn_multiselect-expandall" href="javascript://">' . JText::_('JALL') . '</a>, <a class="nn_multiselect-collapseall" href="javascript://">' . JText::_('JNONE') . '</a> </span> <span class="width-20">|</span> <span class="small">' . JText::_('JSHOW') . ': <a class="nn_multiselect-showall" href="javascript://">' . JText::_('JALL') . '</a>, <a class="nn_multiselect-showselected" href="javascript://">' . JText::_('NN_SELECTED') . '</a> </span> <span class="nn_multiselect-maxmin"> <span class="width-20">|</span> <span class="small"> <a class="nn_multiselect-maximize" href="javascript://">' . JText::_('NN_MAXIMIZE') . '</a> <a class="nn_multiselect-minimize" style="display:none;" href="javascript://">' . JText::_('NN_MINIMIZE') . '</a> </span> </span> <input type="text" name=""nn_multiselect-filter" class="nn_multiselect-filter input-medium search-query pull-right" size="16" autocomplete="off" placeholder="' . JText::_('JSEARCH_FILTER') . '" aria-invalid="false" tabindex="-1"> </div> <div class="clearfix"></div> <hr class="hr-condensed" />'; $o = array(); foreach ($options as $option) { $option->level = isset($option->level) ? $option->level : 0; $o[] = $option; if (isset($option->links)) { foreach ($option->links as $link) { $link->level = $option->level + (isset($link->level) ? $link->level : 1); $o[] = $link; } } } $html[] = '<ul class="nn_multiselect-ul" style="max-height:300px;min-width:' . $size . 'px;overflow-x: hidden;">'; $prevlevel = 0; foreach ($o as $i => $option) { if ($prevlevel < $option->level) { // correct wrong level indentations $option->level = $prevlevel + 1; $html[] = '<ul class="nn_multiselect-sub">'; } else { if ($prevlevel > $option->level) { $html[] = str_repeat('</li></ul>', $prevlevel - $option->level); } else { if ($i) { $html[] = '</li>'; } } } $labelclass = trim('pull-left ' . (isset($option->labelclass) ? $option->labelclass : '')); $html[] = '<li>'; $item = '<div class="' . trim('nn_multiselect-item pull-left ' . (isset($option->class) ? $option->class : '')) . '">'; if (isset($option->title)) { $labelclass .= ' nav-header'; } if (isset($option->title) && (!isset($option->value) || !$option->value)) { $item .= '<label class="' . $labelclass . '">' . $option->title . '</label>'; } else { $selected = in_array($option->value, $value) ? ' checked="checked"' : ''; $disabled = isset($option->disable) && $option->disable ? ' readonly="readonly" style="visibility:hidden"' : ''; $item .= '<input type="checkbox" class="pull-left" name="' . $name . '" id="' . $id . $option->value . '" value="' . $option->value . '"' . $selected . $disabled . ' /> <label for="' . $id . $option->value . '" class="' . $labelclass . '">' . $option->text . '</label>'; } $item .= '</div>'; $html[] = $item; if (!isset($o[$i + 1]) && $option->level > 0) { $html[] = str_repeat('</li></ul>', (int) $option->level); } $prevlevel = $option->level; } $html[] = '</ul>'; $html[] = ' <div style="display:none;" class="nn_multiselect-menu-block"> <div class="pull-left nav-hover nn_multiselect-menu"> <div class="btn-group"> <a href="#" data-toggle="dropdown" class="dropdown-toggle btn btn-micro"> <span class="caret"></span> </a> <ul class="dropdown-menu"> <li class="nav-header">' . JText::_('COM_MODULES_SUBITEMS') . '</li> <li class="divider"></li> <li class=""><a class="checkall" href="javascript://"><span class="icon-checkbox"></span> ' . JText::_('JSELECT') . '</a> </li> <li><a class="uncheckall" href="javascript://"><span class="icon-checkbox-unchecked"></span> ' . JText::_('COM_MODULES_DESELECT') . '</a> </li> <div class="nn_multiselect-menu-expand"> <li class="divider"></li> <li><a class="expandall" href="javascript://"><span class="icon-plus"></span> ' . JText::_('NN_EXPAND') . '</a></li> <li><a class="collapseall" href="javascript://"><span class="icon-minus"></span> ' . JText::_('NN_COLLAPSE') . '</a></li> </div> </ul> </div> </div> </div>'; $html[] = '</div>'; $html = implode('', $html); return self::handlePreparedStyles($html); }
static function selectlist(&$options, $name, $value, $id, $size = 0, $multiple = 0, $attribs = '') { require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('nnframework'); if ($options == -1 || count($options) > $params->max_list_count) { if (is_array($value)) { $value = implode(',', $value); } if (!$value) { $input = '<textarea name="' . $name . '" id="' . $id . '" cols="40" rows="5" />' . $value . '</textarea>'; } else { $input = '<input type="text" name="' . $name . '" id="' . $id . '" value="' . $value . '" size="60" />'; } return '<fieldset class="radio"><label class="nn_label nn_label_error"><label for="' . $id . '">' . JText::_('NN_ITEM_IDS') . ':</label>' . $input . '</label></fieldset>'; } if (empty($options)) { return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('NN_NO_ITEMS_FOUND') . '</label></fieldset>'; } if (!$size) { $size = count($options) > 10 ? 10 : count($options); } $attribs .= ' size="' . $size . '"'; if ($multiple) { if (!is_array($value)) { $value = explode(',', $value); } $attribs .= ' multiple="multiple"'; if (substr($name, -2) != '[]') { $name .= '[]'; } } foreach ($options as $i => $option) { $option = (object) $option; if (isset($option->text)) { $option->text = str_replace(array(' ', ' '), '___', $option->text); $options[$i] = $option; } } $class = 'inputbox'; if ($multiple) { $class .= ' nn_multiselect'; } $html = JHtml::_('select.genericlist', $options, $name, 'class="' . trim($class) . '" ' . trim($attribs), 'value', 'text', $value, $id); $html = str_replace('___', ' ', $html); $links = array(); if ($multiple) { JHtml::stylesheet('nnframework/multiselect.min.css', false, true); JHtml::script('nnframework/multiselect.min.js', false, true); } else { if ($size && count($options) > $size) { $links[] = '<a href="javascript://" onclick="nnScripts.toggleSelectListSize(\'' . $id . '\');" id="toggle_' . $id . '">' . '<span class="show">' . JText::_('NN_MAXIMIZE') . '</span>' . '<span class="hide" style="display:none;">' . JText::_('NN_MINIMIZE') . '</span>' . '</a>'; } } if (!empty($links)) { JHtml::_('behavior.mootools'); JHtml::script('nnframework/script.min.js', false, true); $html = implode(' - ', $links) . '<br />' . $html; } $html = '<fieldset class="radio" id="' . $id . '_fieldset">' . $html . '</fieldset>'; return preg_replace('#>\\[\\[\\:(.*?)\\:\\]\\]#si', ' style="\\1">', $html); }
* * @package Sourcerer * @version 4.4.9 * * @author Peter van Westen <*****@*****.**> * @link http://www.nonumber.nl * @copyright Copyright © 2015 NoNumber All Rights Reserved * @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', $asset)) { JError::raiseError(403, JText::_("ALERTNOTAUTH")); } require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $params = $parameters->getPluginParams('sourcerer'); if (JFactory::getApplication()->isSite()) { if (!$params->enable_frontend) { JError::raiseError(403, JText::_("ALERTNOTAUTH")); } } $class = new plgButtonSourcererPopup(); $class->render($params); class plgButtonSourcererPopup { function render(&$params) { jimport('joomla.filesystem.file'); // Load plugin language require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
function getMenuItemParams($id = 0) { $hash = md5('getMenuItemParams_' . $id); if (nnCache::has($hash)) { return nnCache::get($hash); } $this->q->clear()->select('m.params')->from('#__menu AS m')->where('m.id = ' . (int) $id); $this->db->setQuery($this->q); $params = $this->db->loadResult(); $parameters = nnParameters::getInstance(); return nnCache::set($hash, $parameters->getParams($params)); }
private static function getSourcererTag() { if (isset(self::$sourcerer_tag)) { return self::$sourcerer_tag; } require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $params = nnParameters::getInstance()->getPluginParams('sourcerer'); self::$sourcerer_tag = isset($params->syntax_word) ? $params->syntax_word : ''; return self::$sourcerer_tag; }
private function getConfig() { static $instance; if (!is_object($instance)) { require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php'; $parameters = nnParameters::getInstance(); $instance = $parameters->getComponentParams('advancedmodules'); } return $instance; }