To INCLUDE only three forums (for example) including all childforums, i found a solution:
PHP Code:
ob_start();
global $vbulletin, $db, $vbphrase;
//Begin Thread Counts
$childlist = 0;
$fcc16 = $vbulletin->forumcache[16]['childlist']; // LKW-B?nder
$fcc213 = $vbulletin->forumcache[213]['childlist']; // Vormontage
$fcc256 = $vbulletin->forumcache[256]['childlist']; // Bau 73
$arr = $fcc16 . $fcc213 . $fcc256;
$childlist = trim(str_replace('-1', '', $arr), ',');
$toutput='';
To EXCLUDE only two forums (for example) including all childforums, i found this solution:
PHP Code:
ob_start();
global $vbulletin, $db, $vbphrase;
//Begin Thread Counts
$fcc355 = $vbulletin->forumcache[355]['childlist']; // Forum Anlagenw?rter
$fcc455 = $vbulletin->forumcache[455]['childlist']; // Forum Pistolenlebenslauf
$arr = $fcc355 . $fcc455; // Foren, die ausgeblendet werden sollen
$arr = trim(str_replace('-1', '', $arr), ',');
$toutput='';
$recent_threads = $vbulletin->db->query_read("
SELECT thread.threadid, thread.prefixid, thread.title, thread.dateline, thread.lastpost, thread.lastposter, thread.lastposterid, thread.visible, thread.open, thread.postusername, thread.postuserid, thread.replycount, thread.views, forum.forumid, forum.title as forumtitle FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON ( forum.forumid = thread.forumid )
WHERE NOT ISNULL(threadid) and forum.forumid not in ($arr) AND visible = '1' AND open!='10' ORDER BY lastpost DESC
LIMIT 0, 50
");