• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP NNFrameworkFunctions类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中NNFrameworkFunctions的典型用法代码示例。如果您正苦于以下问题:PHP NNFrameworkFunctions类的具体用法?PHP NNFrameworkFunctions怎么用?PHP NNFrameworkFunctions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了NNFrameworkFunctions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getInput

 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);
     }
     $attr = '';
     $attr .= ' size="' . (int) $size . '"';
     $attr .= $multiple ? ' multiple="multiple"' : '';
     return JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:30,代码来源:virtuemart.php


示例2: getGeo

 function getGeo($service)
 {
     if ($this->geo !== null) {
         return $this->geo;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
     $func = new NNFrameworkFunctions();
     $ip = $_SERVER['REMOTE_ADDR'] == '127.0.0.1' ? '' : $_SERVER['REMOTE_ADDR'];
     switch ($service) {
         case 'geoplugin':
             if (!($geo = json_decode($func->getContents('http://www.geoplugin.net/json.gp?ip=' . $ip)))) {
                 $this->geo = false;
                 return false;
             }
             if (isset($geo->geoplugin_status) && $geo->geoplugin_status == 404) {
                 $this->geo = false;
                 return false;
             }
             $this->geo = (object) array('continent' => isset($geo->geoplugin_continentCode) ? $geo->geoplugin_continentCode : '', 'country' => isset($geo->geoplugin_countryCode) ? $geo->geoplugin_countryCode : '', 'region' => isset($geo->geoplugin_regionCode) ? $geo->geoplugin_regionCode : '');
             break;
         case 'telize':
         default:
             if (!($geo = json_decode($func->getContents('http://www.telize.com/geoip/' . $ip)))) {
                 $this->geo = false;
                 return false;
             }
             if (isset($geo->code)) {
                 $this->geo = false;
                 return false;
             }
             $this->geo = (object) array('continent' => isset($geo->continent_code) ? $geo->continent_code : '', 'country' => isset($geo->country_code) ? $geo->country_code : '', 'region' => isset($geo->region_code) ? $geo->region_code : '');
             break;
     }
     return $this->geo;
 }
开发者ID:naka211,项目名称:kkvn,代码行数:35,代码来源:geo.php


示例3: getGeo

 function getGeo()
 {
     if (!$this->geo) {
         require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
         $func = new NNFrameworkFunctions();
         $this->geo = json_decode($func->getContents('http://www.geoplugin.net/json.gp?ip=' . $_SERVER['REMOTE_ADDR']));
     }
     return $this->geo;
 }
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:9,代码来源:geo.php


示例4: __construct

 function __construct()
 {
     $url = JFactory::getApplication()->input->getString('url', '');
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
     $func = new NNFrameworkFunctions();
     if ($url) {
         echo $func->getByUrl($url);
         die;
     }
     $file = JFactory::getApplication()->input->getString('file', '');
     // only allow files that have .inc.php in the file name
     if (!$file || strpos($file, '.inc.php') === false) {
         die;
     }
     $folder = JFactory::getApplication()->input->getString('folder', '');
     if ($folder) {
         $file = implode('/', explode('.', $folder)) . '/' . $file;
     }
     $allowed = array('administrator/components/com_dbreplacer/dbreplacer.inc.php', 'administrator/components/com_nonumbermanager/details.inc.php', 'administrator/modules/mod_addtomenu/addtomenu.inc.php', 'media/rereplacer/images/image.inc.php', 'plugins/editors-xtd/articlesanywhere/articlesanywhere.inc.php', 'plugins/editors-xtd/contenttemplater/contenttemplater.inc.php', 'plugins/editors-xtd/modulesanywhere/modulesanywhere.inc.php', 'plugins/editors-xtd/snippets/snippets.inc.php', 'plugins/editors-xtd/sourcerer/sourcerer.inc.php');
     if (!$file || in_array($file, $allowed) === false) {
         die;
     }
     jimport('joomla.filesystem.file');
     if (JFactory::getApplication()->isSite()) {
         JFactory::getApplication()->setTemplate('../administrator/templates/isis');
     }
     $_REQUEST['tmpl'] = 'component';
     JFactory::getApplication()->input->set('option', '1');
     JHtml::_('bootstrap.framework');
     JFactory::getDocument()->addScript(JURI::root(true) . '/administrator/templates/isis/js/template.js');
     JFactory::getDocument()->addStyleSheet(JURI::root(true) . '/administrator/templates/isis/css/template.css');
     JHtml::stylesheet('nnframework/popup.min.css', false, true);
     $file = JPATH_SITE . '/' . $file;
     $html = '';
     if (JFile::exists($file)) {
         ob_start();
         include $file;
         $html = ob_get_contents();
         ob_end_clean();
     }
     JFactory::getDocument()->setBuffer($html, 'component');
     if (version_compare(JVERSION, '3.2', 'l')) {
         JFactory::getApplication()->render();
     } else {
         nnApplication::render();
     }
     $html = JResponse::toString(JFactory::getApplication()->getCfg('gzip'));
     $html = preg_replace('#\\s*<' . 'link [^>]*href="[^"]*templates/system/[^"]*\\.css[^"]*"[^>]* />#s', '', $html);
     $html = preg_replace('#(<' . 'body [^>]*class=")#s', '\\1nnpopup ', $html);
     $html = str_replace('<' . 'body>', '<' . 'body class="nnpopup"', $html);
     echo $html;
     die;
 }
开发者ID:naka211,项目名称:jydsk,代码行数:53,代码来源:helper.php


示例5: install

 /**
  * Download and install
  */
 function install($id, $url)
 {
     if (!is_string($url)) {
         return JText::_('NNEM_ERROR_NO_VALID_URL');
     }
     $url = 'http://' . str_replace('http://', '', $url);
     if (!($target = JInstallerHelper::downloadPackage($url))) {
         return JText::_('NNEM_ERROR_CANNOT_DOWNLOAD_FILE');
     }
     $target = JFactory::getConfig()->get('tmp_path') . '/' . $target;
     NNFrameworkFunctions::loadLanguage('com_installer', JPATH_ADMINISTRATOR);
     jimport('joomla.installer.installer');
     jimport('joomla.installer.helper');
     // Get an installer instance
     $installer = JInstaller::getInstance();
     // Unpack the package
     $package = JInstallerHelper::unpack($target);
     // Cleanup the install files
     if (!is_file($package['packagefile'])) {
         $config = JFactory::getConfig();
         $package['packagefile'] = $config->get('tmp_path') . '/' . $package['packagefile'];
     }
     JInstallerHelper::cleanupInstall($package['packagefile'], $package['packagefile']);
     // Install the package
     if (!$installer->install($package['dir'])) {
         // There was an error installing the package
         return JText::sprintf('COM_INSTALLER_INSTALL_ERROR', JText::_('COM_INSTALLER_TYPE_TYPE_' . strtoupper($package['type'])));
     }
     return true;
 }
开发者ID:kenyonjohnston,项目名称:hott_theater,代码行数:33,代码来源:process.php


示例6: getInput

	protected function getInput()
	{
		if (!NNFrameworkFunctions::extensionInstalled('flexicontent'))
		{
			return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_FLEXICONTENT')) . '</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() . 'flexicontent_' . $group, $tables))
		{
			return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_FLEXICONTENT')) . '</label></fieldset>';
		}

		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);
	}
开发者ID:sergy444,项目名称:joomla,代码行数:32,代码来源:flexicontent.php


示例7: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     if (!NNFrameworkFunctions::extensionInstalled('flexicontent')) {
         return '<fieldset class="radio">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_FLEXICONTENT')) . '</fieldset>';
     }
     $group = $this->def('group', 'categories');
     $this->db = JFactory::getDBO();
     $tables = $this->db->getTableList();
     if (!in_array($this->db->getPrefix() . 'flexicontent_' . $group, $tables)) {
         return '<fieldset class="radio">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_FLEXICONTENT')) . '</fieldset>';
     }
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $options = $this->{'get' . $group}();
     $size = (int) $this->def('size');
     $multiple = $this->def('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);
     } else {
         $attr = '';
         $attr .= ' size="' . (int) $size . '"';
         $attr .= $multiple ? ' multiple="multiple"' : '';
         return JHtml::_('select.genericlist', $options, $this->name . '[]', trim($attr), 'value', 'text', $this->value, $this->id);
     }
 }
开发者ID:AxelFG,项目名称:ckbran-inf,代码行数:28,代码来源:flexicontent.php


示例8: getInput

 protected function getInput()
 {
     if (!NNFrameworkFunctions::extensionInstalled('mijoshop')) {
         return '<fieldset class="radio">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>';
     }
     $this->params = $this->element->attributes();
     $group = $this->def('group', 'categories');
     $this->db = JFactory::getDBO();
     $tables = $this->db->getTableList();
     if (!in_array($this->db->getPrefix() . 'mijoshop_' . ($group == 'products' ? 'product' : 'category'), $tables)) {
         return '<fieldset class="radio">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>';
     }
     $this->params = $this->element->attributes();
     $parameters = NNParameters::getInstance();
     $params = $parameters->getPluginParams('nnframework');
     $this->max_list_count = $params->max_list_count;
     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->def('size');
     $multiple = $this->def('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);
     } else {
         $attr = '';
         $attr .= ' size="' . (int) $size . '"';
         $attr .= $multiple ? ' multiple="multiple"' : '';
         return JHtml::_('select.genericlist', $options, $this->name . '[]', trim($attr), 'value', 'text', $this->value, $this->id);
     }
 }
开发者ID:greyhat777,项目名称:vuslinterliga,代码行数:35,代码来源:mijoshop.php


示例9: loadLanguage

 function loadLanguage($extension, $admin = 1)
 {
     if (!$extension) {
         return;
     }
     NNFrameworkFunctions::loadLanguage($extension, $admin ? JPATH_ADMINISTRATOR : JPATH_SITE);
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:7,代码来源:loadlanguage.php


示例10: getInput

 protected function getInput()
 {
     JHtml::_('jquery.framework');
     NNFrameworkFunctions::addScriptVersion(JUri::root(true) . '/media/nnframework/js/script.min.js');
     NNFrameworkFunctions::addScriptVersion(JUri::root(true) . '/media/nnframework/js/toggler.min.js');
     $this->params = $this->element->attributes();
     $size = (int) $this->get('size');
     $attr = $this->get('onchange') ? ' onchange="' . $this->get('onchange') . '"' : '';
     $categories = $this->getOptions();
     $options = parent::getOptions();
     if ($this->get('show_none', 1)) {
         $options[] = JHtml::_('select.option', '', '- ' . JText::_('JNONE') . ' -', 'value', 'text');
     }
     if ($this->get('show_new', 1)) {
         $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('NN_NEW_CATEGORY') . ' -', 'value', 'text', false);
     }
     $options = array_merge($options, $categories);
     if (!$this->get('show_new', 1)) {
         return JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);
     }
     NNFrameworkFunctions::addScriptVersion(JUri::root(true) . '/media/nnframework/js/simplecategories.min.js');
     $html = array();
     $html[] = '<div class="nn_simplecategory">';
     $html[] = '<input type="hidden" class="nn_simplecategory_value" id="' . $this->id . '" name="' . $this->name . '" value="' . $this->value . '" checked="checked" />';
     $html[] = '<div class="nn_simplecategory_select">';
     $html[] = NNHtml::selectlistsimple($options, $this->getName($this->fieldname . '_select'), $this->value, $this->getId('', $this->fieldname . '_select'), $size, false);
     $html[] = '</div>';
     $html[] = '<div id="' . rand(1000000, 9999999) . '___' . $this->fieldname . '_select.-1" class="nntoggler nntoggler_nofx" style="display:none;">';
     $html[] = '<div class="nn_simplecategory_new">';
     $html[] = '<input type="text" id="' . $this->id . '_new" value="" placeholder="' . JText::_('NN_NEW_CATEGORY_ENTER') . '" />';
     $html[] = '</div>';
     $html[] = '</div>';
     $html[] = '</div>';
     return implode('', $html);
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:35,代码来源:simplecategories.php


示例11: render

 /**
  * Display the button
  *
  * @return array A two element array of ( imageName, textToInsert )
  */
 function render($name)
 {
     $button = new JObject();
     if (JFactory::getApplication()->isSite() && !$this->params->enable_frontend) {
         return $button;
     }
     $user = JFactory::getUser();
     if ($user->get('guest') || !$user->authorise('core.edit', 'com_content') && !$user->authorise('core.create', 'com_content')) {
         return $button;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
     NNFrameworkFunctions::loadLanguage('plg_editors-xtd_articlesanywhere');
     JHtml::_('behavior.modal');
     JHtml::stylesheet('nnframework/style.min.css', false, true);
     $class = 'nonumber icon-articlesanywhere';
     $link = 'index.php?nn_qp=1' . '&folder=plugins.editors-xtd.articlesanywhere' . '&file=popup.php' . '&name=' . $name;
     $text_ini = strtoupper(str_replace(' ', '_', $this->params->button_text));
     $text = JText::_($text_ini);
     if ($text == $text_ini) {
         $text = JText::_($this->params->button_text);
     }
     $button->modal = true;
     $button->class = 'btn';
     $button->link = $link;
     $button->text = trim($text);
     $button->name = $class;
     $button->options = "{handler: 'iframe', size: {x:window.getSize().x-100, y: window.getSize().y-100}}";
     return $button;
 }
开发者ID:naka211,项目名称:malerfirmaet,代码行数:34,代码来源:helper.php


示例12: clean

 function clean()
 {
     if (!($type = $this->getCleanType())) {
         return;
     }
     // Load language for messaging
     NNFrameworkFunctions::loadLanguage('mod_cachecleaner');
     $this->purgeCache($type);
     // only handle messages in html
     if (JFactory::getDocument()->getType() != 'html') {
         return false;
     }
     $error = $this->helpers->getParams()->error;
     if ($error) {
         $message = JText::_('CC_NOT_ALL_CACHE_COULD_BE_REMOVED');
         $message .= $this->helpers->getParams()->error !== true ? '<br />' . $this->helpers->getParams()->error : '';
     } else {
         $message = $this->helpers->getParams()->message ?: JText::_('CC_CACHE_CLEANED');
         if ($this->params->show_size && $this->helpers->getParams()->size) {
             $message .= ' (' . $this->helpers->get('cache')->getSize() . ')';
         }
     }
     if (JFactory::getApplication()->input->getInt('break')) {
         echo (!$error ? '+' : '') . str_replace('<br />', ' - ', $message);
         die;
     }
     if ($this->show_message && $message) {
         JFactory::getApplication()->enqueueMessage($message, $error ? 'error' : 'message');
     }
 }
开发者ID:kenyonjohnston,项目名称:hott_theater,代码行数:30,代码来源:helper.php


示例13: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     JHtml::_('jquery.framework');
     NNFrameworkFunctions::addScriptVersion(JUri::root(true) . '/media/nnframework/js/script.min.js');
     if ($file = $this->get('file')) {
         $label = $this->get('label', 'the main extension');
         NNFieldDependency::setMessage($file, $label);
         return '';
     }
     $path = $this->get('path') == 'site' ? '' : '/administrator';
     $label = $this->get('label');
     $file = $this->get('alias', $label);
     $file = preg_replace('#[^a-z-]#', '', strtolower($file));
     $extension = $this->get('extension');
     switch ($extension) {
         case 'com':
             $file = $path . '/components/com_' . $file . '/com_' . $file . '.xml';
             break;
         case 'mod':
             $file = $path . '/modules/mod_' . $file . '/mod_' . $file . '.xml';
             break;
         case 'plg_editors-xtd':
             $file = '/plugins/editors-xtd/' . $file . '.xml';
             break;
         default:
             $file = '/plugins/system/' . $file . '.xml';
             break;
     }
     $label = JText::_($label) . ' (' . JText::_('NN_' . strtoupper($extension)) . ')';
     NNFieldDependency::setMessage($file, $label);
     return '';
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:33,代码来源:dependency.php


示例14: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     if (!NNFrameworkFunctions::extensionInstalled('virtuemart')) {
         return '<fieldset class="radio">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>';
     }
     $group = $this->def('group', 'categories');
     $this->db = JFactory::getDBO();
     $tables = $this->db->getTableList();
     if (!in_array($this->db->getPrefix() . 'virtuemart_' . $group, $tables)) {
         return '<fieldset class="radio">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>';
     }
     $query = $this->db->getQuery(true);
     $query->select('config')->from('#__virtuemart_configs')->where('virtuemart_config_id = 1');
     $this->db->setQuery($query);
     $config = $this->db->loadResult();
     $lang = substr($config, strpos($config, 'vmlang='));
     $lang = substr($lang, 0, strpos($lang, '|'));
     if (preg_match('#"([^"]*_[^"]*)"#', $lang, $lang)) {
         $this->lang = $lang['1'];
     } else {
         $this->lang = 'en_gb';
     }
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $options = $this->{'get' . $group}();
     $size = (int) $this->def('size');
     $multiple = $this->def('multiple');
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
     return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
 }
开发者ID:brojask,项目名称:colegio-abogados-joomla,代码行数:32,代码来源:virtuemart.php


示例15: getInput

 protected function getInput()
 {
     if (!NNFrameworkFunctions::extensionInstalled('hikashop')) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_HIKASHOP')) . '</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() . 'hikashop_' . ($group == 'products' ? 'product' : 'category'), $tables)) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_HIKASHOP')) . '</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);
     }
 }
开发者ID:WineWorld,项目名称:joomlatrialcmbg,代码行数:29,代码来源:hikashop.php


示例16: isPro

 private static function isPro($element)
 {
     require_once __DIR__ . '/functions.php';
     if (!($version = NNFrameworkFunctions::getXMLValue('version', $element))) {
         return false;
     }
     return stripos($version, 'PRO') !== false;
 }
开发者ID:esorone,项目名称:efcpw,代码行数:8,代码来源:licenses.php


示例17: render

 function render()
 {
     $url = JFactory::getApplication()->input->getString('url', '');
     $func = new NNFrameworkFunctions();
     if ($url) {
         echo $func->getByUrl($url);
         die;
     }
     $allowed = array('administrator/components/com_dbreplacer/ajax.php', 'administrator/modules/mod_addtomenu/popup.php', 'media/rereplacer/images/popup.php', 'plugins/editors-xtd/articlesanywhere/popup.php', 'plugins/editors-xtd/contenttemplater/popup.php', 'plugins/editors-xtd/dummycontent/popup.php', 'plugins/editors-xtd/modals/popup.php', 'plugins/editors-xtd/modulesanywhere/popup.php', 'plugins/editors-xtd/sliders/popup.php', 'plugins/editors-xtd/snippets/popup.php', 'plugins/editors-xtd/sourcerer/popup.php', 'plugins/editors-xtd/tabs/popup.php', 'plugins/editors-xtd/tooltips/popup.php', 'administrator/components/com_dbreplacer/dbreplacer.inc.php', 'administrator/components/com_nonumbermanager/details.inc.php', 'administrator/modules/mod_addtomenu/addtomenu.inc.php', 'media/rereplacer/images/image.inc.php', 'plugins/editors-xtd/articlesanywhere/articlesanywhere.inc.php', 'plugins/editors-xtd/contenttemplater/contenttemplater.inc.php', 'plugins/editors-xtd/dummycontent/dummycontent.inc.php', 'plugins/editors-xtd/modulesanywhere/modulesanywhere.inc.php', 'plugins/editors-xtd/snippets/snippets.inc.php', 'plugins/editors-xtd/sourcerer/sourcerer.inc.php');
     $file = JFactory::getApplication()->input->getString('file', '');
     $folder = JFactory::getApplication()->input->getString('folder', '');
     if ($folder) {
         $file = implode('/', explode('.', $folder)) . '/' . $file;
     }
     if (!$file || in_array($file, $allowed) === false) {
         die;
     }
     jimport('joomla.filesystem.file');
     if (JFactory::getApplication()->isSite()) {
         JFactory::getApplication()->setTemplate('../administrator/templates/isis');
     }
     $_REQUEST['tmpl'] = 'component';
     JFactory::getApplication()->input->set('option', 'com_content');
     header('Content-Type: text/html; charset=utf-8');
     JHtml::_('bootstrap.framework');
     JFactory::getDocument()->addScript(JUri::root(true) . '/administrator/templates/isis/js/template.js');
     JFactory::getDocument()->addStyleSheet(JUri::root(true) . '/administrator/templates/isis/css/template.css');
     JHtml::stylesheet('nnframework/popup.min.css', false, true);
     $file = JPATH_SITE . '/' . $file;
     $html = '';
     if (JFile::exists($file)) {
         ob_start();
         include $file;
         $html = ob_get_contents();
         ob_end_clean();
     }
     JFactory::getDocument()->setBuffer($html, 'component');
     NNApplication::render();
     $html = JResponse::toString(JFactory::getApplication()->getCfg('gzip'));
     $html = preg_replace('#\\s*<' . 'link [^>]*href="[^"]*templates/system/[^"]*\\.css[^"]*"[^>]* />#s', '', $html);
     $html = preg_replace('#(<' . 'body [^>]*class=")#s', '\\1nnpopup ', $html);
     $html = str_replace('<' . 'body>', '<' . 'body class="nnpopup"', $html);
     echo $html;
     die;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:45,代码来源:helper.php


示例18: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     $size = (int) $this->get('size');
     $multiple = $this->get('multiple', 0);
     NNFrameworkFunctions::loadLanguage('com_menus', JPATH_ADMINISTRATOR);
     $options = $this->getMenuItems();
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
     return NNHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
 }
开发者ID:esorone,项目名称:efcpw,代码行数:10,代码来源:menuitems.php


示例19: onAfterRoute

 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;
 }
开发者ID:esorone,项目名称:efcpw,代码行数:55,代码来源:sourcerer.php


示例20: getInput

 function getInput($params)
 {
     $this->params = $params;
     $option = JFactory::getApplication()->input->get('option');
     // do not place toggler stuff on JoomFish pages
     if ($option == 'com_joomfish') {
         return '';
     }
     $param = $this->get('param');
     $value = $this->get('value');
     $nofx = $this->get('nofx');
     $method = $this->get('method');
     $div = $this->get('div', 0);
     JHtml::_('jquery.framework');
     NNFrameworkFunctions::addScriptVersion(JUri::root(true) . '/media/nnframework/js/script.min.js');
     NNFrameworkFunctions::addScriptVersion(JUri::root(true) . '/media/nnframework/js/toggler.min.js');
     $param = preg_replace('#^\\s*(.*?)\\s*$#', '\\1', $param);
     $param = preg_replace('#\\s*\\|\\s*#', '|', $param);
     $html = array();
     if ($param != '') {
         $param = preg_replace('#[^a-z0-9-\\.\\|\\@]#', '_', $param);
         $param = str_replace('@', '_', $param);
         $set_groups = explode('|', $param);
         $set_values = explode('|', $value);
         $ids = array();
         foreach ($set_groups as $i => $group) {
             $count = $i;
             if ($count >= count($set_values)) {
                 $count = 0;
             }
             $value = explode(',', $set_values[$count]);
             foreach ($value as $val) {
                 $ids[] = $group . '.' . $val;
             }
         }
         if (!$div) {
             $html[] = '</div></div>';
         }
         $html[] = '<div id="' . rand(1000000, 9999999) . '___' . implode('___', $ids) . '" class="nntoggler';
         if ($nofx) {
             $html[] = ' nntoggler_nofx';
         }
         if ($method == 'and') {
             $html[] = ' nntoggler_and';
         }
         $html[] = '">';
         if (!$div) {
             $html[] = '<div><div>';
         }
     } else {
         $html[] = '</div>';
     }
     return implode('', $html);
 }
开发者ID:naka211,项目名称:kkvn,代码行数:54,代码来源:toggler.php



注:本文中的NNFrameworkFunctions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP NNParameters类代码示例发布时间:2022-05-23
下一篇:
PHP NIW_Controller类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap