MyBB Codes

Full Version: [Tip&Trick] Show the Topic Lists on no permissions forums.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This small edit will allwow you to show the topic lists inside all your forums that you have denied access to different usergroups to enter them.

i.e. say, you have a forum/forums that you want to deny access to guests for ex, but you want them to see it/them, you would simply disallow them access at the permissions and then at the Configuration-Forum Home Options, you would set the Hide Private Forums? to No. So anytime a guest that clicks at that forum will get the no permission error.

But personally I would like to take it a step further. I want them to be able to see all the topics inside that forum, so they know what they are missing on. To do that find the following code at forumdisplay.php file:

if($fpermissions['canview'] != 1)
{
    error_no_permission();
}

And change it to:

if($fpermissions['canview'] != 1 && $thread['tid'])
{
    error_no_permission();
}

Now all the usergroups that don''t have permissions at certain forums, will be able to see all the topics inside that particular forum, but not the posts themselves.
ya.. nice.. i am using Dis...
Very Nice..I had been asking for something like this on two other forums.. Thank you Babjusi ! It has aided with sign upsWink
You are most welcome Smile
Reference URL's