16.05.2014, 15:01
So schlauer bin ich nicht geworden. Kann mir evtl. jemand diesen Code sagen und wo ich ihn einfügen muss. Bestimmt in den anderen jeweiligen php-dateien iwo oder global. grübel.
$Usergroups = array(1,5,7); //Gaeste und gebannte User haben keinen Zutritt
if(in_array($mybb->usergroup['gid'] && $forum['fid'] == 14 == $checkMyUsergroup))
{
error_no_permission();
}
if($fpermissions['canviewthreads'] != 0)
{
// How many posts are there?
if($datecut > 0 || isset($fpermissions['canonlyviewownthreads']) && $fpermissions['canonlyviewownthreads'] == 1)
{
$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly $datecutsql");
$threadcount = $db->fetch_field($query, "threads");
}
else
{
$query = $db->simple_select("forums", "threads, unapprovedthreads", "fid = '{$fid}'", array('limit' => 1));
$forum_threads = $db->fetch_array($query);
$threadcount = $forum_threads['threads'];
if($ismod == true)
{
$threadcount += $forum_threads['unapprovedthreads'];
}
// If we have 0 threads double check there aren't any "moved" threads
if($threadcount == 0)
{
$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $useronly $visibleonly", array('limit' => 1));
$threadcount = $db->fetch_field($query, "threads");
}
}
}
else{
error_no_permission();
}