• DONATE to NULLED!
    Форуму и его команде можно помочь, мотивировать модераторов разделов.
    Помогите модератору этого раздела killoff лично.

Помощь Панель Навигации...

Статус
В этой теме нельзя размещать новые ответы.

Aolaxi

Читатель
Заблокирован
Регистрация
23 Сен 2007
Сообщения
15
Реакции
1
  • Автор темы
  • Заблокирован
  • #1
Всем привет, сейчас занимаюсь разработкой сайта на cms DataLife 6.0. У меня вопрос:
1.Как сделать чтобы вместо такой ->
1191850611_123.jpg

была такая
1191850611_124.jpg

Что нужно дописать в style.css?
 
4dle тебе в помощь
 
Добавляем в templates\ИМЯ_ШАБЛОНА\css\style.css :
PHP:
.ctitlev{color:#666; border:0px;}
.ctitlev p a:link,.ctitlev p a:visited,.ctitlev p a:hover,.ctitlev p a:active{text-decoration:none;color: #4b719e;background:#fff;border:1px solid #ccc;padding:2px 5px;font-size:10px}
.ctitlev p a:hover{background:#c8c8c8;color:#000;border-color:#666}
.ctitlev p{margin:4px 6px}
.ctitlev p span{text-decoration:none;background:#fff;padding:2px 5px;border:1px solid #ccc;color:#ccc;font-size:10px}
.ctitlev h4{margin-top:-1.45em;padding:0;border:none}
Добавляем в templates\ИМЯ_ШАБЛОНА\navigation.tpl :
PHP:
<TABLE style="тут стоит стиль вывода под мой дизайн" width="100%"  bgcolor="#ffffff">
<TBODY>
<TR>
<TD>
<CENTER>
<div class="ctitlev" align="center">
<p style="text-align:center" style="padding-top:0px; padding-bottom:10px">
[prev-link]« Назад..[/prev-link] {pages} [next-link]Вперёд »[/next-link]
</p></div>
</CENTER>
</TD>
</TR>
</TBODY>
</TABLE>
Добавляем в engine/modules/show.short.php (вот кусок кода, сравните со своим оригиналом:(
PHP:
// ################################################################################
####################################
// Навигация по новостям
// ################################################################################
####################################
if (!isset($view_template)) $tpl->load_template('navigation.tpl');
//----------------------------------
// Previous link
//----------------------------------
$no_prev = false;
$no_next = false;
if(isset($cstart) and $cstart != "" and $cstart > 0){
$prev = $cstart / $config['news_number'];
if ($config['ajax']) $go_page = "onclick=\"DlePage('cstart=".$prev."&".$user_query."'); return false;\" "; else $go_page = "";
if ($config['allow_alt_url'] == "yes") {
$prev_page = $url_page."/page/".$prev."/";
$tpl->set_block("'\[prev-link\](.*?)\[/prev-link\]'si", "\\1");
} else {
$prev_page = $PHP_SELF."?cstart=".$prev."&".$user_query;
$tpl->set_block("'\[prev-link\](.*?)\[/prev-link\]'si", "\\1");
};
}else{ $tpl->set_block("'\[prev-link\](.*?)\[/prev-link\]'si", "\\1"); $no_prev = TRUE; }
//----------------------------------
// Pages
//----------------------------------
if($config['news_number']){
$row = $db->super_query($sql_count);
$count_all = $row['count'];
$pages_count = @ceil($count_all/$config['news_number']);
$pages_start_from = 0;
$pages = "";
$pages_per_section = 3;
if($pages_count > 10)
{
for($j = 1; $j <= $pages_per_section; $j++)
{
if($pages_start_from != $cstart)
{
if ($config['allow_alt_url'] == "yes")
$pages .= " "; else $pages .= "$j ";
}
else
{
$pages .= " $j ";
}
$pages_start_from += $config['news_number'];
}
if(((($cstart / $config['news_number']) + 1) > 1) && ((($cstart / $config['news_number']) + 1) ($pages_per_section + 2)) ? '... ' : ' ';
$page_min = ((($cstart / $config['news_number']) + 1) > ($pages_per_section + 1)) ? ($cstart / $config['news_number']) : ($pages_per_section + 1);
$page_max = ((($cstart / $config['news_number']) + 1) < ($pages_count - ($pages_per_section + 1))) ? (($cstart / $config['news_number']) + 1) : $pages_count - ($pages_per_section + 1);
$pages_start_from = ($page_min - 1) * $config['news_number'];
for($j = $page_min; $j < $page_max + ($pages_per_section - 1); $j++)
{
if($pages_start_from != $cstart)
{
if ($config['ajax']) $go_page = "onclick=\"DlePage('cstart=".$j."&".$user_query."'); return false;\" "; else $go_page = "";
if ($config['allow_alt_url'] == "yes")
$pages .= "$j ";
else
$pages .= "$j ";
}
else
{
$pages .= " $j ";
}
$pages_start_from += $config['news_number'];
}
$pages .= ((($cstart / $config['news_number']) + 1) < $pages_count - ($pages_per_section + 1)) ? '... ' : ' ';
}
else
{
$pages .= '... ';
}
$pages_start_from = ($pages_count - $pages_per_section) * $config['news_number'];
for($j=($pages_count - ($pages_per_section - 1)); $j <= $pages_count; $j++)
{
if($pages_start_from != $cstart)
{
if ($config['ajax']) $go_page = "onclick=\"DlePage('cstart=".$j."&".$user_query."'); return false;\" "; else $go_page = "";
if ($config['allow_alt_url'] == "yes")
$pages .= "$j ";
else
$pages .= "$j ";
}
else
{
$pages .= " $j ";
}
$pages_start_from += $config['news_number'];
}
}
else
{
for($j=1;$j<=$pages_count;$j++)
{
if($pages_start_from != $cstart)
{
if ($config['ajax']) $go_page = "onclick=\"DlePage('cstart=".$j."&".$user_query."'); return false;\" "; else $go_page = "";
if ($config['allow_alt_url'] == "yes")
$pages .= "$j ";
else
$pages .= "$j ";
}
else
{
$pages .= " $j ";
}
$pages_start_from += $config['news_number'];
}
}
$tpl->set('{pages}', $pages);
}
//----------------------------------
// Next link
//----------------------------------
if($config['news_number'] < $count_all and $i set_block("'\[next-link\](.*?)\[/next-link\]'si", "\\1");
} else {
$next = $PHP_SELF."?cstart=".$next_page."&".$user_query;
$tpl->set_block("'\[next-link\](.*?)\[/next-link\]'si", "\\1");
};
}else{ $tpl->set_block("'\[next-link\](.*?)\[/next-link\]'si", "\\1"); $no_next = TRUE;}
if (!$no_prev OR !$no_next){ $tpl->compile('content'); }
$tpl->clear();
}
?>
Добавляем в engine/modules/LASTCOMMENTS.PHP (вот кусок кода, сравните со своим оригиналом:(
PHP:
// ################################################################################
####################################
// Навигация по новостям
// ################################################################################
####################################
$tpl->load_template('navigation.tpl');
//----------------------------------
// Previous link
//----------------------------------
if($cstart > 0){
$prev = $cstart / $number;
$prev_page = $PHP_SELF."?cstart=".$prev."&".$user_query;
$tpl->set_block("'\[prev-link\](.*?)\[/prev-link\]'si", ""); }else{ $tpl->set_block("'[prev-link](.*?)[/prev-link]'si", "1"); $no_prev = TRUE; } //---------------------------------- // Pages //---------------------------------- if($number){ $count_all = $row_count['count']; $pages_count = @ceil($count_all/$number); $pages_start_from = 0; $pages = ""; $pages_per_section = 3; if($pages_count > 10) { for($j = 1; $j ";
}
else
{
$pages .= " $j ";
}
$pages_start_from += $number;
}
if(((($cstart / $number) + 1) > 1) && ((($cstart / $number) + 1) ($pages_per_section + 2)) ? '... ' : ' ';
$page_min = ((($cstart / $number) + 1) > ($pages_per_section + 1)) ? ($cstart / $number) : ($pages_per_section + 1);
$page_max = ((($cstart / $number) + 1) < ($pages_count - ($pages_per_section + 1))) ? (($cstart / $number) + 1) : $pages_count - ($pages_per_section + 1);
$pages_start_from = ($page_min - 1) * $number;
for($j = $page_min; $j < $page_max + ($pages_per_section - 1); $j++)
{
if($pages_start_from != $cstart)
{
$pages .= " "; } else { $pages .= " $j "; } $pages_start_from += $number; } $pages .= ((($cstart / $number) + 1) < $pages_count - ($pages_per_section + 1)) ? '... ' : ' '; } else { $pages .= '... '; } $pages_start_from = ($pages_count - $pages_per_section) * $number; for($j=($pages_count - ($pages_per_section - 1)); $j ";
}
else
{
$pages .= " $j ";
}
$pages_start_from += $number;
}
}
else
{
for($j=1;$jset('{pages}', $pages); }//----------------------------------// Next link//---------------------------------- if($number set_block("'\[next-link\](.*?)\[/next-link\]'si", "\\1"); $no_next = TRUE;
}
if (!$no_prev or !$no_next){ $tpl->compile('content'); }
$tpl->clear();
Добавляем в engine/modules/C_NAVIGATION.PHP (вот кусок кода, сравните со своим оригиналом:(
PHP:
// ################################################################################
####################################
// Навигация
// ################################################################################
####################################
$tpl->load_template('navigation.tpl');
//----------------------------------
// Previous link
//----------------------------------
if($cstart > 1){
$prev = $cstart - 1;
if ($config['allow_alt_url'] == "yes")
$tpl->set_block("'\[prev-link\](.*?)\[/prev-link\]'si", ""); else $tpl->set_block("'[prev-link](.*?)[/prev-link]'si", "1");
}else{ $tpl->set_block("'\[prev-link\](.*?)\[/prev-link\]'si", "\\1"); $no_prev = TRUE; }
//----------------------------------
// Pages
//----------------------------------
if($number){
$count_all = $comments_num;
$pages_count = @ceil($count_all/$number);
$pages_start_from = 1;
$pages = "";
for($j=1;$j<=$pages_count;$j++)
{
if($pages_start_from != $cstart)
{
if ($config['allow_alt_url'] == "yes")
$pages .= " "; else $pages .= "$j ";
}
else
{
$pages .= " $j ";
}
$pages_start_from ++;
}
}
$tpl->set('{pages}', $pages);
//----------------------------------
// Next link
//----------------------------------
if($cstart set_block("'\[next-link\](.*?)\[/next-link\]'si", ""); else $tpl->set_block("'[next-link](.*?)[/next-link]'si", "1");
}else{ $tpl->set_block("'\[next-link\](.*?)\[/next-link\]'si", "\\1"); $no_next = TRUE;}
if (!$no_prev or !$no_next){ $tpl->compile('content'); }
$tpl->clear();
Добавляем в engine/modules/SEARCH.PHP (вот кусок кода, сравните со своим оригиналом:(
PHP:
// ################################################################################
####################################
// Навигация по новостям
// ################################################################################
####################################
if ($found_result > 0) {
$tpl->load_template('navigation.tpl');
//----------------------------------
// Previous link
//----------------------------------
if(isset($search_start) and $search_start != "" and $search_start > 0){
$prev = $search_start / $config_search_numbers;
$prev_page = "";
$tpl->set_block("'\[prev-link\](.*?)\[/prev-link\]'si", $prev_page."\\1");
}else{ $tpl->set_block("'\[prev-link\](.*?)\[/prev-link\]'si", "\\1"); $no_prev = TRUE; }
//----------------------------------
// Pages
//----------------------------------
if($config_search_numbers){
$pages_count = @ceil($count_result/$config_search_numbers);
$pages_start_from = 0;
$pages = "";
$pages_per_side = ($config['pages_per_section']-1) / 2;
$pages_to_display = ($config['pages_per_section'] * 3) + 1;
if($pages_count > $pages_to_display) {
for($j = 1; $j $j ] } else {
$pages .= " $j ";
}
$pages_start_from += $config_search_numbers;
}
if(((($search_start / $config_search_numbers) + 1) > ($pages_per_side + 1)) && ((($search_start / $config_search_numbers) + 1) ($config['pages_per_section'] + $pages_per_side + 1)) ? '... ' : ' ';
$page_min = ((($search_start / $config_search_numbers) + 1) > ($config['pages_per_section'] + $pages_per_side)) ? (($search_start / $config_search_numbers) - $pages_per_side + 1) : ($config['pages_per_section'] + 1);
$page_max = ((($search_start / $config_search_numbers) + 1) < ($pages_count - ($config['pages_per_section'] + $pages_per_side - 1))) ? (($search_start / $config_search_numbers) + $pages_per_side + 1) : ($pages_count - $config['pages_per_section']);
$pages_start_from = ($page_min - 1) * $config_search_numbers;
for($j = $page_min; $j $j[/url] ] } else {
$pages .= " $j ";
}
$pages_start_from += $config_search_numbers;
}
$pages .= ((($search_start / $config_search_numbers) + 1) < $pages_count - ($config['pages_per_section'] + $pages_per_side)) ? '... ' : ' ';
}
else {
$pages .= '... ';
}
$pages_start_from = ($pages_count - $config['pages_per_section']) * $config_search_numbers;
for($j=($pages_count - ($config['pages_per_section'] - 1)); $j $j[/url] ] } else {
$pages .= " $j ";
}
$pages_start_from += $config_search_numbers;
}
} else {
for($j=1;$j$j[/url] ] } else {
$pages .= " $j ";
}
$pages_start_from += $config_search_numbers;
}
}
$tpl->set('{pages}', $pages);
}
//----------------------------------
// Next link
//----------------------------------
if($config_search_numbers < $count_result and $to_num < $count_result){
$next_page = $to_num / $config_search_numbers + 1;
$next = "";
$tpl->set_block("'\[next-link\](.*?)\[/next-link\]'si", $next."\\1[/url]");
} else {
$tpl->set_block("'\[next-link\](.*?)\[/next-link\]'si", "\\1"); $no_next = TRUE;
}
if (!$no_prev or !$no_next){ $tpl->compile('content'); }
$tpl->clear();
 
Начиная с версии движка 6.0 хватит сделать только
Добавляем в templates\ИМЯ_ШАБЛОНА\navigation.tpl
и
Добавляем в templates\ИМЯ_ШАБЛОНА\navigation.tpl :
 
  • Автор темы
  • Заблокирован
  • #5
Thank

1.На 4dle первым делом заходил.
2.Спасибо NetMan за помощь, респект и уважуха ему за это. :yahoo:
 
Статус
В этой теме нельзя размещать новые ответы.
Назад
Сверху