Quote:
Originally Posted by blind-eddie
Yes, I know this is an old thread...
I want to exclude four forums from showing in the search results, What edit would be needed to achieve that goal?
Plugin code:
Code:
if ($vbulletin->userinfo['userid'])
{
$pcount = $vbphrase['no_new_posts_welcome'];
$postcount = $vbulletin->db->query_first("
SELECT COUNT(dateline) as pcount
FROM ".TABLE_PREFIX."post
WHERE dateline > ".$vbulletin->userinfo['lastvisit']
);
if ($postcount['pcount'])
{
if ($postcount['pcount'] == 1)
{
$pcount = "1";
}
else
{
$pcount = $postcount['pcount'];
}
}
}
|
You'll have to join the thread table in the query and then exclude the forumids. Example:
PHP Code:
$postcount = $vbulletin->db->query_first("
SELECT COUNT(post.dateline) as pcount
FROM ".TABLE_PREFIX."post
INNER JOIN thread ON thread.threadid = post.threadid
WHERE post.dateline > " . $vbulletin->userinfo['lastvisit'] . " AND thread.forumid NOT IN(13,14,15,16)
);