| [ Index ] |
PHP Cross Reference of Joomla 2.5.4 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Joomla.Site 4 * @subpackage com_finder 5 * 6 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 7 * @license GNU General Public License version 2 or later; see LICENSE 8 */ 9 10 defined('_JEXEC') or die; 11 12 // Activate the highlighter if enabled. 13 if (!empty($this->query->highlight) && $this->params->get('highlight_terms', 1)) { 14 JHtml::_('behavior.highlighter', $this->query->highlight); 15 } 16 17 // Get the application object. 18 $app = JFactory::getApplication(); 19 20 // Display the suggested search if it is different from the current search. 21 if (($this->suggested && $this->params->get('show_suggested_query', 1)) || ($this->explained && $this->params->get('show_explained_query', 1))): 22 ?> 23 <div id="search-query-explained"> 24 <?php 25 // Display the suggested search query. 26 if ($this->suggested && $this->params->get('show_suggested_query', 1)) 27 { 28 // Replace the base query string with the suggested query string. 29 $uri = JUri::getInstance($this->query->toURI()); 30 $uri->setVar('q', $this->suggested); 31 32 // Compile the suggested query link. 33 $link = '<a href="' . JRoute::_($uri->toString(array('path', 'query'))) . '">' 34 . $this->escape($this->suggested) 35 . '</a>'; 36 37 echo JText::sprintf('COM_FINDER_SEARCH_SIMILAR', $link); 38 } 39 // Display the explained search query. 40 elseif ($this->explained && $this->params->get('show_explained_query', 1)) { 41 echo $this->explained; 42 } 43 ?> 44 </div> 45 <?php 46 endif; 47 48 if ($this->total == 0): 49 ?> 50 <div id="search-result-empty"> 51 <h2><?php echo JText::_('COM_FINDER_SEARCH_NO_RESULTS_HEADING'); ?></h2> 52 <?php if ($app->getLanguageFilter()) : ?> 53 <p><?php echo JText::sprintf('COM_FINDER_SEARCH_NO_RESULTS_BODY_MULTILANG', $this->escape($this->query->input)); ?></p> 54 <?php else : ?> 55 <p><?php echo JText::sprintf('COM_FINDER_SEARCH_NO_RESULTS_BODY', $this->escape($this->query->input)); ?></p> 56 <?php endif; ?> 57 </div> 58 <?php 59 else: 60 // Prepare the pagination string. Results X - Y of Z 61 $start = (int) $this->pagination->get('limitstart')+1; 62 $total = (int) $this->pagination->get('total'); 63 $limit = (int) $this->pagination->get('limit') * $this->pagination->get('pages.current'); 64 $limit = (int) ($limit > $total ? $total : $limit); 65 $pages = JText::sprintf('COM_FINDER_SEARCH_RESULTS_OF', $start, $limit, $total); 66 ?> 67 <br id="highlighter-start" /> 68 <dl class="search-results<?php echo $this->pageclass_sfx; ?>"> 69 <?php 70 for ($i = 0, $n = count($this->results); $i < $n; $i++): 71 $this->result = &$this->results[$i]; 72 $layout = $this->getLayoutFile($this->result->layout); 73 ?> 74 <?php echo $this->loadTemplate($layout); ?> 75 <?php 76 endfor; 77 ?> 78 </dl> 79 <br id="highlighter-end" /> 80 81 <div class="search-pagination"> 82 <div class="pagination"> 83 <?php echo $this->pagination->getPagesLinks(); ?> 84 </div> 85 <div class="search-pages-counter"> 86 <?php echo $pages; ?> 87 </div> 88 </div> 89 <?php 90 endif;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Apr 3 11:40:28 2012 | Cross-referenced by PHPXref 0.7.1 |