MyBB Community Forums

Full Version: Can view threads/ Can read threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In mybb there is a permission: Can view threads
But Is there any permission like this in mybb:
Can read threads
I mean a group can view last post title within index page, he can veiw thread titles within /forumdisplay.php?fid= pages, but when he click on thread title to enter /showthread.php?tid= he cant read content until he has required group permissions
You'd need a plugin, I think this does what you want - http://mods.mybb.com/view/guest-s-can-t-view-threads
Thanks for reply. I am aware of that plugin
But I would like to make it "Group dependent" not for the guest group only
When I was using phpbb, there was an edit to core files to bypass auth check for /forumdisplay.php?fid= pages so thread tiltles are always viewable
Not sure if anything exists like that - moved to requests.
You can edit the plugin for group dependency.

Open plugin file (./inc/plugins/gcvt.php) and find;

function gcvt_thread()
{
	global $db, $mybb,$lang, $thread;

                	if($mybb->user['uid'] == 0)
                	{
                    	error("Guests cannot view threads.","Error");
                	}
		
		
	
	$lang->send_thread = "";
}

Replace this with the following;

function gcvt_thread()
{
	global $db, $mybb,$lang, $groupscache, $thread;
	$groups = $mybb->user['usergroup'];
	$allowed = "3,4,6,8"; // edit these User Groups to allow them to see threads

                	if(!in_array($groups,$allowed))
                	{
                    	error("Sorry, you are not allowed to view threads.","Error");
                	}
		
		
	
	$lang->send_thread = "";
}

You have to edit this line too;
	$allowed = "3,4,6,8";
and add those User Group IDs who shall see/view/read threads. But separate each ID with ,
Thanks
But where can I find group dependency plugin? is it a mybb core file?
Download this plugin and edit the code above: http://mods.mybb.com/view/guest-s-can-t-view-threads
Thanks Valdaram
will try toy tip and come back with any feedback
Actually, I found a better fix here: http://community.mybb.com/thread-58893.html
Big thanks to babjusi