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

Bozhkov2

  • Захожу иногда
  • 427
  • 12 / 0
Подскажите пожалуйста, как изменить название кнопок Вперед, Назад, В конец и В начало? Обновил  Joomla, слетели все стили шаблона с пагинации. css-ом внешний вид подправил, но вылазит тултип и копирует название кнопки. Так что нужно или тултип отключить, или кнопки переименовать в << < ... > >>. В идеале, я хочу сделать респонсив, и на маленьком экране сделать стрелочки а на большом слова (без тултипа). Только вот в pagination.php ничего поменять не получается, а в lang название кнопки и подпись тултипа берется из одной строчки.
Планирую через @media скрывать и отображать название кнопки.
Посоветуйте, где менять, куда дописывать код?
*

bolonia

  • Захожу иногда
  • 222
  • 27 / 0
Переопределить вывод пагинации можно в шаблоне.
Посмотрите, как это сделано в стандартном шаблоне Rhuk Milkyway:
/templates/rhuk_milkyway/html/pagination.php

Аналогичным образом, нужно поместить копию файла pagination.php в папку HTML в папке шаблона. И в нем изменить вывод.
Бесплатный модуль обратного звонка / обратной связи для J3: http://joomlaforum.ru/index.php?topic=309065.0
*

Bozhkov2

  • Захожу иногда
  • 427
  • 12 / 0
Если бы я знал что менять, то и в стандартном файле поменял бы, без переопределения...
*

bolonia

  • Захожу иногда
  • 222
  • 27 / 0
Никогда не надо менять основные файлы Joomla, иначе при обновлении весь ваш труд слетит из-за замены на новый файл.
Бесплатный модуль обратного звонка / обратной связи для J3: http://joomlaforum.ru/index.php?topic=309065.0
*

Vasiliy111

  • Захожу иногда
  • 248
  • 5 / 0
Цитировать
Никогда не надо менять основные файлы Joomla, иначе при обновлении весь ваш труд слетит из-за замены на новый файл.
Использую стандартный шаблон beez3 Joomla 3.4, если вложить в папку HTML шаблона файл pagination.php (взятый из libraries/cms/pagination) все настройки на сайте слетают. Подскажите как в таком случае можно задать свои настройки чтобы при обновлении они не слетали
*

b2z

  • Глобальный модератор
  • 7290
  • 778 / 0
  • Разраблю понемногу
*

Vasiliy111

  • Захожу иногда
  • 248
  • 5 / 0
Дизайн сайта полностью изменяется удаляются шапка, меню, полностью все настройки. Остается только список категорий и заголовки.

Плюс выдает ошибку
Fatal error: Cannot redeclare class JPagination in Z:\home\localhost\www\petsandglory\templates\beez3\html\pagination.php on line 18
*

b2z

  • Глобальный модератор
  • 7290
  • 778 / 0
  • Разраблю понемногу
Дизайн сайта полностью изменяется удаляются шапка, меню, полностью все настройки. Остается только список категорий и заголовки.

Плюс выдает ошибку
Fatal error: Cannot redeclare class JPagination in Z:\home\localhost\www\petsandglory\templates\beez3\html\pagination.php on line 18
Возьмите файл templates/protostar/html/pagination.php , а не из libraries/cms/pagination
*

Vasiliy111

  • Захожу иногда
  • 248
  • 5 / 0
Цитировать
Возьмите файл templates/protostar/html/pagination.php , а не из libraries/cms/pagination
а с этим файлом сама навигация отображается некорректно, нет кнопок В начало, назад и вперед вконец (но FireBug показывает что ссылки эти есть)

*

b2z

  • Глобальный модератор
  • 7290
  • 778 / 0
  • Разраблю понемногу
*

Knyaz71

  • Осваиваюсь на форуме
  • 31
  • 4 / 0
Как вариант можете попробовать вот такой код для templates/ваш_шаблон/html/pagination.php

Код: php
<?php
/**
 * @package     Joomla.Site
 * @subpackage  Templates.protostar
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

function pagination_arrow(){
$arrow = array(
'first' => '<<',
'prev' => '<',
'next' => '>',
'last' => '>>',
);
return $arrow;
}

function pagination_list_footer($list)
{
$html = "<div class=\"pagination\">\n";
$html .= $list['pageslinks'];
$html .= "\n<input type=\"hidden\" name=\"" . $list['prefix'] . "limitstart\" value=\"" . $list['limitstart'] . "\" />";
$html .= "\n</div>";

return $html;
}

function pagination_list_render($list)
{
$html = '<ul class="pagination-list">';
$html .= $list['start']['data'];
$html .= $list['previous']['data'];

foreach ($list['pages'] as $k => $page)
{
if (in_array($k, range($range * $step - ($step + 1), $range * $step)))
{
if (($k % $step == 0 || $k == $range * $step - ($step + 1)) && $k != $currentPage && $k != $range * $step - $step)
{
$page['data'] = preg_replace('#(<a.*?>).*?(</a>)#', '<?php
/**
 * @package     Joomla.Site
 * @subpackage  Templates.protostar
 *
 * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

function pagination_arrow(){
$arrow = array(
'first' => '<<',
'prev' => '<',
'next' => '>',
'last' => '>>',
);
return $arrow;
}

function pagination_list_footer($list)
{
$html = "<div class=\"pagination\">\n";
$html .= $list['pageslinks'];
$html .= "\n<input type=\"hidden\" name=\"" . $list['prefix'] . "limitstart\" value=\"" . $list['limitstart'] . "\" />";
$html .= "\n</div>";

return $html;
}

function pagination_list_render($list)
{
$html = '<ul class="pagination-list">';
$html .= $list['start']['data'];
$html .= $list['previous']['data'];

foreach ($list['pages'] as $k => $page)
{
if (in_array($k, range($range * $step - ($step + 1), $range * $step)))
{
if (($k % $step == 0 || $k == $range * $step - ($step + 1)) && $k != $currentPage && $k != $range * $step - $step)
{
$page['data'] = preg_replace('#(<a.*?>).*?(</a>)#', '$1...$2', $page['data']);
}
}

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

$html .= $list['next']['data'];
$html .= $list['end']['data'];

$html .= '</ul>';
return $html;
}

function pagination_item_active(&$item)
{
$arrow = pagination_arrow();
$class = '';

// Check for "Start" item
if ($item->text == JText::_('JLIB_HTML_START'))
{
$display = $arrow['first'];
$class = ' class="first"';
}

// Check for "Prev" item
if ($item->text == JText::_('JPREV'))
{
$display = $arrow['prev'];
$class = ' class="prev"';
}

// Check for "Next" item
if ($item->text == JText::_('JNEXT'))
{
$display = $arrow['next'];
$class = ' class="next"';
}

// Check for "End" item
if ($item->text == JText::_('JLIB_HTML_END'))
{
$display = $arrow['last'];
$class = ' class="last"';
}

// If the display object isn't set already, just render the item with its text
if (!isset($display))
{
$display = $item->text;
}

return '<li' . $class . '><a title="' . $item->text . '" href="' . $item->link . '">' . $display . '</a></li>';
}

function pagination_item_inactive(&$item)
{
$arrow = pagination_arrow();
// Check for "Start" item
if ($item->text == JText::_('JLIB_HTML_START'))
{
return '<li class="first disabled"><span>'.$arrow['first'].'</span></li>';
}

// Check for "Prev" item
if ($item->text == JText::_('JPREV'))
{
return '<li class="prev disabled"><span>'.$arrow['prev'].'</span></li>';
}

// Check for "Next" item
if ($item->text == JText::_('JNEXT'))
{
return '<li class="next disabled"><span>'.$arrow['next'].'</span></li>';
}

// Check for "End" item
if ($item->text == JText::_('JLIB_HTML_END'))
{
return '<li class="last disabled"><span>'.$arrow['last'].'</span></li>';
}

// Check if the item is the active page
if (isset($item->active) && ($item->active))
{
return '<li class="active"><span>' . $item->text . '</span></li>';
}

// Doesn't match any other condition, render a normal item
return '<li class="disabled">' . $item->text . '</li>';
}
?>
...php', $page['data']);
}
}

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

$html .= $list['next']['data'];
$html .= $list['end']['data'];

$html .= '</ul>';
return $html;
}

function pagination_item_active(&$item)
{
$arrow = pagination_arrow();
$class = '';

// Check for "Start" item
if ($item->text == JText::_('JLIB_HTML_START'))
{
$display = $arrow['first'];
$class = ' class="first"';
}

// Check for "Prev" item
if ($item->text == JText::_('JPREV'))
{
$display = $arrow['prev'];
$class = ' class="prev"';
}

// Check for "Next" item
if ($item->text == JText::_('JNEXT'))
{
$display = $arrow['next'];
$class = ' class="next"';
}

// Check for "End" item
if ($item->text == JText::_('JLIB_HTML_END'))
{
$display = $arrow['last'];
$class = ' class="last"';
}

// If the display object isn't set already, just render the item with its text
if (!isset($display))
{
$display = $item->text;
}

return '<li' . $class . '><a title="' . $item->text . '" href="' . $item->link . '">' . $display . '</a></li>';
}

function pagination_item_inactive(&$item)
{
$arrow = pagination_arrow();
// Check for "Start" item
if ($item->text == JText::_('JLIB_HTML_START'))
{
return '<li class="first disabled"><span>'.$arrow['first'].'</span></li>';
}

// Check for "Prev" item
if ($item->text == JText::_('JPREV'))
{
return '<li class="prev disabled"><span>'.$arrow['prev'].'</span></li>';
}

// Check for "Next" item
if ($item->text == JText::_('JNEXT'))
{
return '<li class="next disabled"><span>'.$arrow['next'].'</span></li>';
}

// Check for "End" item
if ($item->text == JText::_('JLIB_HTML_END'))
{
return '<li class="last disabled"><span>'.$arrow['last'].'</span></li>';
}

// Check if the item is the active page
if (isset($item->active) && ($item->active))
{
return '<li class="active"><span>' . $item->text . '</span></li>';
}

// Doesn't match any other condition, render a normal item
return '<li class="disabled">' . $item->text . '</li>';
}
?>

П.С.
Взят из шаблона protostar, и правился под себя
« Последнее редактирование: 28.07.2015, 10:58:08 от Knyaz71 »
*

Vasiliy111

  • Захожу иногда
  • 248
  • 5 / 0
Спасибо Knyaz71, работает нормально, но я решил оставить стандартный pagination.php
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Шаблоны Joomlart, Gavick, Yootheme, RocketTheme для Joomla: легально и с обновлениями, no warez

Автор _ib_

Ответов: 168
Просмотров: 198751
Последний ответ 15.04.2023, 18:26:50
от AS1969
Различные условия в шаблонах Joomla 3.0 и 2.5

Автор Fedor Vlasenko

Ответов: 132
Просмотров: 24301
Последний ответ 24.01.2023, 17:46:38
от goga_pgasovav
Где в Joomla 3.4.3 шаблон материала? Шаблон Yootheme Organic

Автор annushka

Ответов: 13
Просмотров: 4786
Последний ответ 13.09.2022, 11:14:56
от tuztref
Master3 – современный удобный гибкий шаблон для Joomla! 3 на фреймворке UIkit 3

Автор dron

Ответов: 81
Просмотров: 7583
Последний ответ 11.09.2021, 03:12:59
от vasileк
Как убрать tooltip в регистрации в Joomla 3?

Автор KoloS

Ответов: 13
Просмотров: 8097
Последний ответ 24.08.2021, 19:00:51
от coolplaymaster