bbPress Plugin Browser »

Private Forums (5.0)

Download

Version: 5.0

Other Versions

Last Updated: 2007-7-17

Requires bbPress Version: 0.74 or higher

Compatible up to: 0.74

Author Homepage »

Plugin Homepage »

Donate to this plugin »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(15)

Your Rating

Author: Aditya Naik

This plugin filters private forums from view when the user does not have appropriate role. The Access level can individually for each of the forums be set to following: * Open to all * Registered Users * Moderator * Administrator .

The plugin enables the administrator to set forum or forums as private from the administration menu. The Administrator can set the role to which the selected forums are restricted to.

The administrator can choose how the forum handles the private forums. the forums can either be completely hidden or shown with a text prefix like "[private]". the prefix is customizable through the options.

The admin can also select the text to be shown in case access is denied. The error message to be shown is parsed and the word 'login' is replaced by the link to login page.

The admin menu can accessed by Administrators from
Admin > Site Management > Private Forums

Tags: , ,

  1. To make this work I had to change the opening line:

    <?

    to:

    <?php

    Posted: 5 years ago #
  2. helgetry

    Member

    This works fine for me, apart from that it's impossible to post to the public forums without being logged in as a user. I would like one of my forums to be entirely open, so that non-members can post their questions and stuff. Is this adapted in this plugin? (Or can it be adapted?)

    Posted: 5 years ago #
  3. just dont make that forum as private.. that will allow users to post without logging in.

    Posted: 5 years ago #
  4. Could either of you guy's tell me how to get this runnin? Because when I downloaded it nothing worked. And I don't know if I could. And you can email me the answer at darwin@bsgprogrammers.com So that I would know.

    Posted: 4 years ago #
  5. wenkong

    Inactive

    Thanks, its work!
    (just upload to /bbpress/my-plugins, after that will appear in Admin Page "Site Management".)

    Can I use this plugin for Private Topic/Post?
    because all posts will be protected if Private Forums, I just need to protect some secret topic.

    Posted: 4 years ago #
  6. helgetry

    Member

    so1o wrote:
    just dont make that forum as private.. that will allow users to post without logging in.

    **

    In my forum, they're allowed to read from, but not to post in the unprivate forums... I want them to be able to both read and post. Is that possible?

    Posted: 4 years ago #
  7. if i am getting your drift - you want anonymous posting feature?

    for that you'll have to wait for a couple of days.. the feature is being built into bbpress.

    Posted: 4 years ago #
  8. Thank you for the plugin!

    I was wondering if I could also create private forums for mods, admins, and key masters only?

    Posted: 4 years ago #
  9. I agree Aristocrat. In fact, I need that exact function. Either create some bbpress user groups, or link it to the usergroups already in WordPress. For my purposes, the Private Forum would only be open to Authors and up.

    By the way, awesome plugin. I've tried all the forums available for WordPress. This one is the best so far.

    Posted: 4 years ago #
  10. Hi. Great plugin. Could you please fix the "<? to <?php" that it is more compatible?!

    Posted: 4 years ago #
  11. Ah I misunderstood what this plugin was for but am trying to hack it to do what I want.

    I'd like a private forum that only moderators and admin can access.

    Your filter system makes it possible but I am having a hard time figuring out where to hack in

    && bb_current_user_can('moderate')

    It would be lovely if a future version of this plugin can set one of the levels in bbpress instead of just ON or OFF.
    ie.
    'administrate' only for administration + key master
    'moderate' only for moderators and above
    'participate' only for logged in (as you have it now)

    Posted: 4 years ago #
  12. i'll work on that feature this weekend. stay tuned for the update..

    Posted: 4 years ago #
  13. Oh that would be wonderful, hope you like the idea and see how it's a natural extension of it.

    It would take me a week to figure out exactly how to hack it to do that on my own!

    You should be able to maintain backward compatibility for existing users too, right?

    Posted: 4 years ago #
  14. yup.. I updated the plugin to version 4.0. now the forums can be restricted by user role as you suggested.

    by default the members would have access to the restricted forums..

    I hope it is bug free.. but i do dream a lot :)

    Posted: 4 years ago #
  15. Ooh nice. Thanks for the fast work!
    I'll have to bring the forums back online and give it a try.

    Posted: 4 years ago #
  16. Seems to work well, great work.

    Only further suggestion would be to allow the level to be set on a per forum basis rather than a blanket setting for all - ie. that pulldown box could be listed next to each forum name rather than just the checkbox, perhaps add the level "open" as default to show which ones are not affected?

    I wonder what happens on search too, will messages from the private forums be excluded? I think you already have RSS covered right?

    This plugin adds some a serious professional feature to bbpress that one would expect out of vbulletin level software.

    Posted: 4 years ago #
  17. Definite problem, private forums are returned in search results.

    Added: private posts can also be seen in logged out RSS

    There is a filter called "get_latest_forum_posts_where" so hopefully that can be addressed that way?

    What really bothers me is I can't find a similar filter for search so I sure hope I am wrong and it can be filtered in a similar way.

    Posted: 4 years ago #
  18. I whipped this up - testing working!
    Works with search only if you hack the search.php since search has no filters :-( submitted a ticket...

    function private_forums_filter_private($where,$prefix=''){
    if (!private_forums_check_user_access()) {
    	$private_forums = private_forums_custom_get_options('private_forums');
    	foreach (array_keys($private_forums) as $forum) {
    		$where.=" AND ".$prefix."forum_id != ".$forum."  ";
    	}
    }
      return  $where;
    }
    add_filter( 'get_latest_topics_where', 'private_forums_filter_private');
    add_filter( 'get_latest_posts_where', 'private_forums_filter_private');

    To make search obey the filtering, you have to change these three lines in /bbpress/search.php - since search.php changes in the next version, there will have to be another patch, unless we get a WHERE filter for search also...

    $titles = $bbdb->get_results("SELECT * FROM $bbdb->topics
    				WHERE LOWER(topic_title) LIKE ('%$likeit%') AND topic_status = 0 ".private_forums_filter_private("")."
    				ORDER BY topic_time DESC LIMIT 5");
    
    $recent = $bbdb->get_results("SELECT $bbdb->posts.*, MAX(post_time) as post_time FROM $bbdb->posts RIGHT JOIN $bbdb->topics ON $bbdb->topics.topic_id = $bbdb->posts.topic_id
    				WHERE LOWER(post_text) LIKE ('%$likeit%') AND post_status = 0 AND topic_status = 0 ".private_forums_filter_private("",$bbdb->topics.".")."
    				GROUP BY $bbdb->topics.topic_id ORDER BY post_time DESC LIMIT 5");
    
    $relevant = $bbdb->get_results("SELECT $bbdb->posts.* FROM $bbdb->posts RIGHT JOIN $bbdb->topics ON $bbdb->posts.topic_id = $bbdb->topics.topic_id
    				WHERE MATCH(post_text) AGAINST ('$q') AND post_status = 0 AND topic_status = 0  ".private_forums_filter_private("",$bbdb->topics.".")."
    				LIMIT 5");
    Posted: 4 years ago #
  19. About the roles for each forum.. i have thought about it. i just want to hammer other things out first before i take that leap.. i think i'll first fix the rss and search.. because that seems to be more critical.

    Posted: 4 years ago #

RSS feed for this topic

Add a Comment »

You must log in to post.