MyBB Community Forums

Full Version: How to show thread titles to - but hide posts from - non-members?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Cool You're the man.
This is a great idea, but how about making it so that certain forums are exempt? Would that be an easy fix? Wink Just wondering.
Been using this script for months with great results. Now ... would it be possible to configure it to allow GoogleBot, MSN Search and Yahoo! Slurp to be allowed full access? Please? That would be the icing on the cake.
can't this just be done in the forum permissions section in the Admin CP?
ive made it so guests can view our miscellaneous forums but cant access the threads.
This was a really helpful thread to me - thanks.

I operate a small forum on behalf of a small, non-profit making car club, which has a mixture of forum users across 'paid member' and 'registered user' levels. I wanted to provide an exception to the settings given in the ACP to allow 'registered users' access as far as the thread titles within the members section, but no access beyond that to posts.

I modified Lex's original code to only apply to Group 2 (registered user) and require the forum ID to be one of a list (which I specified as an array).

If anyone comes here by Google later, I'm happy to upload my modified version. Smile
It would be nice to share your plugin - maybe mods site or here
(2016-04-09, 10:08 AM)Eldenroot Wrote: [ -> ]It would be nice to share your plugin - maybe mods site or here

Sure.   I'm new to tinkering with the backend beyond installing other (clever) people's plugins and basic file editing, but having had to learn some C++ to program Arduino microcontrollers, I now realise that some of the PHP is very near to C++ in syntax and function.

I have added a comment block that explains within the attached file how to use it and hopefully it is self explanatory.

Reproduced here...

 To use on your own forum:
  1. Edit this file to include the forum IDs that you wish to restrict access to and place them within the array to be compared against $forum['fid']
  2. Edit the Usergroup to match your requirements.  An array will work here too if you need one.
  3. In your ACP, go to custom permissions and allow 'view' access to the forums listed below to the usergroup(s) you have listed at 'can view forums' and 'can view threads within forum' level.  The plugin detects access to posts and provides the 'not authorised' message.  It is essential that the custom permissions are set or the thread listings won't appear.
  4. Note that this was the first plugin I have produced - it appears to work perfectly and is so small and simple that I understand how it works, so it should be fine.  please let me know if you find any improvements or unintended consequences.
Good luck!  Smile
Pages: 1 2