Quote:
Originally Posted by NTLDR
Would be nice to see proper permissions for the forums. Good to see some use of the datastore and the cron system here.
|
You mean something like this?
PHP Code:
$forumpermsmday = fetch_permissions($mday['forumid']);
if (!($forumpermsmday & CANVIEW))
{
unset($mday['forumid']);
unset($mday['forumname']);
}
This will hide the forum from the users that cannot see them. A conditional in the template is also needed.
However there is no easy way to do this. Even if the forum is not shown the user can know that since there is no favorite forum it means that the user has 0 posts (not likely) or the forum is a private one. Then he knows that there are private forums. Sometimes you don't even want your users to know that there are private forums.
Of course, I could always run the favorite forum check at index.php and if the first forum can't be seen I would go for the second, third or fourth one. But that query is a little heavy and I wouldn't like it to run at the index page.