Ну вроде можно публиковать информацию такого рода, по этому буду писать может кому то и пригодиться. В данный момент мало времени, успею написать лишь о том как скрыть просмотр блоков по запросу "
http://site.ru/?tp=1" и покажу изменения постраничной навигации (ИМХО в Joomla! она специфическая).
Скрытие просмотра блоков по адресу "
http://site.ru/?tp=1":
Открываем файл /libraries/joomla/application/module/helper.php
Ищем строки:
if(count($result) == 0) {
if(JRequest::getBool('tp')) {
$result[0] = JModuleHelper::getModule( 'mod_'.$position );
$result[0]->title = $position;
$result[0]->content = $position;
$result[0]->position = $position;
}
}
Комментируем их.
Далее ищем строки:
if(JRequest::getBool('tp')) {
$attribs['style'] .= ' outline';
}
И тоже их комментируем.
Изменяем постраничную навигацию Joomla!:
Для того, что бы получить возможность работать со стилями навигации через CSS необходимо заменить содержимое файла pagination.php, находящегося по адресу:/public_html/сайт.ru/шаблоны/ваш шаблон/html/pagination.php на следующий код:
<?php
/**
* @version $Id: pagination.php 10381 2008-06-01 03:35:53Z pasamio $
* @package Joomla
* @copyright 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)
{
// Initialize variables
$html = "<table width=100% class=\"pagination\"><td width=50% id=\"fluid\"> </td>";
$html .= '<td id="nolinked"><span>«</span></td>'.$list['start']['data'];
$html .= $list['previous']['data'];
foreach( $list['pages'] as $page )
{
if($page['data']['active']) {
$html .= '';
}
$html .= $page['data'];
if($page['data']['active']) {
$html .= '';
}
}
$html .= $list['next']['data'];
$html .= $list['end']['data'];
$html .= '<td id="nolinked">»</td>';
$html .= "<td width=50% id=\"fluid\"> </td></table>";
return $html;
}
function pagination_item_active(&$item) {
return "<td id=\"linked\"><a href=\"".$item->link."\" title=\"".$item->text."\">".$item->text."</a></td>";
}
function pagination_item_inactive(&$item) {
return "<td id=\"nolinked\">".$item->text."</td>";
}
?>
Затем в CSS файл шаблона, ну например template.css добавить:
.paginate {
margin:30px auto 0px;
width: 100%;
}
/*тут все касательно оформления таблицы*/
table.pagination {
}
table.pagination td {
padding:0px; margin:0px 4px 0px 4px;
border:solid #444 1px;
background:none;
line-height:18px;
}
/*распорка для центровки таблицы*/
#fluid { border:none;}
/* настройка параметров ячейки без ссылок*/
#nolinked {
color:#ccc;
background-color:#666;
padding:3px 6px 3px 6px;
border:solid #333 1px;
}
/*настройка параметров активных ячеек*/
#linked {
background-color:#FFF;
padding:0px;
border:solid #555 1px;
}
/*параметры ссылок в ячейках*/
#linked a {
color:#ccc;
background-color:#666;
padding:3px 6px 3px 6px;
margin:0px;
display:block;
line-height:18px; text-decoration: none;
}
/*ссылки в ячейках*/
#linked a:hover {
color:#ccc;
background-color:#333;
padding:3px 6px 3px 6px;
margin:0px;
display:block;
line-height:18px;
text-decoration: none;
}
Стили постраничной навигации конечно же настроены под мой сайт, по этому я добавил в код CSS комментарии, которые помогут вам разобраться с настройками.
В ближайшее время планирую дополнить тему информацией о том как изменить путь доступа и улучшить защиту администраторского раздела.