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

PHP NNText类代码示例

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

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



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

示例1: getInput

	protected function getInput()
	{
		$this->params = $this->element->attributes();

		$label = $this->get('label');
		$format = $this->get('format');

		$date = JFactory::getDate();

		$tz = new DateTimeZone(JFactory::getApplication()->getCfg('offset'));
		$date->setTimeZone($tz);

		if ($format)
		{
			if (strpos($format, '%') !== false)
			{
				require_once JPATH_PLUGINS . '/system/nnframework/helpers/text.php';
				$format = NNText::dateToDateFormat($format);
			}
			$html = $date->format($format, 1);
		}
		else
		{
			$html = $date->format('', 1);
		}

		if ($label)
		{
			$html = JText::sprintf($label, $html);
		}

		return '<div class="nn_block nn_title">' . $html . '</div>';
	}
开发者ID:sergy444,项目名称:joomla,代码行数:33,代码来源:datetime.php


示例2: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     JHtml::stylesheet('nnframework/style.min.css', false, true);
     require_once __DIR__ . '/toggler.php';
     $toggler = new nnFieldToggler();
     $this->value = (int) $this->value;
     $label = $this->def('label');
     $param_name = $this->def('name');
     $noshow = $this->def('noshow', 0);
     $showclose = $this->def('showclose', 0);
     $html = array();
     if ($label) {
         $label = NNText::html_entity_decoder(JText::_($label));
         $html[] = '</div>';
         if (!$noshow) {
             $html[] = $toggler->getInput(array('div' => 1, 'param' => 'show_assignments|' . $param_name, 'value' => '1|1,2'));
         }
         $class = 'well well-small nn_well';
         if ($this->value === 1) {
             $class .= ' alert-success';
         } else {
             if ($this->value === 2) {
                 $class .= ' alert-error';
             }
         }
         $html[] = '<div class="' . $class . '">';
         if ($showclose && JFactory::getUser()->authorise('core.admin')) {
             $html[] = '<button type="button" class="close nn_remove_assignment">&times;</button>';
         }
         $html[] = '<div class="control-group">';
         $html[] = '<div class="control-label">';
         $html[] = '<label><h4 class="nn_assignmentselection-header">' . $label . '</h4></label>';
         $html[] = '</div>';
         $html[] = '<div class="controls">';
         $html[] = '<fieldset id="' . $this->id . '"  class="radio btn-group">';
         $onclick = ' onclick="nnScripts.setToggleTitleClass(this, 0)"';
         $html[] = '<input type="radio" id="' . $this->id . '0" name="' . $this->name . '" value="0"' . (!$this->value ? ' checked="checked"' : '') . $onclick . '/>';
         $html[] = '<label class="nn_btn-ignore" for="' . $this->id . '0">' . JText::_('NN_IGNORE') . '</label>';
         $onclick = ' onclick="nnScripts.setToggleTitleClass(this, 1)"';
         $html[] = '<input type="radio" id="' . $this->id . '1" name="' . $this->name . '" value="1"' . ($this->value === 1 ? ' checked="checked"' : '') . $onclick . '/>';
         $html[] = '<label class="nn_btn-include" for="' . $this->id . '1">' . JText::_('NN_INCLUDE') . '</label>';
         $onclick = ' onclick="nnScripts.setToggleTitleClass(this, 2)"';
         $onclick .= ' onload="nnScripts.setToggleTitleClass(this, ' . $this->value . ', 7)"';
         $html[] = '<input type="radio" id="' . $this->id . '2" name="' . $this->name . '" value="2"' . ($this->value === 2 ? ' checked="checked"' : '') . $onclick . '/>';
         $html[] = '<label class="nn_btn-exclude" for="' . $this->id . '2">' . JText::_('NN_EXCLUDE') . '</label>';
         $html[] = '</fieldset>';
         $html[] = '</div>';
         $html[] = '</div>';
         $html[] = '<div class="clearfix"> </div>';
         $html[] = $toggler->getInput(array('div' => 1, 'param' => $param_name, 'value' => '1,2'));
         $html[] = '<div><div>';
     } else {
         if (!$noshow) {
             $html[] = $toggler->getInput(array('div' => 1));
         }
         $html[] = $toggler->getInput(array('div' => 1));
     }
     return '</div>' . implode('', $html);
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:60,代码来源:assignmentselection.php


示例3: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     $this->db = JFactory::getDbo();
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $group = $this->def('group', 'countries');
     $options = array();
     foreach ($this->{$group} as $key => $val) {
         if (!$val) {
             $options[] = JHtml::_('select.option', '-', '&nbsp;', 'value', 'text', true);
         } else {
             if ($key['0'] == '-') {
                 $options[] = JHtml::_('select.option', '-', $val, 'value', 'text', true);
             } else {
                 $val = NNText::prepareSelectItem($val);
                 $options[] = JHtml::_('select.option', $key, $val);
             }
         }
     }
     $attr = '';
     $attr .= $this->def('size') ? ' size="' . (int) $this->def('size') . '"' : '';
     $attr .= $this->def('multiple') ? ' multiple="multiple"' : '';
     return JHtml::_('select.genericlist', $options, $this->name . '[]', trim($attr), 'value', 'text', $this->value, $this->id);
 }
开发者ID:sillysachin,项目名称:teamtogether,代码行数:26,代码来源:geo.php


示例4: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $group = $this->get('group', 'countries');
     $options = array();
     foreach ($this->{$group} as $key => $val) {
         if (!$val) {
             $options[] = JHtml::_('select.option', '-', '&nbsp;', 'value', 'text', true);
         } else {
             if ($key['0'] == '-') {
                 $options[] = JHtml::_('select.option', '-', $val, 'value', 'text', true);
             } else {
                 $val = NNText::prepareSelectItem($val);
                 $options[] = JHtml::_('select.option', $key, $val);
             }
         }
     }
     $size = (int) $this->get('size');
     $multiple = $this->get('multiple');
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
     return NNHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple);
 }
开发者ID:jputz12,项目名称:OneNow-Vshop,代码行数:25,代码来源:geo.php


示例5: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     $root = $this->def('root', 'USERS');
     $size = (int) $this->def('size');
     $multiple = $this->def('multiple');
     $show_all = $this->def('show_all');
     $attribs = 'class="inputbox"';
     $groups = $this->getUserGroups();
     $options = array();
     if ($show_all) {
         $option = new stdClass();
         $option->value = -1;
         $option->text = '- ' . JText::_('JALL') . ' -';
         $option->disable = '';
         $options[] = $option;
     }
     foreach ($groups as $group) {
         $option = new stdClass();
         $option->value = $group->id;
         $option->text = $group->title;
         $repeat = $show_all ? $group->level + 1 : $group->level;
         $option->text = str_repeat('- ', $repeat) . $option->text;
         $option->text = NNText::prepareSelectItem($option->text);
         $option->disable = '';
         $options[] = $option;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
     return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple, $attribs);
 }
开发者ID:brojask,项目名称:colegio-abogados-joomla,代码行数:30,代码来源:grouplevel.php


示例6: fixLanguageStringSyntax

 public function fixLanguageStringSyntax($string = '')
 {
     $string = trim(NNText::html_entity_decoder($string));
     $string = str_replace('&quot;', '"', $string);
     $string = str_replace('span style="font-family:monospace;"', 'span class="nn_code"', $string);
     return $string;
 }
开发者ID:esorone,项目名称:efcpw,代码行数:7,代码来源:radio.php


示例7: onAfterRender

 public function onAfterRender()
 {
     // only in html and feeds
     if (JFactory::getDocument()->getType() !== 'html' && JFactory::getDocument()->getType() !== 'feed') {
         return;
     }
     $html = JResponse::getBody();
     if ($html == '') {
         return;
     }
     if (JFactory::getDocument()->getType() != 'html') {
         $this->helpers->get('replace')->replaceTags($html, 'body');
         $this->helpers->get('clean')->cleanLeftoverJunk($html);
         JResponse::setBody($html);
         return;
     }
     // only do stuff in body
     list($pre, $body, $post) = NNText::getBody($html);
     $this->helpers->get('replace')->replaceTags($body, 'body');
     $html = $pre . $body . $post;
     $this->helpers->get('clean')->cleanLeftoverJunk($html);
     // replace head with newly generated head
     // this is necessary because the plugins might have added scripts/styles to the head
     $this->helpers->get('head')->updateHead($html);
     JResponse::setBody($html);
 }
开发者ID:naka211,项目名称:malerfirmaet,代码行数:26,代码来源:helper.php


示例8: getInput

	protected function getInput()
	{
		$this->params = $this->element->attributes();

		require_once __DIR__ . '/toggler.php';
		$toggler = new nnFieldToggler;

		$this->value = (int) $this->value;
		$label = $this->get('label');
		$param_name = $this->get('name');

		$html = array();

		if ($label)
		{
			$label = NNText::html_entity_decoder(JText::_($label));

			$html[] = '<div style="clear: both;"></div>';

			$class = 'nn_panel nn_panel_title nn_panel_toggle';
			$checked = '';
			if ($this->value === 1)
			{
				$class .= ' nn_panel_include';
				$checked = ' checked="checked"';
			}
			else if ($this->value === 2)
			{
				$class .= ' nn_panel_exclude';
				$checked = ' checked="checked"';
			}
			$html[] = '<div class="' . $class . '"><label class="nn_block nn_title" for="cb_' . $param_name . '">';
			$html[] = '<input id="' . $this->id . '" name="' . $this->name . '" value="1" type="checkbox" class="checkbox"'
				. ' onclick="nnScripts.setToggleTitleClass(this, this.checked, 2);"' . $checked . '>';
			$html[] = $label;
			$html[] = '<div style="clear: both;"></div>';
			$html[] = '</label></div>';

			$html[] = $toggler->getInput(array('div' => 1, 'param' => $param_name, 'value' => '1,2'));
			$html[] = '<div class="nn_panel nn_panel"><div class="nn_block">';

			$html[] = '<ul class="adminformlist"><li>';
		}
		else
		{
			$html[] = '<div style="clear: both;"></div>';
			$html[] = '</li></ul>';

			$html[] = '<div style="clear: both;"></div>';
			$html[] = '</div></div>';

			$html[] = $toggler->getInput(array('div' => 1));
		}

		return implode($html);
	}
开发者ID:sergy444,项目名称:joomla,代码行数:56,代码来源:titleselection.php


示例9: getCategories

 function getCategories()
 {
     $query = $this->db->getQuery(true)->select('COUNT(*)')->from('#__zoo_category AS c')->where('c.published > -1');
     $this->db->setQuery($query);
     $total = $this->db->loadResult();
     if ($total > $this->max_list_count) {
         return -1;
     }
     $options = array();
     if ($this->get('show_ignore')) {
         if (in_array('-1', $this->value)) {
             $this->value = array('-1');
         }
         $options[] = JHtml::_('select.option', '-1', '- ' . JText::_('NN_IGNORE') . ' -', 'value', 'text', 0);
         $options[] = JHtml::_('select.option', '-', '&nbsp;', 'value', 'text', 1);
     }
     $query->clear()->select('a.id, a.name')->from('#__zoo_application AS a')->order('a.name, a.id');
     $this->db->setQuery($query);
     $apps = $this->db->loadObjectList();
     foreach ($apps as $i => $app) {
         $query->clear()->select('c.id, c.parent AS parent_id, c.name AS title, c.published')->from('#__zoo_category AS c')->where('c.application_id = ' . (int) $app->id)->where('c.published > -1')->order('c.ordering, c.name');
         $this->db->setQuery($query);
         $items = $this->db->loadObjectList();
         if ($i) {
             $options[] = JHtml::_('select.option', '-', '&nbsp;', 'value', 'text', 1);
         }
         // establish the hierarchy of the menu
         // TODO: use node model
         $children = array();
         if ($items) {
             // first pass - collect children
             foreach ($items as $v) {
                 $pt = $v->parent_id;
                 $list = @$children[$pt] ? $children[$pt] : array();
                 array_push($list, $v);
                 $children[$pt] = $list;
             }
         }
         // second pass - get an indent list of the items
         $list = JHtml::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0);
         // assemble items to the array
         $options[] = JHtml::_('select.option', 'app' . $app->id, '[' . $app->name . ']', 'value', 'text', 0);
         foreach ($list as $item) {
             $item->treename = '  ' . str_replace('&#160;&#160;- ', '  ', $item->treename);
             $item->treename = NNText::prepareSelectItem($item->treename, $item->published);
             $option = JHtml::_('select.option', $item->id, $item->treename, 'value', 'text', 0);
             $option->level = 1;
             $options[] = $option;
         }
     }
     return $options;
 }
开发者ID:naka211,项目名称:kkvn,代码行数:52,代码来源:zoo.php


示例10: getLevels

 function getLevels()
 {
     $query = $this->db->getQuery(true)->select('l.akeebasubs_level_id as id, l.title AS name, l.enabled as published')->from('#__akeebasubs_levels AS l')->where('l.enabled > -1')->order('l.title, l.akeebasubs_level_id');
     $this->db->setQuery($query);
     $list = $this->db->loadObjectList();
     // assemble items to the array
     $options = array();
     foreach ($list as $item) {
         $item->name = NNText::prepareSelectItem($item->name, $item->published);
         $options[] = JHtml::_('select.option', $item->id, $item->name, 'value', 'text', 0);
     }
     return $options;
 }
开发者ID:greyhat777,项目名称:vuslinterliga,代码行数:13,代码来源:akeebasubs.php


示例11: getLabel

 protected function getLabel()
 {
     $this->params = $this->element->attributes();
     $label = NNText::html_entity_decoder(JText::_($this->get('label')));
     $html = '<label id="' . $this->id . '-lbl" for="' . $this->id . '"';
     if ($this->description) {
         $html .= ' class="hasTooltip" title="<strong>' . $label . '</strong><br />' . JText::_($this->description) . '">';
     } else {
         $html .= '>';
     }
     $html .= $label . '</label>';
     return $html;
 }
开发者ID:jputz12,项目名称:OneNow-Vshop,代码行数:13,代码来源:textareaplus.php


示例12: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     JHtml::stylesheet('nnframework/style.min.css', false, true);
     $label = NNText::html_entity_decoder(JText::_($this->get('label')));
     $description = $this->prepareText($this->get('description'));
     $lang_file = $this->get('language_file');
     $html = '</td></tr></table></div></div>';
     $html .= '<div class="panel"><h3 class="jpane-toggler title" id="advanced-page"><span>';
     $html .= $label;
     $html .= '</span></h3>';
     $html .= '<div class="jpane-slider content"><table width="100%" class="paramlist admintable" cellspacing="1"><tr><td colspan="2" class="paramlist_value">';
     if ($lang_file) {
         jimport('joomla.filesystem.file');
         // Include extra language file
         $lang = str_replace('_', '-', JFactory::getLanguage()->getTag());
         $inc = '';
         $lang_path = 'language/' . $lang . '/' . $lang . '.' . $lang_file . '.inc.php';
         if (JFile::exists(JPATH_ADMINISTRATOR . '/' . $lang_path)) {
             $inc = JPATH_ADMINISTRATOR . '/' . $lang_path;
         } else {
             if (JFile::exists(JPATH_SITE . '/' . $lang_path)) {
                 $inc = JPATH_SITE . '/' . $lang_path;
             }
         }
         if (!$inc && $lang != 'en-GB') {
             $lang = 'en-GB';
             $lang_path = 'language/' . $lang . '/' . $lang . '.' . $lang_file . '.inc.php';
             if (JFile::exists(JPATH_ADMINISTRATOR . '/' . $lang_path)) {
                 $inc = JPATH_ADMINISTRATOR . '/' . $lang_path;
             } else {
                 if (JFile::exists(JPATH_SITE . '/' . $lang_path)) {
                     $inc = JPATH_SITE . '/' . $lang_path;
                 }
             }
         }
         if ($inc) {
             include $inc;
         }
     }
     if ($description) {
         if ($description['0'] != '<') {
             $description = '<p>' . $description . '</p>';
         }
         $class = 'nn_panel nn_panel_description';
         $html .= '<div class="' . $class . '"><div class="nn_block nn_title">';
         $html .= $description;
         $html .= '<div style="clear: both;"></div></div></div>';
     }
     return $html;
 }
开发者ID:esorone,项目名称:efcpw,代码行数:51,代码来源:slide.php


示例13: getTitleBlock

 private function getTitleBlock($title = '', $description = '', $start = 0)
 {
     $nostyle = $this->def('nostyle', 0);
     if ($title) {
         $title = NNText::html_entity_decoder(JText::_($title));
     }
     if ($description) {
         // variables
         $v1 = JText::_($this->def('var1'));
         $v2 = JText::_($this->def('var2'));
         $v3 = JText::_($this->def('var3'));
         $v4 = JText::_($this->def('var4'));
         $v5 = JText::_($this->def('var5'));
         $description = NNText::html_entity_decoder(trim(JText::sprintf($description, $v1, $v2, $v3, $v4, $v5)));
         $description = str_replace('span style="font-family:monospace;"', 'span class="nn_code"', $description);
     }
     $html = array();
     if ($title) {
         if ($nostyle) {
             $html[] = '<div style="clear:both;"><div>';
         } else {
             $class = 'nn_panel nn_panel_title';
             if ($start || $description) {
                 $class .= ' nn_panel_top';
             }
             $html[] = '<div class="' . $class . '"><div class="nn_block nn_title">';
         }
         $html[] = $title;
         $html[] = '<div style="clear: both;"></div>';
         $html[] = '</div></div>';
     }
     if ($description) {
         if ($nostyle) {
             $html[] = '<div style="clear:both;"><div>';
         } else {
             $class = 'nn_panel nn_panel_description';
             if ($start) {
                 $class .= ' nn_panel_top';
             }
             if ($title) {
                 $class .= ' nn_panel_hastitle';
             }
             $html[] = '<div class="' . $class . '"><div class="nn_block nn_title">';
         }
         $html[] = $description;
         $html[] = '<div style="clear: both;"></div>';
         $html[] = '</div></div>';
     }
     return implode('', $html);
 }
开发者ID:brojask,项目名称:colegio-abogados-joomla,代码行数:50,代码来源:block.php


示例14: getItems

 function getItems()
 {
     $query = $this->db->getQuery(true)->select('i.id, i.title as name, c.title as cat, i.access as published')->from('#__content AS i')->join('LEFT', '#__categories AS c ON c.id = i.catid')->where('i.access > -1')->order('i.title, i.ordering, i.id');
     $this->db->setQuery($query);
     $list = $this->db->loadObjectList();
     // assemble items to the array
     $options = array();
     foreach ($list as $item) {
         $item->name = $item->name . ' [' . $item->id . ']' . ($item->cat ? ' [' . $item->cat . ']' : '');
         $item->name = NNText::prepareSelectItem($item->name, $item->published);
         $options[] = JHtml::_('select.option', $item->id, $item->name, 'value', 'text', 0);
     }
     return $options;
 }
开发者ID:greyhat777,项目名称:vuslinterliga,代码行数:14,代码来源:content.php


示例15: replace

 public function replace(&$string, &$match, $art = null)
 {
     $groups = explode('|', $match['4']);
     $match['4'] = trim(array_shift($groups));
     $ignores = array();
     foreach ($groups as $group) {
         if (strpos($group, '=') === false) {
             continue;
         }
         $this->helpers->get('process')->getIgnoreSetting($ignores, $group);
     }
     $html = $this->helpers->get('process')->processMatch($string, $art, $match, $ignores);
     $string = NNText::strReplaceOnce($match['0'], $html, $string);
 }
开发者ID:naka211,项目名称:kkvn,代码行数:14,代码来源:article.php


示例16: prepareText

 private function prepareText($str = '')
 {
     if ($str == '') {
         return '';
     }
     // variables
     $v1 = JText::_($this->def('var1'));
     $v2 = JText::_($this->def('var2'));
     $v3 = JText::_($this->def('var3'));
     $v4 = JText::_($this->def('var4'));
     $v5 = JText::_($this->def('var5'));
     $str = JText::sprintf(JText::_($str), $v1, $v2, $v3, $v4, $v5);
     $str = trim(NNText::html_entity_decoder($str));
     $str = str_replace('&quot;', '"', $str);
     $str = str_replace('span style="font-family:monospace;"', 'span class="nn_code"', $str);
     return $str;
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:17,代码来源:plaintext.php


示例17: prepareText

 private function prepareText($string = '')
 {
     $string = trim($string);
     if ($string == '') {
         return '';
     }
     // variables
     $var1 = JText::_($this->get('var1'));
     $var2 = JText::_($this->get('var2'));
     $var3 = JText::_($this->get('var3'));
     $var4 = JText::_($this->get('var4'));
     $var5 = JText::_($this->get('var5'));
     $string = JText::sprintf(JText::_($string), $var1, $var2, $var3, $var4, $var5);
     $string = trim(NNText::html_entity_decoder($string));
     $string = str_replace('&quot;', '"', $string);
     $string = str_replace('span style="font-family:monospace;"', 'span class="nn_code"', $string);
     return $string;
 }
开发者ID:naka211,项目名称:kkvn,代码行数:18,代码来源:password.php


示例18: getLabel

 protected function getLabel()
 {
     $this->params = $this->element->attributes();
     $resize = $this->get('resize', 0);
     $label = NNText::html_entity_decoder(JText::_($this->get('label')));
     $html = '<label id="' . $this->id . '-lbl" for="' . $this->id . '"';
     if ($this->description) {
         $html .= ' class="hasTooltip" title="<strong>' . $label . '</strong><br />' . JText::_($this->description) . '">';
     } else {
         $html .= '>';
     }
     $html .= $label;
     if ($resize) {
         JHtml::_('jquery.framework');
         NNFrameworkFunctions::addScriptVersion(JUri::root(true) . '/media/nnframework/js/script.min.js');
         JHtml::stylesheet('nnframework/style.min.css', false, true);
         $html .= '<br /><span role="button" class="nn_resize_textarea nn_maximize"' . ' data-id="' . $this->id . '"  data-min="' . $this->get('height', 80) . '" data-max="' . $resize . '">' . '<span class="nn_resize_textarea_maximize">' . '[ + ]' . '</span>' . '<span class="nn_resize_textarea_minimize">' . '[ - ]' . '</span>' . '</span>';
     }
     $html .= '</label>';
     return $html;
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:21,代码来源:textareaplus.php


示例19: replace

 public function replace(&$string, &$match, $art = null)
 {
     // Check for categories...
     $groups = explode('|', $match['4']);
     $data = array();
     $ignores = array();
     foreach ($groups as $group) {
         if (!($set_data = $this->getDataByGroup($group, $ignores))) {
             continue;
         }
         $data[] = $set_data;
     }
     $ids = array();
     foreach ($data as $dat) {
         $ids = array_merge($ids, $this->getArticleIdsByData($dat, $ignores));
     }
     $html = array();
     $total = count($ids);
     $this->helpers->get('tags')->data->article = $art;
     $this->helpers->get('tags')->data->total = $total;
     // Process empty category to allow for {if:empty} result
     if (!$total) {
         $data = $match;
         $data['4'] = 0;
         $html[] = $this->processMatch($string, $art, $data, $ignores);
     }
     // Process articles from category
     foreach ($ids as $i => $id) {
         $data = $match;
         $data['4'] = trim($id);
         $count = $i + 1;
         $this->helpers->get('tags')->data->count = $count;
         $this->helpers->get('tags')->data->even = !($count % 2);
         $this->helpers->get('tags')->data->uneven = $count % 2;
         $this->helpers->get('tags')->data->first = $count == 1;
         $this->helpers->get('tags')->data->last = $count >= $total;
         $html[] = $this->processMatch($string, $art, $data, $ignores);
     }
     $string = NNText::strReplaceOnce($match['0'], implode('', $html), $string);
 }
开发者ID:naka211,项目名称:kkvn,代码行数:40,代码来源:articles.php


示例20: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     $label = $this->get('label');
     $format = $this->get('format');
     $date = JFactory::getDate();
     $tz = new DateTimeZone(JFactory::getApplication()->getCfg('offset'));
     $date->setTimeZone($tz);
     if ($format) {
         if (strpos($format, '%') !== false) {
             require_once dirname(__DIR__) . '/helpers/text.php';
             $format = NNText::dateToDateFormat($format);
         }
         $html = $date->format($format, true);
     } else {
         $html = $date->format('', true);
     }
     if ($label) {
         $html = JText::sprintf($label, $html);
     }
     return '</div><div>' . $html;
 }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:22,代码来源:datetime.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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