То на главной появляться ошибка:
Warning: Division by zero in /engine/modules/show.short.php on line 511
При етом навигация по новостям остается!
Данная ошибка присутсвует только в версии DataLife 7.0
Исправление:
Открыть /engine/modules/show.short.php
Найти:
И Заменить на:
$sql_result = $db->query($sql_select);
while($row = $db->get_row($sql_result)){
$news_found = TRUE;
$attachments[] = $row['id'];
$row['date'] = strtotime($row['date']);
if (isset($middle)) {
if ($news_c==$middle_s){
$tpl->copy_template .= bannermass($banners_topz,$ban_short['top']);
} else
if ($news_c==$middle){
$tpl->copy_template .= bannermass($banners_cenz,$ban_short['cen']);
}else
if ($news_c==$middle_e){
$tpl->copy_template .= bannermass($banners_downz,$ban_short['down']);
}
$news_c++;
}
$i++;
if (!isset($view_template)){
$count_all = $db->super_query($sql_count);
$count_all = $count_all['count'];
} else $count_all = 0;
Открыть /engine/modules/show.short.php
Найти:
$sql_result = $db->query($sql_select);
if (!isset($view_template)){
$count_all = $db->super_query($sql_count);
$count_all = $count_all['count'];
} else $count_all = 0;
while($row = $db->get_row($sql_result)){
$news_found = TRUE;
$attachments[] = $row['id'];
$row['date'] = strtotime($row['date']);
if (isset($middle)) {
if ($news_c==$middle_s){
$tpl->copy_template .= bannermass($banners_topz,$ban_short['top']);
} else
if ($news_c==$middle){
$tpl->copy_template .= bannermass($banners_cenz,$ban_short['cen']);
}else
if ($news_c==$middle_e){
$tpl->copy_template .= bannermass($banners_downz,$ban_short['down']);
}
$news_c++;
}
$i++;
if (!isset($view_template)){
$count_all = $db->super_query($sql_count);
$count_all = $count_all['count'];
} else $count_all = 0;
while($row = $db->get_row($sql_result)){
$news_found = TRUE;
$attachments[] = $row['id'];
$row['date'] = strtotime($row['date']);
if (isset($middle)) {
if ($news_c==$middle_s){
$tpl->copy_template .= bannermass($banners_topz,$ban_short['top']);
} else
if ($news_c==$middle){
$tpl->copy_template .= bannermass($banners_cenz,$ban_short['cen']);
}else
if ($news_c==$middle_e){
$tpl->copy_template .= bannermass($banners_downz,$ban_short['down']);
}
$news_c++;
}
$i++;
И Заменить на:
$sql_result = $db->query($sql_select);
while($row = $db->get_row($sql_result)){
$news_found = TRUE;
$attachments[] = $row['id'];
$row['date'] = strtotime($row['date']);
if (isset($middle)) {
if ($news_c==$middle_s){
$tpl->copy_template .= bannermass($banners_topz,$ban_short['top']);
} else
if ($news_c==$middle){
$tpl->copy_template .= bannermass($banners_cenz,$ban_short['cen']);
}else
if ($news_c==$middle_e){
$tpl->copy_template .= bannermass($banners_downz,$ban_short['down']);
}
$news_c++;
}
$i++;
if (!isset($view_template)){
$count_all = $db->super_query($sql_count);
$count_all = $count_all['count'];
} else $count_all = 0;