(2009-05-14, 06:03 PM)Ryan Gordon Wrote: (2009-05-14, 05:58 PM)eXecute Wrote: I'm not sure how much research the MyBB team does on say vBulletin or IPB,
Yes, we spend all of our time studying vB and IPB. 
That's great!!! Very very good, studying the competition is the #1 way to defeat them. It's good news, I really appreciate developers who study the competition and try their best to defeat them.
If you wanna see a working example of how a standardized forum should work in permissions go to the forum in my signature, click on any of the forums in "General Programming" category, and then try clicking on a thread. That's I think what Labrocca REALLY wants.
HERE's the proper code fixes:
In order to fix your MyBB code to match the behavior of my permissions in the forum in my signature...
Edit
Forumdisplay.php: (i commented out the original code, so just try and find the similar coding in your file)
/*if($fpermissions['canviewthreads'] != 0)
{*/
// How many posts are there?
if($datecut > 0)
{
$query = $db->simple_select("threads", "COUNT(tid) AS threads", "fid = '$fid' $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' $visibleonly", array('limit' => 1));
$threadcount = $db->fetch_field($query, "threads");
}
}/*
} else {
error_no_permission();
}
*/
Then don't forget to put ratings back to way they were.
$multipage = multipage($threadcount, $perpage, $page, $page_url);
if($foruminfo['allowtratings'] != 0)/* && $fpermissions['canviewthreads'] != 0)*/
{
$lang->load("ratethread");
Then also don't forget to fix this area:
$icon_cache = $cache->read("posticons");
/*if($fpermissions['canviewthreads'] != 0)
{*/
// Start Getting Threads
$query = $db->query("
SELECT t.*, {$ratingadd}{$select_rating_user}t.username AS threadusername, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid){$select_voting}
WHERE t.fid='$fid' $tvisibleonly $datecutsql2
ORDER BY t.sticky DESC, {$t}{$sortfield} $sortordernow $sortfield2
LIMIT $start, $perpage
");
while($thread = $db->fetch_array($query))
{
if($db->type == "pgsql")
{
$thread['averagerating'] = $averagerating[$thread['tid']];
}
$threadcache[$thread['tid']] = $thread;
// If this is a moved thread - set the tid for participation marking and thread read marking to that of the moved thread
if(substr($thread['closed'], 0, 5) == "moved")
{
$tid = substr($thread['closed'], 6);
if(!$tids[$tid])
{
$moved_threads[$tid] = $thread['tid'];
$tids[$thread['tid']] = $tid;
}
}
// Otherwise - set it to the plain thread ID
else
{
$tids[$thread['tid']] = $thread['tid'];
if($moved_threads[$tid])
{
unset($moved_threads[$tid]);
}
}
}
/*}
else
{
$tids = $threadcache = null;
}*/
THEN, don't forget to edit
/inc/functions_forumlist.php
Find this area and match the code:
$hideinfo = false;
$showlockicon = 0;
/*if($permissions['canviewthreads'] != 1)
{
$hideinfo = true;
}*/
So then you guys are also planning to change this then:
"Create a
Select the type of forum you are creating - a forum you can post in, or a category, which contains other forums.
[]Forum
[]Category"
to
"Create a
Select the type of forum you are creating - a forum you can post in, or a category, which contains other forums.
[]Forum
[]Category
[]Redirect"
Right? (Sorry I didn't want to make a whole thread just for that little feature.)