Info
- 4 posts
- 3 voices
- Started 1 year ago by photographypool
- Latest reply from Tom(dB)
- This topic is not resolved
Restrict access to forums
-
- Posted 1 year ago #
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?
-
- Posted 1 year ago #
There was a "hidden forums" plugin, but it's from a while ago:
http://bbpress.org/plugins/topic/hidden-forums/page/6/There was also "read only forums":
http://bbpress.org/plugins/topic/read-only-forums/Maybe one will still work or give you ideas for your own plugin.
-
- Posted 1 year ago #
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
-
- Posted 1 year ago #
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 } ?> -
You must log in to post.