You would use this in place of the code I posted above:
PHP Code:
if ($sortorder != 'asc' AND $foruminfo['forumid'] != 'XX' AND $foruminfo['forumid'] != 'XX' AND $foruminfo['forumid'] != 'XX')
{
PHP Code:
default:
if ($foruminfo['forumid'] == 'XX' OR $foruminfo['forumid'] == 'XX' OR $foruminfo['forumid'] == 'XX'):
$sqlsortfield = 'thread.title';
$sortfield = 'thread.title';
else:
$sqlsortfield = 'lastpost';
$sortfield = 'lastpost';
endif;
}
As far as the last thread and next thread goes, I'm not sure how to pull that off. Since I only use this on 1 forum, I've never had the need to try and figure it out.