Skip to:
Content
Pages
Categories
Search
Top
Bottom

Making forums visible to logged-in users only

  • @antipole

    Participant

    A request for guidance from a bbPress newbie, who has searched for help and tried various plugins but not found a solution.

    I am setting up a WordPress site (V4.2.2) with bbPress (v2.5.7). I want most forums to be browsable by registered logged-in users but not by the public. A logged-in user should be able to subscribe to a topic without admin approval, so they can contribute and get notified of new discussions or comments.

    If I make the forum Private that seems to stop unsubscribed but logged in users from seeing the forum. I need something like a ‘Logged-in users’ permission.

    Any guidance on how to set this up will be much appreciated – thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • @robin-w

    Moderator

    forums should be fully functional for logged in users, so your issue should not be there !

    bbPress is tested with wordpress default themes. It maybe a conflict – you need to check plugins and themes

    It could be a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.

    Then come back

    @antipole

    Participant

    Firstly, thank you for responding.

    I have disabled all plugins except BuddyPress and bbPress.
    I have switched to the theme Twentyfourteen.

    I still have a problem. Since simplifying as above, I have, signed in with admin rights, created a new topic in an otherwise empty private forum called ‘Domestic Water’. As that user I can read it etc.

    I then log out and back in as Testuser2 who has site role of Author and Forum Role of Participant. When I select the forum ‘Domestic Water’ from the list in the side bar I get a screen as shown here.

    Note that Private is repeated twice. The blue box is correct, saying there is one topic in the forum.
    But I then get a yellow box “Oh bother! No topics were found here!”

    Your further advice will be very much appreciated.

    @robin-w

    Moderator

    This could be an issue with your rewrite rules. To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings>Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.

    @antipole

    Participant

    Robin… before I got your suggestion regarding rewrite rules, I had begun to suspect corruption of permissions in my forum database entires. I created a new test forum and it worked OK.

    So, for each empty forum I deleted it and created a new one. For each forum with topics, I created a new one, i.e. Forum A new, reassigned the topics from Forum A to Forum A new, deleted Forum A and then renamed Formum A new to Forum A.

    This has cleared my problem and I can now view the forum topics as Testuser2.

    How the problem arose, I do not know. There have been WordPress or bbPress updates recently and possibly something did not upgrade properly.

    There remain two issues:
    The keyword PRIVATE: is shown twice in the display of the forum contents.
    If the forum is empty, a blue box correctly says This forum is empty but then a yellow box says Oh bother! No topics were found here!

    In the latter case, I suspect a coding error whereby the empty forum is spotted but the code still tries to display the topics.

    Do I still need to reset my permalink as you suggest?

    Meanwhile I shall start re-instating my plugins etc.

    thanks for your support.

    @robin-w

    Moderator

    You can remove ‘private’ by adding the following to your functions file

    add_filter('protected_title_format', 'ntwb_remove_protected_title');
    function ntwb_remove_protected_title($title) {
    	return '%s';
    }
     
    add_filter('private_title_format', 'ntwb_remove_private_title');
    function ntwb_remove_private_title($title) {
    	return '%s';
    }
    

    or if you are not into coding, use my plugin
    https://wordpress.org/plugins/bbp-style-pack/

    which has the ability to remove it.

    If the forum is empty, a blue box correctly says This forum is empty but then a yellow box says Oh bother! No topics were found here!

    This will obviously only show until one topic is created, so is very temporary. I could work out some code to remove it, but maybe just create a topic and it will disappear !

    @antipole

    Participant

    I am trying your bbl-style-pack plugin, as that would be easier for others to maintain should that situation arise.

    The Remove Private option removes both occurrences of the PRIVATE: prefix. It also removes private forums entirely from the (bbPress) Forums List widget display when on an ordinary page (not just the prefix PRIVATE:) – but not when displaying a forum list. I suspect that this is not what was intended.

    [Incidentally, the bbpStyle pack Forum Display tab has a minor typo in section 4. The tick box reads Move subscribe to rightRemove private prefix rather than Remove private prefix

    What I want to achieve is to remove one occurrence of the duplicate wording in the forum display heading PRIVATE: PRIVATE: forum name. Are you able to suggest a solution for this?

    Regarding the Oh bother! No topics were found here!, yes creating a topic would remove this, but I have created empty forums to guide users as to which forum to use for their potential topic. It would be nice to lose that message when you are next in that code.

    thanks again

    @robin-w

    Moderator

    thanks for the typo, I’ll fix that on next release.

    both bbpress and wordpress add the ‘Private’ heading, hence why it appears twice. My style plugin removes both, which is not what you want, but what it does !

    I’ll take a further look if I get some time

    I am just a humble bbpress user, I’m not an author of bbpress, so

    It would be nice to lose that message when you are next in that code.

    ain’t gonna happen !

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar