2009-08-19, 04:26 PM
I want only two categories are shown at the index.php. Later this should be an alternative entrance file for special users. Something like a tab of labroccas tabbed menu but an independet one. Hope you know what i mean.
The fid of the two categories which should be displayed are 61 and 64 with several forums and subforums.
I tried to change the code like this but it didn't worked:
So what i have to change? I get only the categories displayed, but not the forums of it, even the subforums aren't displayed.
This way works, but isn't a handy one, because i have to enter all fids of every subforum manually:
So how can i change the code to work with only two given categorie fids? Hope you can help me.
The fid of the two categories which should be displayed are 61 and 64 with several forums and subforums.
I tried to change the code like this but it didn't worked:
if($mybb->user['uid'] == 0)
{
// Build a forum cache.
$query = $db->query("
SELECT *
FROM ".TABLE_PREFIX."forums
WHERE active != 0 AND fid IN(61,64)
ORDER BY pid, disporder
");
$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
}
else
{
// Build a forum cache.
$query = $db->query("
SELECT f.*, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forums f
LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')
WHERE f.active != 0 AND f.fid IN(61,64)
ORDER BY pid, disporder
");
}
So what i have to change? I get only the categories displayed, but not the forums of it, even the subforums aren't displayed.
This way works, but isn't a handy one, because i have to enter all fids of every subforum manually:
/*Radio GSG*/
if($mybb->user['uid'] == 0)
{
// Build a forum cache.
$query = $db->query("
SELECT *
FROM ".TABLE_PREFIX."forums
WHERE active != 0 AND fid IN (61,67,94,64,86,95,85,77,84,97,89)
ORDER BY pid, disporder
");
$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
}
else
{
// Build a forum cache.
$query = $db->query("
SELECT f.*, fr.dateline AS lastread
FROM ".TABLE_PREFIX."forums f
LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')
WHERE f.active != 0 AND f.fid IN (61,67,94,64,86,95,85,77,84,97,89)
ORDER BY pid, disporder
");
}
So how can i change the code to work with only two given categorie fids? Hope you can help me.