Skip to:
Content
Pages
Categories
Search
Top
Bottom

Restrict access to forums


  • photographypool
    Member

    @photographypool

    I want anyone to be able to browse through all the posts in my forums, but if they click a post to read its content, instead of what is actually written in the post they simply see ‘you must register to view this post’

    Is this possible? through an existing plugin maybe?

Viewing 3 replies - 1 through 3 (of 3 total)

  • chrishajer
    Participant

    @chrishajer

    There was a “hidden forums” plugin, but it’s from a while ago:

    https://bbpress.org/plugins/topic/hidden-forums/page/6/

    There was also “read only forums”:

    https://bbpress.org/plugins/topic/read-only-forums/

    Maybe one will still work or give you ideas for your own plugin.


    photographypool
    Member

    @photographypool

    Neither of them have the features i’m looking for, and I’m way too stupid to think about coding a plugin, I guess I will have to give up on the idea.

    Thanks anyway


    deadlyhifi
    Participant

    @tomdebruin

    You could do this in the theme files.

    In topic.php, around line 35 where the topic posts are listed, check if they’re logged in.

    e.g

    <?php if ( bb_is_user_logged_in() ) { ?>

    <?php foreach ($posts as $bb_post) : $del_class = post_del_class(); ?>
    <li id="post-<?php post_id(); ?>"<?php alt_class('post', $del_class); ?>>

    <?php bb_post_template(); ?>
    </li>
    <?php endforeach; ?>

    <?php } else { ?>

    <li>Sorry, you must be logged in to view this - register now!</li>

    <?php } ?>

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