Идем дальше вырезаем систему вывода по дате (если хорошо просмотреть код то новости за неделю и день имеют 301 редирект.):
// ################ Новости за год #################
if ($year != '' and $month == '' and $day == '') {
if ($cstart) {
$cstart = $cstart - 1;
$cstart = $cstart * $config['news_number'];
}
$newsmodule = true;
$url_page = $config['http_home_url'] . $year;
$user_query = "year=" . $year;
if (isset ( $_SESSION['dle_sort_date'] )) $news_sort_by = $_SESSION['dle_sort_date'];
if (isset ( $_SESSION['dle_direction_date'] )) $news_direction_by = $_SESSION['dle_direction_date'];
$sql_select = "SELECT p.id, p.autor, p.date, p.short_story, CHAR_LENGTH(p.full_story) as full_story, p.xfields, p.title, p.category, p.alt_name, p.comm_num, p.allow_comm, p.fixed, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.view_edit, e.editdate, e.editor, e.reason FROM " . PREFIX . "_post p LEFT JOIN " . PREFIX . "_post_extras e ON (p.id=e.news_id) WHERE {$stop_list}date >= '{$year}-01-01'AND date < '{$year}-01-01' + INTERVAL 1 YEAR AND approve=1" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number'];
$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}date >= '{$year}-01-01'AND date < '{$year}-01-01' + INTERVAL 1 YEAR AND approve=1" . $where_date;
}
// ################ Новости за месяц #################
if ($year != '' and $month != '' and $day == '') {
if ($cstart) {
$cstart = $cstart - 1;
$cstart = $cstart * $config['news_number'];
}
if (intval($month) < 1 OR intval($month) > 12) {
header("HTTP/1.0 301 Moved Permanently");
header("Location: ".str_replace("index.php","",$_SERVER['PHP_SELF'
])."{$year}/01/");
die("Redirect");
}
$newsmodule = true;
$url_page = $config['http_home_url'] . $year . "/" . $month;
$user_query = "year=" . $year . "&month=" . $month;
if (isset ( $_SESSION['dle_sort_date'] )) $news_sort_by = $_SESSION['dle_sort_date'];
if (isset ( $_SESSION['dle_direction_date'] )) $news_direction_by = $_SESSION['dle_direction_date'];
$sql_select = "SELECT p.id, p.autor, p.date, p.short_story, CHAR_LENGTH(p.full_story) as full_story, p.xfields, p.title, p.category, p.alt_name, p.comm_num, p.allow_comm, p.fixed, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.view_edit, e.editdate, e.editor, e.reason FROM " . PREFIX . "_post p LEFT JOIN " . PREFIX . "_post_extras e ON (p.id=e.news_id) WHERE {$stop_list}date >= '{$year}-{$month}-01'AND date < '{$year}-{$month}-01' + INTERVAL 1 MONTH AND approve=1" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number'];
$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post where {$stop_list}date >= '{$year}-{$month}-01'AND date < '{$year}-{$month}-01' + INTERVAL 1 MONTH AND approve=1" . $where_date;
}
// ################ Новости за день #################
if ($year != '' and $month != '' and $day != '' and $subaction == '') {
if ($cstart) {
$cstart = $cstart - 1;
$cstart = $cstart * $config['news_number'];
}
if (intval($month) < 1 OR intval($month) > 12) {
header("HTTP/1.0 301 Moved Permanently");
header("Location: ".str_replace("index.php","",$_SERVER['PHP_SELF'
])."{$year}/01/");
die("Redirect");
}
if (intval($day) < 1 OR intval($day) > 31) {
header("HTTP/1.0 301 Moved Permanently");
header("Location: ".str_replace("index.php","",$_SERVER['PHP_SELF'
])."{$year}/{$month}/01/");
die("Redirect");
}
$newsmodule = true;
$url_page = $config['http_home_url'] . $year . "/" . $month . "/" . $day;
$user_query = "year=" . $year . "&month=" . $month . "&day=" . $day;
if (isset ( $_SESSION['dle_sort_date'] )) $news_sort_by = $_SESSION['dle_sort_date'];
if (isset ( $_SESSION['dle_direction_date'] )) $news_direction_by = $_SESSION['dle_direction_date'];
$sql_select = "SELECT p.id, p.autor, p.date, p.short_story, CHAR_LENGTH(p.full_story) as full_story, p.xfields, p.title, p.category, p.alt_name, p.comm_num, p.allow_comm, p.fixed, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.view_edit, e.editdate, e.editor, e.reason FROM " . PREFIX . "_post p LEFT JOIN " . PREFIX . "_post_extras e ON (p.id=e.news_id) WHERE {$stop_list}date >= '{$year}-{$month}-{$day}' AND date < '{$year}-{$month}-{$day}' + INTERVAL 24 HOUR AND approve=1" . $where_date . " ORDER BY " . $news_sort_by . " " . $news_direction_by . " LIMIT " . $cstart . "," . $config['news_number'];
$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_post WHERE {$stop_list}date >= '{$year}-{$month}-{$day}' AND date < '{$year}-{$month}-{$day}' + INTERVAL 24 HOUR AND approve=1" . $where_date;
}
И удаляем.
и удаляем.