DLE

Похожие новости из определенной категории

Открываем engine/modules/show.full.php

Находим:

$db->query( "SELECT id, title,  date, category, alt_name, flag FROM " . PREFIX . "_post WHERE MATCH (title, short_story, full_story, xfields) AGAINST ('$body') AND id != " . $row['id'] . " AND approve='1'" . $where_date . " LIMIT " . $config['related_number'] );

Меняем на:

$db->query( "SELECT id, title, date, category, alt_name, flag FROM " . PREFIX . "_post WHERE MATCH (title, short_story, full_story, xfields) AGAINST ('$body') AND id != " . $row['id'] . " AND approve='1' AND category regexp '[[:<:]](1|2|3)[[:>:]]'" . $where_date . " LIMIT " . $config['related_number'] );

Где 1|2|3 — нужные категории.

Back to top button