<?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>
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']; }
/** * 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'); }