Sam Srauy (@drsammy)

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Found Phillips’ brilliant code awhile back. I changed it a little bit for more control:

    function lab_logged_in_bbptopics($have_posts){
    if (!bbp_current_user_can_publish_forums()){
    $have_posts = null;
    return $have_posts;
    add_filter(‘bbp_has_topics’, ‘lab_logged_in_bbptopics’);
    add_filter(‘bbp_has_forums’, ‘lab_logged_in_bbptopics’);
    add_filter(‘bbp_has_replies’, ‘lab_logged_in_bbptopics’);

    You can then use any of the user role plugins to specify which user (or user level) can publish forums. Of course, logged out users don’t have a bbp_current_user_can_publish_forums() set so they’ll automatically be denied access to the forums. Hope you enjoy!

    Also, I changed the “Oh bother! …” text in bbpress/feedback-no-forums.php to say “You have to be logged in and have permission to see the forums.”

    Hope this helps someone. And, thank you Philip for sharing your code to begin with! It certainly helped me a lot.

Viewing 1 replies (of 1 total)