MyBB Community Forums

Full Version: Demand login from guest when trying to view a thread
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.
I am new to myBB, i would like to know if is it possible to ask the guest to register/login when he tries to view a thread by clicking on an thread title?
Currently, guests are able to view the thread without login in.

Thank you.
ACP>>Users & Groups>>Groups>>Guets>>Forum and posting tab>> Un-check "Can view threads?">>Save
Wow, this is weird.
I tried un-checking that option and saving it.
But it doesn't work. Yes, i wasn't logged in and i haven't changed anything as this is a new mybb installation.

All i did was, it tried installing this mod http://mods.mybb.com/view/guest-s-can-t-view-threads
and activated it. Since when i found how to do it, i deactivated the plugin and removed it.

Why isn't it working? Guests can see the threads too, even though i unchecked the options. :o
URL?
wootmovies.com
Looks like it's setup correctly, apart from the first category where I can see threads as a guest?
The things which i exactly want is, users should see Threads. I mean they can browse the forum. See those thread titles and stuff, but when they click on a particular thread to view it's content. They should be promoted for login/register.

The option does the same, right ?
If i am not mistaken.
No, you'll need the plugin for that.

The option in the ACP stops them viewing the threadlist too.
ohhh, now i see.
You know any such plugin which would prompt to login/register when user clicks on a thread ?
Coz the one i stated before just shows a message saying "guest arent allowed to view thread"..


Alright, i have managed to solve this issue.
For anyone who are looking for solution to the problem. Here is what i did.

Download this plugin: http://mods.mybb.com/view/guest-s-can-t-view-threads

Open gcvt.php in notepad

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


To

if($mybb->user['uid'] == 0)
{
error_no_permission();
}


Save file.
Upload to /inc/plugins
Go to plugin manager and activate.

And thanks to Jammerx2 for the actual plugin.