How to prevent guests from reading content in vBulletin

Discussion in 'Content Management System' started by coderzone, Jan 10, 2013.

  1. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    736
    Likes Received:
    38
    Trophy Points:
    28
    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
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    You have to set the forum permissions to disallow forum view access
     
  3. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    736
    Likes Received:
    38
    Trophy Points:
    28
    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.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    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 likes this.
  5. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    736
    Likes Received:
    38
    Trophy Points:
    28
    That really worked.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice