Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 3 Ответов
  • 538 Просмотров
*

misteri27

  • Захожу иногда
  • 490
  • 0 / 0
Всем привет.
Банальная проблема. Причем ее сам уже когда то решал. Но сейчас никак не вспомню и не найду решение.
Короче нужно заменить в пагинации "В начало" и "В конец" на "<<" ">>"
Вот сам файл pagination.php
Код
<?php
/**
 * @version $Id: pagination.php 10381 2008-06-01 03:35:53Z pasamio $
 * @package Joomla
 * [member=126442]copyright[/member] Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
 * @license GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

/**
 * This is a file to add template specific chrome to pagination rendering.
 *
 * pagination_list_footer
 * Input variable $list is an array with offsets:
 * $list[limit] : int
 * $list[limitstart] : int
 * $list[total] : int
 * $list[limitfield] : string
 * $list[pagescounter] : string
 * $list[pageslinks] : string
 *
 * pagination_list_render
 * Input variable $list is an array with offsets:
 * $list[all]
 * [data] : string
 * [active] : boolean
 * $list[start]
 * [data] : string
 * [active] : boolean
 * $list[previous]
 * [data] : string
 * [active] : boolean
 * $list[next]
 * [data] : string
 * [active] : boolean
 * $list[end]
 * [data] : string
 * [active] : boolean
 * $list[pages]
 * [{PAGE}][data] : string
 * [{PAGE}][active] : boolean
 *
 * pagination_item_active
 * Input variable $item is an object with fields:
 * $item->base : integer
 * $item->link : string
 * $item->text : string
 *
 * pagination_item_inactive
 * Input variable $item is an object with fields:
 * $item->base : integer
 * $item->link : string
 * $item->text : string
 *
 * This gives template designers ultimate control over how pagination is rendered.
 *
 * NOTE: If you override pagination_item_active OR pagination_item_inactive you MUST override them both
 */

function pagination_list_footer($list)
{
$html = "<div class=\"list-footer\">\n";

$html .= "\n<div class=\"limit\">".JText::_('Display Num').$list['limitfield']."</div>";
$html .= $list['pageslinks'];
$html .= "\n<div class=\"counter\">".$list['pagescounter']."</div>";

$html .= "\n<input type=\"hidden\" name=\"limitstart\" value=\"".$list['limitstart']."\" />";
$html .= "\n</div>";

return $html;
}

function pagination_list_render($list)
{
    $html = "<div class=\"page_navi\">\n";
    $html .='<span class="pag_press";>';
$html .='<span class="pag_end";>';
    $html .= $list['start']['data'];
$html .= "</span>";

    foreach( $list['pages'] as $page )
    {
        if($page['active']) {
            $html .= '<span class="pagin_nam">';
        }

        $html .= $page['data'];

        if($page['active']) {
            $html .= '</span>';
        }
    }
    $html .='<span class="pag_end">';
    $html .= $list['end']['data'];
$html .= "</span>";
    $html .= "</span>";
    $html .= "\n</div>";
    return $html;
}

function pagination_item_active(&$item) {
return "<a href=\"".$item->link."\" title=\"".$item->text."\">".$item->text."</a>";
}

function pagination_item_inactive(&$item) {
return '<span class="noactive">'.$item->text."</span>";
}
?>
Но вот откуда берутся эти "В начало" и "В конец" не могу никак вспомнить . Прошу помощи.
*

Kostelano

  • Давно я тут
  • 525
  • 51 / 1
Re: Изменить текст в пагинации
« Ответ #1 : 11.01.2020, 00:38:41 »
misteri27
Переопределите в админке значения констант:
Код
JLIB_HTML_START="«"
JLIB_HTML_END="»"
*

misteri27

  • Захожу иногда
  • 490
  • 0 / 0
Re: Изменить текст в пагинации
« Ответ #2 : 11.01.2020, 13:22:58 »
misteri27
Переопределите в админке значения констант:
Код
JLIB_HTML_START="«"
JLIB_HTML_END="»"
Спасибо все работает.
*

master-smeta

  • Захожу иногда
  • 298
  • 10 / 0
Re: Изменить текст в пагинации
« Ответ #3 : 13.01.2020, 11:43:00 »
Какой-то странный у Вас код. Сам сейчас тоже переделываю пагинацию, взял переопределение из протостара, там есть такое:
Код
function pagination_item_active(&$item)
{
$class = '';

// Check for "Start" item
if ($item->text === JText::_('JLIB_HTML_START'))
{
$display = '<span class="icon-first" aria-hidden="true"></span>';
$aria    = JText::sprintf('JLIB_HTML_GOTO_POSITION', strtolower($item->text));
}
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Как изменить lang=&quot;ru-ru&quot;?

Автор Maffo

Ответов: 0
Просмотров: 413
Последний ответ 07.04.2023, 16:07:22
от Maffo
Заменить текст - просмотров - на иконку (или свой текст)

Автор all_zer

Ответов: 2
Просмотров: 317
Последний ответ 28.03.2023, 13:32:35
от all_zer
Как изменить лимит размера файла при загрузке обновлений?

Автор Besa

Ответов: 3
Просмотров: 438
Последний ответ 15.12.2022, 11:23:09
от Besa
Как добавить текст на раздел без отображения на всех внутренних и статьях?

Автор Igor5

Ответов: 1
Просмотров: 1438
Последний ответ 24.11.2022, 18:35:04
от beliyadm
Как изменить разбивку страниц?

Автор Scaltro

Ответов: 1
Просмотров: 325
Последний ответ 18.10.2022, 18:32:53
от marksetter