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

PHP nnFrameworkFunctions类代码示例

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

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



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

示例1: 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:ranrolls,项目名称:ras-full-portal,代码行数:35,代码来源:geo.php


示例2: render

 function render(&$params)
 {
     jimport('joomla.filesystem.file');
     // Load plugin language
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
     nnFrameworkFunctions::loadLanguage('plg_system_nnframework');
     nnFrameworkFunctions::loadLanguage('plg_editors-xtd_sourcerer');
     nnFrameworkFunctions::loadLanguage('plg_system_sourcerer');
     $language = 'en';
     $locales = JFactory::getLanguage()->getLocale();
     foreach ($locales as $locale) {
         if (JFile::exists(JPATH_PLUGINS . '/editors-xtd/sourcerer/editarea/langs/' . $locale . '.js')) {
             $language = $locale;
             break;
         }
     }
     // Add scripts and styles
     JHtml::_('behavior.mootools');
     JFactory::getDocument()->addScript(JURI::root(true) . '/plugins/editors-xtd/sourcerer/editarea/edit_area_full.js');
     JHtml::script('sourcerer/script.min.js', false, true);
     $script = "\n\t\t\teditAreaLoader.init({\n\t\t\t\tid: 'source',\t// id of the textarea to transform\n\t\t\t\tstart_highlight: true,\t// if start with highlight\n\t\t\t\tallow_resize: 'y',\n\t\t\t\tallow_toggle: false,\n\t\t\t\tword_wrap: true,\n\t\t\t\tlanguage: '" . $language . "',\n\t\t\t\tsyntax: 'php',\n\t\t\t\ttoolbar: 'fullscreen, |, undo, redo, |, select_font, |, syntax_selection, |, highlight, reset_highlight, word_wrap',\n\t\t\t\tsyntax_selection_allow: 'css,html,js,php'\n\t\t\t});\n\n\t\t\tvar sourcerer_syntax_word = '" . $params->syntax_word . "';\n\t\t\tvar sourcerer_editorname = '" . JFactory::getApplication()->input->getString('name', 'text') . "';\n\t\t\tvar sourcerer_default_addsourcetags = " . (int) $params->addsourcetags . ";\n\t\t\tvar sourcerer_root = '" . JURI::root(true) . "';\n\n\t\t\twindow.addEvent( 'domready', function() { sourcerer_init(); });\n\t\t";
     JFactory::getDocument()->addScriptDeclaration($script);
     JHtml::stylesheet('nnframework/style.min.css', false, true);
     JHtml::stylesheet('nnframework/popup.min.css', false, true);
     JHtml::stylesheet('sourcerer/popup.min.css', false, true);
     $params->code = '<!-- You can place html anywhere within the source tags --><br /><br /><br /><script language=&quot;javascript&quot; type=&quot;text/javascript&quot;><br />    // You can place JavaScript like this<br />    <br /></script><br /><?php<br />    // You can place PHP like this<br />    <br />?>';
     $params->code = str_replace('<br />', "\n", $params->code);
     echo $this->getHTML($params);
 }
开发者ID:smart-one,项目名称:3kita,代码行数:29,代码来源:sourcerer.inc.php


示例3: 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:networksoft,项目名称:seekerplus2.com,代码行数:32,代码来源:flexicontent.php


示例4: getInput

 protected function getInput()
 {
     if (!nnFrameworkFunctions::extensionInstalled('akeebasubs')) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_AKEEBASUBS')) . '</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="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_AKEEBASUBS')) . '</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';
     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:educakanchay,项目名称:kanchay,代码行数:26,代码来源:akeebasubs.php


示例5: getInput

 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);
     }
 }
开发者ID:A-Bush,项目名称:pprod,代码行数:34,代码来源:mijoshop.php


示例6: 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;
     }
     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=articlesanywhere.inc.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,项目名称:studiekorrektur,代码行数:30,代码来源:helper.php


示例7: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     JHtml::_('jquery.framework');
     nnFrameworkFunctions::addScriptVersion(JURI::root(true) . '/media/nnframework/js/script.min.js');
     $file = $this->get('file');
     if (!$file) {
         $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)) . ')';
     } else {
         $label = $this->get('label', 'the main extension');
     }
     nnFieldDependency::setMessage($file, $label);
     return '';
 }
开发者ID:Raul-mz,项目名称:web-erpcya,代码行数:33,代码来源:dependency.php


示例8: 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);
     }
     $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);
 }
开发者ID:educakanchay,项目名称:kanchay,代码行数:30,代码来源:virtuemart.php


示例9: clean

 function clean()
 {
     if (!($type = $this->getCleanType())) {
         return;
     }
     // Load language for messaging
     nnFrameworkFunctions::loadLanguage('mod_cachecleaner');
     $this->purgeCache($type);
     $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:AlexanderKri,项目名称:joom-upd,代码行数:26,代码来源:helper.php


示例10: 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:ankaau,项目名称:GathBandhan,代码行数:8,代码来源:licenses.php


示例11: 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/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', '1');
     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:Raul-mz,项目名称:web-erpcya,代码行数:45,代码来源:helper.php


示例12: 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:jmangarret,项目名称:webtuagencia24,代码行数:55,代码来源:sourcerer.php


示例13: 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:Raul-mz,项目名称:web-erpcya,代码行数:54,代码来源:toggler.php


示例14: getInput

 function getInput($name, $id, $value, $params)
 {
     $this->name = $name;
     $this->id = $id;
     $this->value = $value;
     $this->params = $params;
     $class = trim('nn_color minicolors ' . $this->get('class'));
     $disabled = $this->get('disabled') ? ' disabled="disabled"' : '';
     nnFrameworkFunctions::addScriptVersion(JURI::root(true) . '/media/nnframework/js/color.min.js');
     $this->value = strtolower(strtoupper(preg_replace('#[^a-z0-9]#si', '', $this->value)));
     return '<input type="text" name="' . $this->name . '" id="' . $this->id . '" class="' . $class . '" value="' . $this->value . '"' . $disabled . '>';
 }
开发者ID:ankaau,项目名称:GathBandhan,代码行数:12,代码来源:color.php


示例15: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     JHtml::_('jquery.framework');
     nnFrameworkFunctions::addScriptVersion(JURI::root(true) . '/media/nnframework/js/script.min.js');
     $loading = "jQuery(\"#" . $this->id . "\").find(\"span\").attr(\"class\", \"icon-refresh icon-spin\")";
     $success = "jQuery(\"#" . $this->id . "\").find(\"span\").attr(\"class\", \"icon-ok\")";
     $error = "jQuery(\"#" . $this->id . "\").find(\"span\").attr(\"class\", \"icon-warning\");" . "jQuery(\"#message_" . $this->id . "\").addClass(\"alert alert-danger alert-inline\").html(data);";
     $script = "\n\t\t\tfunction loadAjax" . $this->id . "() {\n\t\t\t\t" . $loading . ";\n\t\t\t\tjQuery(\"#message_" . $this->id . "\").attr(\"class\", \"\").html(\"\");\n\t\t\t\tnnScripts.loadajax(\n\t\t\t\t\t'" . addslashes($this->get('url')) . "',\n\t\t\t\t\t'if(data == \"\") { " . $success . " } else { " . $error . " }',\n\t\t\t\t\t'" . $error . "'\n\t\t\t\t);\n\t\t\t}\n\t\t";
     JFactory::getDocument()->addScriptDeclaration($script);
     return '<button id="' . $this->id . '" class="btn" title="' . JText::_($this->get('description')) . '" onclick="loadAjax' . $this->id . '();return false;">' . '<span class="' . $this->get('icon', '') . '"></span> ' . JText::_($this->get('text', $this->get('label'))) . '</button>' . '<div id="message_' . $this->id . '"></div>';
 }
开发者ID:Raul-mz,项目名称:web-erpcya,代码行数:12,代码来源:ajax.php


示例16: getInput

 function getInput($name, $id, $value, $params)
 {
     $this->name = $name;
     $this->id = $id;
     $this->value = $value;
     $this->params = $params;
     $action = '';
     if ($this->get('inlist', 0) && $this->get('action')) {
         $this->name = $name . $id;
         $this->id = $name . $id;
         $action = ' onchange="' . $this->get('action') . '"';
     }
     JHtml::stylesheet('nnframework/colorpicker.min.css', false, true);
     nnFrameworkFunctions::addScriptVersion(JURI::root(true) . '/media/nnframework/js/colorpicker.min.js');
     $class = ' class="' . trim('nncolorpicker chzn-done ' . $this->get('class')) . '"';
     $color = strtolower($this->value);
     if (!$color || in_array($color, array('none', 'transparent'))) {
         $color = 'none';
     } else {
         if ($color['0'] != '#') {
             $color = '#' . $color;
         }
     }
     $colors = $this->get('colors');
     if (empty($colors)) {
         $colors = array('none', '#049cdb', '#46a546', '#9d261d', '#ffc40d', '#f89406', '#c3325f', '#7a43b6', '#ffffff', '#999999', '#555555', '#000000');
     } else {
         $colors = explode(',', $colors);
     }
     $split = (int) $this->get('split');
     if (!$split) {
         $count = count($colors);
         if ($count % 5 == 0) {
             $split = 5;
         } else {
             if ($count % 4 == 0) {
                 $split = 4;
             }
         }
     }
     $split = $split ? $split : 3;
     $html = array();
     $html[] = '<select ' . $action . ' name="' . $this->name . '" id="' . $this->id . '"' . $class . ' style="visibility:hidden;width:22px;height:1px">';
     foreach ($colors as $i => $c) {
         $html[] = '<option' . ($c == $color ? ' selected="selected"' : '') . '>' . $c . '</option>';
         if (($i + 1) % $split == 0) {
             $html[] = '<option>-</option>';
         }
     }
     $html[] = '</select>';
     return implode('', $html);
 }
开发者ID:01J,项目名称:bealtine,代码行数:52,代码来源:colorpicker.php


示例17: replaceLinksInCoreModuleManager

 private function replaceLinksInCoreModuleManager()
 {
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
     nnFrameworkFunctions::loadLanguage('com_advancedmodules');
     $body = JResponse::getBody();
     $url = 'index.php?option=com_advancedmodules';
     if (JFactory::getApplication()->input->get('view') == 'module') {
         $url .= '&task=module.edit&id=' . (int) JFactory::getApplication()->input->get('id');
     }
     $link = '<a style="float:right;" href="' . JRoute::_($url) . '">' . JText::_('AMM_SWITCH_TO_ADVANCED_MODULE_MANAGER') . '</a><div style="clear:both;"></div>';
     $body = preg_replace('#(</script>\\s*)(<form)#', '\\1' . $link . '\\2', $body);
     $body = preg_replace('#(</form>\\s*)((<\\!--.*?-->\\s*)*</div>)#', '\\1' . $link . '\\2', $body);
     JResponse::setBody($body);
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:14,代码来源:helper.php


示例18: render

 function render()
 {
     if (!isset($this->params->display_link)) {
         return;
     }
     // load the admin language file
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
     nnFrameworkFunctions::loadLanguage('mod_cachecleaner');
     JHtml::stylesheet('nnframework/style.min.css', false, true);
     JFactory::getDocument()->addScriptVersion(JURI::root(true) . '/media/nnframework/js/script.min.js');
     $script = "\n\t\t\tvar cachecleaner_base = '" . JURI::base(true) . "';\n\t\t\tvar cachecleaner_root = '" . JURI::root() . "';\n\t\t\tvar cachecleaner_msg_clean = '" . addslashes(html_entity_decode(JText::_('CC_CLEANING_CACHE'))) . "';\n\t\t\tvar cachecleaner_msg_inactive = '" . addslashes(html_entity_decode(JText::_('CC_SYSTEM_PLUGIN_NOT_ENABLED'))) . "';\n\t\t\tvar cachecleaner_msg_failure = '" . addslashes(html_entity_decode(JText::_('CC_CACHE_COULD_NOT_BE_CLEANED'))) . "';";
     JFactory::getDocument()->addScriptDeclaration($script);
     JHtml::stylesheet('cachecleaner/style.min.css', false, true);
     JHtml::script('cachecleaner/script.min.js', false, true);
     $text_ini = strtoupper(str_replace(' ', '_', $this->params->icon_text));
     $text = JText::_($text_ini);
     if ($text == $text_ini) {
         $text = JText::_($this->params->icon_text);
     }
     if ($this->params->display_toolbar_button) {
         // Generate html for toolbar button
         $html = array();
         $html[] = '<a href="javascript://" onclick="return false;"  class="btn btn-small cachecleaner_link">';
         $html[] = '<span class="icon-nonumber icon-cachecleaner"></span> ';
         $html[] = $text;
         $html[] = '</a>';
         $toolbar = JToolBar::getInstance('toolbar');
         $toolbar->appendButton('Custom', implode('', $html));
     }
     // Generate html for status link
     $html = array();
     $html[] = '<div class="btn-group cachecleaner">';
     $html[] = '<a href="javascript://" onclick="return false;" class="cachecleaner_link">';
     if ($this->params->display_link != 'text') {
         $html[] = '<span class="icon-nonumber icon-cachecleaner"></span> ';
     }
     if ($this->params->display_link != 'icon') {
         $html[] = $text;
     }
     $html[] = '</a>';
     $html[] = '</div>';
     echo implode('', $html);
 }
开发者ID:AlexanderKri,项目名称:joom-upd,代码行数:43,代码来源:helper.php


示例19: missingFilesOrTables

 public function missingFilesOrTables($tables = array('categories', 'items'), $component = '', $table_prefix = '')
 {
     $component = $component ?: $this->type;
     if (!nnFrameworkFunctions::extensionInstalled(strtolower($component))) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_' . strtoupper($component))) . '</fieldset>';
     }
     $group = $this->getGroup();
     if (!in_array($group, $tables) && !in_array($group, array_keys($tables))) {
         // no need to check database table for this group
         return false;
     }
     $table_list = $this->db->getTableList();
     $table = isset($tables[$group]) ? $tables[$group] : $group;
     $table = $this->db->getPrefix() . strtolower($table_prefix ?: $component) . '_' . $table;
     if (in_array($table, $table_list)) {
         // database table exists, so no error
         return false;
     }
     return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_' . strtoupper($component))) . '</fieldset>';
 }
开发者ID:01J,项目名称:bealtine,代码行数:20,代码来源:groupfield.php


示例20: render

 function render(&$params)
 {
     jimport('joomla.filesystem.file');
     // Load plugin language
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
     nnFrameworkFunctions::loadLanguage('plg_system_nnframework');
     nnFrameworkFunctions::loadLanguage('plg_editors-xtd_sourcerer');
     nnFrameworkFunctions::loadLanguage('plg_system_sourcerer');
     JHtml::stylesheet('nnframework/style.min.css', false, true);
     nnFrameworkFunctions::addScriptVersion(JURI::root(true) . '/media/nnframework/js/script.min.js');
     JFactory::getDocument()->addStyleSheet('//code.jquery.com/ui/1.9.2/themes/smoothness/jquery-ui.css');
     JFactory::getDocument()->addScript('//code.jquery.com/ui/1.9.2/jquery-ui.js');
     $script = "\n\t\t\tvar sourcerer_syntax_word = '" . $params->syntax_word . "';\n\t\t\tvar sourcerer_editorname = '" . JFactory::getApplication()->input->getString('name', 'text') . "';\n\t\t\tvar sourcerer_default_addsourcetags = " . (int) $params->addsourcetags . ";\n\t\t\tvar sourcerer_root = '" . JURI::root(true) . "';\n\t\t";
     JFactory::getDocument()->addScriptDeclaration($script);
     JHtml::stylesheet('sourcerer/popup.min.css', false, true);
     JHtml::script('sourcerer/script.min.js', false, true);
     $params->code = '<!-- You can place html anywhere within the source tags --><br /><br /><br /><script language=&quot;javascript&quot; type=&quot;text/javascript&quot;><br />    // You can place JavaScript like this<br />    <br /></script><br /><?php<br />    // You can place PHP like this<br />    <br />?>';
     $params->code = str_replace('<br />', "\n", $params->code);
     echo $this->getHTML($params);
 }
开发者ID:ankaau,项目名称:GathBandhan,代码行数:20,代码来源:sourcerer.inc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP nnHTML类代码示例发布时间:2022-05-23
下一篇:
PHP nggdb类代码示例发布时间: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