Hi,
What I'd like to di is change the Latest Discussions Block so it shows only the Latest Discussions from a specific forum (ie the one I choose in this setting: "the Forum ID to pull announcements from").
Thanks.
in portal.php find:
$query = $db->query("
SELECT t.*, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE 1=1 $unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
ORDER BY t.lastpost DESC
LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
);
and replace with
$query = $db->query("
SELECT t.*, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE 1=1 $unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.fid='THE FORUM ID HERE'
ORDER BY t.lastpost DESC
LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
);
Replace 'THE FORUM ID HERE' with the actual forum id.
Cheers
Thanks works !
Tweak it a little :
$query = $db->query("
SELECT t.*, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
WHERE 1=1 $unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%' AND t.fid='".$mybb->settings['portal_announcementsfid']."'
ORDER BY t.lastpost DESC
LIMIT 0, ".$mybb->settings['portal_showdiscussionsnum']
Yep, that should work too as long as you don't have multiple announcement forums
Cheers