MyBB Community Forums

Full Version: how to prevent guests from accessing a page in MyBB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi friends.

I want to ask.
how to prevent guests from accessing a page unless the user.?

I'm waiting for your answer friend
admin panel >> Users & Groups >> Groups >> Guests >> (Edit) >> Forums and Posts >>
uncheck Can view threads? , Can search forums? , Can view user profiles? and save

or you can use Guest's Can't View Threads plugin
Or if it is for a particular php (say, a custom gallery.php you have made to run with MyBB then) at the beginning of the page code, after basic declarations:

if (!$mybb->user['uid']){
	error_no_permission();
}
hi effone.

I use a plugin tinychat. http://mods.mybb.com/view/tinychat-plugin

where I can add the code.

Can you give me some idea where I can put the code.
open tinychat.php file in a text editor (eg. notepad++)
find require "./global.php"; in the beginning (line 3)
add the code given by effone after above code in a new line and save the file
thanks .m.

it was amazing.