Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: Joomla 1.7 - paginacja i php
Forum PHP.pl > Forum > PHP
notintine
Witam,

chcialbym Was uprzejmych forumowiczow poprosic o pomoc.

Mam zainstalowana j1.7 i chce zrobic zmiany w paginacji (na dole strony linki do nastepnych i poprzednich stron), ale jak na razie sie gubie.


Do tej pory zrobilem rozwiazanie polowiczne, ktore mnie nie satysfakcjonuje. w css podstawilem obrazek i czcionke zrobilem w kolorze przezroczystym. Niestety nie jest to dobre rozwiazanie bo IE pokazuje czciaonke w innym kolorze niz przezroczystym. zobaczyc to mozna tu: dantepineda.com/arte

Znalazlem w necie rozwiaznie dla j1.5, ktore sprawdzilem na jednej instalacji i dziala dobrze. Probowalem zaimplementowac to rozwiaznie do j1.7 ale niestety cos dziala zle, ze nie dziala.
Czy ktosby mogl rzucic okiem - prosze.

w templatce zrobilem katalog "html" tam umiescilem plik pagination.php o nastepujacej tresci:

  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. $html = "<div class=\"list-footer\">\n";
  70.  
  71. $html .= "\n<div class=\"limit\">".JText::_('JGLOBAL_DISPLAY_NUM').$list['limitfield']."</div>";
  72. $html .= $list['pageslinks'];
  73. $html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>";
  74.  
  75. $html .= "\n<input type=\"hidden\" name=\"" . $list['prefix'] . "limitstart\" value=\"".$list['limitstart']."\" />";
  76. $html .= "\n</div>";
  77.  
  78. return $html;
  79. }
  80.  
  81.  
  82.  
  83. function pagination_list_render($list)
  84. {
  85. // Reverse output rendering for right-to-left display.
  86. $html = '<ul>';
  87.  
  88. $html .= '<li class="pagination-prev">'.$list['previous']['data'].'</li>';
  89.  
  90. $html .= '<li class="pagination-next">'. $list['next']['data'].'</li>';
  91.  
  92. $html .= '</ul>';
  93.  
  94. return $html;
  95. }
  96.  
  97. function pagination_item_active(&$item)
  98.  
  99.  
  100.  
  101. {
  102.  
  103. switch ($item->text){
  104.  
  105.  
  106. case JText::_('JPREV'):
  107. $cadImg = "<img src='images/stories/navegacion/avanzar--29x29.jpg'";
  108. break;
  109. case JText::_('JNEXT'):
  110. $cadImg = "<img src='images/stories/navegacion/avanzar--29x29.jpg'";
  111. break;
  112.  
  113. default:
  114. $cadImg = $item->text;
  115. break;
  116. }
  117.  
  118. $cad = "<li><strong><a href=\"".$item->link."\" >".$cadImg."</a></strong></li>";
  119.  
  120. return $cad;
  121. }
  122.  
  123.  
  124.  
  125.  
  126. function pagination_item_inactive(&$item) {
  127. switch ($item->text){
  128.  
  129. case JText::_('JPREV'):
  130. $cadImg = "<img src='images/stories/navegacion/avanzar--29x29.jpg'";
  131. break;
  132. case JText::_('JNEXT'):
  133. $cadImg = "<img src='images/stories/navegacion/avanzar--29x29.jpg'";
  134. break;
  135. default:
  136. $cadImg = $item->text;
  137. break;
  138. }
  139.  
  140. $cad = "<li>".$cadImg."</li>";
  141.  
  142. return $cad;
  143. }
  144.  
  145.  
  146. ?>





Z gory dziekuje za pomoc.

Notintine
marins
Z Twojego postu nie wynika jasno co chcesz zrobić - a to bardzo niedobrze.

po wejściu na www - domyślam się, że chcesz usunąć tekst z `next` `prev` buttonów.

Proponuję użyć właściwości CSS:

text-indent: -9999px;


link: http://www.signs.pl/html/s/text-indent.php
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.