вопрос
Люди, подскажите пожалуйста где прописан запрос который выводит публикации пользователя по адресу
user/admin/news/
Хочу сделать чтобы выводил только определенную категорию, а запрос найти не могу.
Спасибо!
user/admin/news/
Хочу сделать чтобы выводил только определенную категорию, а запрос найти не могу.
Спасибо!
engine/engine.php
elseif ($subaction == 'allnews') {
// ################ show all news by user #################
if ($cstart) {
$cstart = $cstart - 1;
$cstart = $cstart * $config['news_number'];
}
$url_page = $config['http_home_url'] . "user/" . urlencode ( $user ) . "/news";
$user_query = "subaction=allnews&user=" . urlencode ( $user );
if( $config['allow_alt_url'] ) $canonical = $url_page . "/"; else $canonical = $PHP_SELF."?subaction=allnews&user=" . urlencode ( $user );
if ($view_template == "rss") {
$sql_select = "SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, e.allow_rss_turbo, e.allow_rss_dzen FROM " . PREFIX . "_post p {$cat_join}LEFT JOIN " . PREFIX . "_post_extras e ON (p.id=e.news_id) WHERE {$stop_list}p.autor = '{$user}' AND p.approve=1 AND e.allow_rss=1" . $where_date . " ORDER BY date DESC LIMIT 0," . $config['rss_number'];
} else {
if (isset ( $_SESSION['dle_sort_allnews'] )) $news_sort_by = $_SESSION['dle_sort_allnews'];
if (isset ( $_SESSION['dle_direction_allnews'] )) $news_direction_by = $_SESSION['dle_direction_allnews'];
$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 {$cat_join}LEFT JOIN " . PREFIX . "_post_extras e ON (p.id=e.news_id) WHERE {$stop_list}autor = '$user' 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 {$cat_join_count}WHERE {$stop_list}autor = '$user' AND approve=1" . $where_date;
}
}