try this
PHP Code:
if (in_array($bbuserinfo[usergroupid], $privateusergroupable)) {
$getthreadids=$DB_site->query("
SELECT
".iif($sortfield=="voteavg",$votequery,"")."
thread.threadid
FROM thread
WHERE thread.forumid = $foruminfo[forumid]
AND thread.sticky=0
$datecut
$limitothers
ORDER BY sticky DESC, $sortfield $sqlsortorder
LIMIT ".($sel_limitlower-1).",$perpage");
} else {
$getthreadids=$DB_site->query("
SELECT
".iif($sortfield=="voteavg",$votequery,"")."
thread.threadid
FROM thread
WHERE thread.forumid = $foruminfo[forumid]
AND thread.sticky=0
AND thread.visible=1
".iif($allowusercreateprivate==1,"AND thread.visible=0","")."
$datecut
$limitothers
ORDER BY sticky DESC, $sortfield $sqlsortorder
LIMIT ".($sel_limitlower-1).",$perpage");
}
not sure if this'll work though