本文整理汇总了PHP中CKunenaTools::forumSelectList方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaTools::forumSelectList方法的具体用法?PHP CKunenaTools::forumSelectList怎么用?PHP CKunenaTools::forumSelectList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaTools
的用法示例。
在下文中一共展示了CKunenaTools::forumSelectList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
/**
* @version $Id$
* Kunena Component
* @package Kunena
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
defined('_JEXEC') or die;
$options = array();
$options[] = JHTML::_('select.option', '0', JText::_('COM_KUNENA_FORUM_TOP'));
$lists['parent'] = CKunenaTools::forumSelectList('forumjump', isset($this->catid) ? intval($this->catid) : 0, $options, 'class="inputbox fbs" size="1" onchange = "this.form.submit()"', true);
?>
<form id="jumpto" name="jumpto" method="post" target="_self" action="<?php
echo CKunenaLink::GetKunenaURL();
?>
">
<span class="kright">
<input type="hidden" name="func" value="showcat" />
<?php
echo $lists['parent'];
?>
<input type="submit" name="Go" class="kbutton ks" value="<?php
echo JText::_('COM_KUNENA_GO');
?>
" />
</span>
</form>
示例2: showBulkActionCats
function showBulkActionCats($disabled = 1)
{
$kunena_db =& JFactory::getDBO();
$options = array();
$options[] = JHTML::_('select.option', '0', JText::_('COM_KUNENA_BULK_CHOOSE_DESTINATION'));
$attr = 'class="inputbox fbs" size="1"' . ($disabled ? ' disabled="disabled" ' : "");
$lists['parent'] = CKunenaTools::forumSelectList('bulkactions', 0, $options, $attr);
echo $lists['parent'];
}
示例3: show
/**
* Display results
* @param string actionstring
*/
function show()
{
extract($this->params);
$this->quser = $this->get_searchusername();
$this->selected = ' selected="selected"';
$this->checked = ' checked="checked"';
$this->advsearch_hide = 1;
if ($this->int_kunena_errornr) {
$this->advsearch_hide = 0;
}
$this->tabclass = array("row1", "row2");
$searchdatelist = array();
$searchdatelist[] = JHTML::_('select.option', 'lastvisit', JText::_('COM_KUNENA_SEARCH_DATE_LASTVISIT'));
$searchdatelist[] = JHTML::_('select.option', '1', JText::_('COM_KUNENA_SEARCH_DATE_YESTERDAY'));
$searchdatelist[] = JHTML::_('select.option', '7', JText::_('COM_KUNENA_SEARCH_DATE_WEEK'));
$searchdatelist[] = JHTML::_('select.option', '14', JText::_('COM_KUNENA_SEARCH_DATE_2WEEKS'));
$searchdatelist[] = JHTML::_('select.option', '30', JText::_('COM_KUNENA_SEARCH_DATE_MONTH'));
$searchdatelist[] = JHTML::_('select.option', '90', JText::_('COM_KUNENA_SEARCH_DATE_3MONTHS'));
$searchdatelist[] = JHTML::_('select.option', '180', JText::_('COM_KUNENA_SEARCH_DATE_6MONTHS'));
$searchdatelist[] = JHTML::_('select.option', '365', JText::_('COM_KUNENA_SEARCH_DATE_YEAR'));
$searchdatelist[] = JHTML::_('select.option', 'all', JText::_('COM_KUNENA_SEARCH_DATE_ANY'));
$this->searchdatelist = JHTML::_('select.genericlist', $searchdatelist, 'searchdate', 'class="ks"', 'value', 'text', $this->params['searchdate']);
$beforeafterlist = array();
$beforeafterlist[] = JHTML::_('select.option', 'after', JText::_('COM_KUNENA_SEARCH_DATE_NEWER'));
$beforeafterlist[] = JHTML::_('select.option', 'before', JText::_('COM_KUNENA_SEARCH_DATE_OLDER'));
$this->beforeafterlist = JHTML::_('select.genericlist', $beforeafterlist, 'beforeafter', 'class="ks"', 'value', 'text', $this->params['beforeafter']);
$sortbylist = array();
$sortbylist[] = JHTML::_('select.option', 'title', JText::_('COM_KUNENA_SEARCH_SORTBY_TITLE'));
//$sortbylist[] = JHTML::_('select.option', 'replycount', JText::_('COM_KUNENA_SEARCH_SORTBY_POSTS') );
$sortbylist[] = JHTML::_('select.option', 'views', JText::_('COM_KUNENA_SEARCH_SORTBY_VIEWS'));
//$sortbylist[] = JHTML::_('select.option', 'threadstart', JText::_('COM_KUNENA_SEARCH_SORTBY_START') );
$sortbylist[] = JHTML::_('select.option', 'lastpost', JText::_('COM_KUNENA_SEARCH_SORTBY_POST'));
//$sortbylist[] = JHTML::_('select.option', 'postusername', JText::_('COM_KUNENA_SEARCH_SORTBY_USER') );
$sortbylist[] = JHTML::_('select.option', 'forum', JText::_('COM_KUNENA_SEARCH_SORTBY_FORUM'));
$this->sortbylist = JHTML::_('select.genericlist', $sortbylist, 'sortby', 'class="ks"', 'value', 'text', $this->params['sortby']);
$limitlist = array();
$limitlist[] = JHTML::_('select.option', '5', JText::_('COM_KUNENA_SEARCH_LIMIT5'));
$limitlist[] = JHTML::_('select.option', '10', JText::_('COM_KUNENA_SEARCH_LIMIT10'));
$limitlist[] = JHTML::_('select.option', '15', JText::_('COM_KUNENA_SEARCH_LIMIT15'));
$limitlist[] = JHTML::_('select.option', '20', JText::_('COM_KUNENA_SEARCH_LIMIT20'));
$this->limitlist = JHTML::_('select.genericlist', $limitlist, 'limit', 'class="ks"', 'value', 'text', $this->limit);
//category select list
$options = array();
$options[] = JHTML::_('select.option', '0', JText::_('COM_KUNENA_SEARCH_SEARCHIN_ALLCATS'));
$this->categorylist = CKunenaTools::forumSelectList('searchlist', explode(',', $this->params['catids']), $options, 'class="inputbox" size="8" multiple="multiple"', true);
CKunenaTools::loadTemplate('/search/advsearch.php');
$this->results = $this->get_results();
$this->pagination = $this->getPagination($this->func, $this->q, $this->getUrlParams(), floor($this->limitstart / $this->limit) + 1, $this->limit, floor($this->total / $this->limit) + 1, 7);
if (defined('KUNENA_DEBUG')) {
echo '<p style="background-color:#FFFFCC;border:1px solid red;">' . $this->str_kunena_errormsg . '</p>';
}
$searchlist = $this->get_searchstrings();
foreach ($this->results as $i => $result) {
// Clean up subject
$ressubject = KunenaParser::parseText($result->subject);
// Strip smiles and bbcode out of search results; they look ugly
$resmessage = KunenaParser::parseBBCode($result->message);
foreach ($searchlist as $searchword) {
if (empty($searchword)) {
continue;
}
$ressubject = preg_replace("/" . preg_quote($searchword, '/') . "/iu", '<span class="searchword" >' . $searchword . '</span>', $ressubject);
// FIXME: enable highlighting, but only after we can be sure that we do not break html
//$resmessage = preg_replace ( "/" . preg_quote ( $searchword, '/' ) . "/iu", '<span class="searchword" >' . $searchword . '</span>', $resmessage );
}
$this->results[$i]->htmlsubject = $ressubject;
$this->results[$i]->htmlmessage = $resmessage;
}
CKunenaTools::loadTemplate('/search/search.php');
}