MyBB Codes
[Tip&Trick] Show the Topic Lists on no permissions forums. - Printable Version

+- MyBB Codes (http://www.mybbcodes.com)
+-- Forum: Babjusi's Previous Forum General Stuff (/forumdisplay.php?fid=42)
+--- Forum: General Support (/forumdisplay.php?fid=46)
+---- Forum: Tutorials (/forumdisplay.php?fid=50)
+---- Thread: [Tip&Trick] Show the Topic Lists on no permissions forums. (/showthread.php?tid=1102)


[Tip&Trick] Show the Topic Lists on no permissions forums. - babjusi - 11-29-2009 05:44 PM

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.


RE: [Tip&Trick] Show the Topic Lists on no permissions forums. - Srini - 12-16-2009 06:53 AM

ya.. nice.. i am using Dis...


RE: [Tip&Trick] Show the Topic Lists on no permissions forums. - Starnova - 01-11-2010 01:34 AM

Very Nice..I had been asking for something like this on two other forums.. Thank you Babjusi ! It has aided with sign upsWink


RE: [Tip&Trick] Show the Topic Lists on no permissions forums. - babjusi - 01-11-2010 11:11 AM

You are most welcome Smile