In forumdisplay.php, I have this code:
PHP Code:
if (in_array($bbuserinfo[usergroupid], array($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
$datecut
$limitothers
ORDER BY sticky DESC, $sortfield $sqlsortorder
LIMIT ".($sel_limitlower-1).",$perpage");
}
But this doesn't seem to be working - it doesn't show the invisible threads, even though usergroupid 6 is in the array. Any ideas?
Furthermore, if the variable $allowusercreateprivate is set to 1, I want it to get all of that user's threads even if visible!=1. Any ideas on that?