| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: pagination.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 6 * @license GNU/GPL, see LICENSE.php 7 * Joomla! is free software. This version may have been modified pursuant 8 * to the GNU General Public License, and as distributed it includes or 9 * is derivative of works licensed under the GNU General Public License or 10 * other free or open source software licenses. 11 * See COPYRIGHT.php for copyright notices and details. 12 */ 13 14 // no direct access 15 defined('_JEXEC') or die('Restricted access'); 16 17 /** 18 * This is a file to add template specific chrome to pagination rendering. 19 * 20 * pagination_list_footer 21 * Input variable $list is an array with offsets: 22 * $list[limit] : int 23 * $list[limitstart] : int 24 * $list[total] : int 25 * $list[limitfield] : string 26 * $list[pagescounter] : string 27 * $list[pageslinks] : string 28 * 29 * pagination_list_render 30 * Input variable $list is an array with offsets: 31 * $list[all] 32 * [data] : string 33 * [active] : boolean 34 * $list[start] 35 * [data] : string 36 * [active] : boolean 37 * $list[previous] 38 * [data] : string 39 * [active] : boolean 40 * $list[next] 41 * [data] : string 42 * [active] : boolean 43 * $list[end] 44 * [data] : string 45 * [active] : boolean 46 * $list[pages] 47 * [{PAGE}][data] : string 48 * [{PAGE}][active] : boolean 49 * 50 * pagination_item_active 51 * Input variable $item is an object with fields: 52 * $item->base : integer 53 * $item->link : string 54 * $item->text : string 55 * 56 * pagination_item_inactive 57 * Input variable $item is an object with fields: 58 * $item->base : integer 59 * $item->link : string 60 * $item->text : string 61 * 62 * This gives template designers ultimate control over how pagination is rendered. 63 * 64 * NOTE: If you override pagination_item_active OR pagination_item_inactive you MUST override them both 65 */ 66 67 function pagination_list_footer($list) 68 { 69 // Initialize variables 70 $lang =& JFactory::getLanguage(); 71 $html = "<div class=\"list-footer\">\n"; 72 73 if ($lang->isRTL()) 74 { 75 $html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>"; 76 $html .= $list['pageslinks']; 77 $html .= "\n<div class=\"limit\">".JText::_('Display Num').$list['limitfield']."</div>"; 78 } 79 else 80 { 81 $html .= "\n<div class=\"limit\">".JText::_('Display Num').$list['limitfield']."</div>"; 82 $html .= $list['pageslinks']; 83 $html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>"; 84 } 85 86 $html .= "\n<input type=\"hidden\" name=\"limitstart\" value=\"".$list['limitstart']."\" />"; 87 $html .= "\n</div>"; 88 89 return $html; 90 } 91 92 function pagination_list_render($list) 93 { 94 // Initialize variables 95 $lang =& JFactory::getLanguage(); 96 $html = "<ul class=\"pagination\">"; 97 $html .= '<li>«</li>'; 98 // Reverse output rendering for right-to-left display 99 if($lang->isRTL()) 100 { 101 $html .= $list['start']['data']; 102 $html .= $list['previous']['data']; 103 104 $list['pages'] = array_reverse( $list['pages'] ); 105 106 foreach( $list['pages'] as $page ) { 107 if($page['data']['active']) { 108 // $html .= '<strong>'; 109 } 110 111 $html .= $page['data']; 112 113 if($page['data']['active']) { 114 // $html .= '</strong>'; 115 } 116 } 117 118 $html .= $list['next']['data']; 119 $html .= $list['end']['data']; 120 // $html .= '«'; 121 } 122 else 123 { 124 $html .= $list['start']['data']; 125 $html .= $list['previous']['data']; 126 127 foreach( $list['pages'] as $page ) 128 { 129 if($page['data']['active']) { 130 // $html .= '<strong>'; 131 } 132 133 $html .= $page['data']; 134 135 if($page['data']['active']) { 136 // $html .= '</strong>'; 137 } 138 } 139 140 $html .= $list['next']['data']; 141 $html .= $list['end']['data']; 142 // $html .= '«'; 143 144 } 145 $html .= '<li>»</li>'; 146 $html .= "</ul>"; 147 return $html; 148 } 149 150 function pagination_item_active(&$item) { 151 return "<li> <strong><a href=\"".$item->link."\" title=\"".$item->text."\">".$item->text."</a></strong> </li>"; 152 } 153 154 function pagination_item_inactive(&$item) { 155 return "<li> <span>".$item->text."</span> </li>"; 156 } 157 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |