IPB, WordPress, IP.Board, php-Fusion, Invision Power Board

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

578

Открываем 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 — нужные категории.

Comments are closed.