Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Content Management System (http://www.go4expert.com/forums/content-management-system/)
-   -   How to prevent guests from reading content in vBulletin (http://www.go4expert.com/forums/prevent-guests-reading-content-vbulletin-t29415/)

coderzone 10Jan2013 19:45

How to prevent guests from reading content in vBulletin
 
I don't want guests to be able to read content of a vBuletin forum but I want them to be able to see the forums, sub forums as well as see the thread links in the forums.

How can I get this done in vBulletin? Any plugin or anything. I am using vBulletin 3.x Latest

shabbir 10Jan2013 20:06

Re: How to prevent guests from reading content in vBulletin
 
You have to set the forum permissions to disallow forum view access

coderzone 10Jan2013 20:07

Re: How to prevent guests from reading content in vBulletin
 
Yes but that would disallow reading of forums and sub forum under a forum but I want people to be able to read what forums and sub forums are there in the forums as well as when they click the forum they would show the threads in the forum and then when they click on threads they should be asked to login.

shabbir 11Jan2013 09:31

Re: How to prevent guests from reading content in vBulletin
 
This would need some really simple plugin code that you may need to place in the showthread hooks. It is so simple code that I thought of sharing them here instead of making the plugin out of it.

Add the following code in the couple of hooks.
  1. showthread_start
  2. showpost_start
Code:

if(!$show['member'])
{
print_no_permission();
}

And that should do the trick for you.

coderzone 11Jan2013 13:28

Re: How to prevent guests from reading content in vBulletin
 
That really worked.


All times are GMT +5.5. The time now is 02:07.