[FAQ] How to make your forum private


  • Admin

    This should probably go into the documentation at some point but I thought I'd post this on the forum for now.

    Hiding /users route from public

    In the Settings ACP, select "Make user info private"

    Hiding categories from non-registered users

    In the Categories ACP, for each category click on "Options" and then "Access Control". For registered-users and administrators, select all boxes like so:

    Leave these four options blank for guests.

    Redirecting guests to the login page

    In the Themes ACP, click on "Widgets" and drag an HTML widget onto the Global Header widget area. In the HTML field, copy and paste the following code and then hit save.

    <script>
    if (!app.uid && ajaxify.currentPage !== 'login' && ajaxify.currentPage !== 'register') {
     ajaxify.go('login');
    }
    </script>
    

  • Global Moderator

    Good jerb, question, probably more for @trevor, how would I go about adding a splash page to the site, that displayed the login form and an option to continue as a guest? Whilst keeping the homepage etc as it is.

    Easily achievable?


  • Admin

    Funny enough he asked that same question a little while ago, let me search for it


  • Admin


  • Global Moderator

    @psychobunny said:

    https://community.nodebb.org/topic/2309/login-via-home/3

    Close enough. :laughing: I'm going to add a full splash screen which covers the homepage, then either logging in or clicking Continue As Guest will show the homepage. :thumbsup:


  • Admin

    Same here. When I get the free time I want to add a splash page for this forum that lists the latest blog entries, active threads from today, and some better messaging about our premium hosting etc


  • Global Moderator

    @psychobunny said:

    Same here. When I get the free time I want to add a splash page for this forum that lists the latest blog entries, active threads from today, and some better messaging about our premium hosting etc

    Good stuff, if I make any progress on this, I'll post the code up. Shouldn't be too difficult.



  • @psychobunny

    Thanks for the guide, really appreciate the effort to include those of us who need private forums as well.

    Now, if only we had a single button or checkmark option to do all these steps in one go... ;)



  • A little necromancy update for the above JS for 2016 and nodebb 1.2.1:

    <script>
    $(window).on('action:ajaxify.end', function(event, data) {
        if (!app.user.uid && ajaxify.currentPage !== 'login' && ajaxify.currentPage !== 'register') {
            ajaxify.go('login');
        }
    });
    </script>
    

Log in to reply
 

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.