bbPress

Simple, Fast, Elegant

bbPress plugin browser »

Hidden Forums (0.0.4)

Download

Version: 0.0.4

Last Updated: 2008-9-5

Requires bbPress Version: 0.9 or higher

Compatible up to: trunk

Author Homepage »

Plugin Homepage »

Donate to this plugin »

Average Rating

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

Your Rating

Author: _ck_


  1. The tag issue is a inherited problem with how bbPress works. There is no easy way to see what tags belong to what forums without complex mysql queries which would slow it down.

    I might be able to address it someday with a replacement tag function for the hot tags list.

    Posted: 2 months ago #
  2. keress

    Member

    I'm interested in using this plugin, but I need to know, will I be able to move a post or thread from an open forum into a hidden forum? We want to allow open discussion, but we don't want to get sued. If a conversation strays into an area that may be objectionable if open to the public, we'd like to make it private. Can we do this with bbpress and this plugin?

    Posted: 2 months ago #
  3. When a topic is moved into a hidden forum it will become hidden.

    bbPress doesn't have a built in way to move single posts yet (it's currently slated for version 1.5 ) and the "Move It" plugin to do that should definitely not be used until I have some time to either fix it up or re-create it (given current donation levels don't hold your breath).

    Posted: 2 months ago #
  4. NeBricks

    Member

    Very nice plugin, thanks ck. :)

    2 issues (probably because I'm a complete amateur with php):

    - Hidden posts showing up in rss was mentioned a couple of pages back and I have a similar problem. Although the links don't show up in the rss (so the post won't be visible when the feed is interpreted by most feed-readers), the body and date of the post is there, so when I (for example) view the feed in Firefox's built in preview, I can read hidden posts regardless. I know that I could just remove all content from the feed and leave only the links, but I'd rather not, if at all possible. Is there a workaround for this?

    - Viewing forum.php for a hidden forum, the <title> for the page includes the string from $hidden_forums['label'], resulting in an ugly page title (especially if there is html in there). Again, is there a way to avoid this?

    Thanks in advance for any help.

    Edit: I'm running 0.9.0.2.

    Posted: 1 month ago #
  5. You are saying hidden posts show up in RSS when you are logged OUT ? Makes sure you are logged out when testing. If they still show up, I need to know what kind of feed it is.

    Unfortunately the title of the page would be tricky to separate from the page body and take more time than I have now (though it could be done with a bit of work by moving the hook from bb_init to bb_head). You can temporarily disable it from appearing entirely by commenting out this line:

    // add_filter( 'get_forum_name', 'hidden_forums_label',11,2);
    Posted: 1 month ago #
  6. NeBricks

    Member

    Ok, thanks.

    As for the rss thing, I was POSITIVE I'd tried it when logged out. Evidently not though :S.
    You are in fact right and it does work correctly. My bad. :)

    Posted: 1 month ago #
  7. jsamlarose

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    Firstly, just want to add another voice to the "I love this plugin" chorus. I'm using it with bbPress 1.0 alpha, and everything seems to be going fine.

    One thought– how difficult would it be to restrict the [H] to be viewed by key masters only? It's definitely useful for me to have the visual confirmation of what's hidden and what's not, but my users don't really care, as long as they can see whatever they're supposed to see...

    Posted: 1 month ago #
  8. musnake

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    This works great in WP2.6.2 + bbPress 1.0a2.
    Thanks.

    I'm terrible at CSS, but I made a few changes to display an icon which I put here: /my-plugins/hidden-forums/shield.png

    /bb-admin/style.css

    /* Custom */
    #shield {
    	background-image:url(../my-plugins/hidden-forums/shield.png);
    	background-repeat:no-repeat;
    	margin: 0 10px 0 0;
    	width:16px;
    	height: 100%;
    	float:left;
    	padding: 0 0 5px 0;
    }

    /bb-admin/content-forums.php line 73, I added the shield class:

    <ul id="forum-list" class="list:forum list-block holder widefat shield">

    On the front end...

    /my-templates/jingo/style.css I added the CSS:

    /* Custom */
    #shield {
    	background-image: url(../../my-plugins/hidden-forums/shield.png);
    	background-repeat:no-repeat;
    	margin: 0 10px 0 0;
    	width:16px;
    	height: 100%;
    	float:left;
    }

    And then in the plugin file itself,
    /my-plugins/hidden-forums/hidden-forums.php I specified the html to use as the label:

    //$hidden_forums['label']="[H] ";
    $hidden_forums['label']="<span id='shield'>&nbsp;</span>";

    Now, the spacing etc works for me in FF3. If there's a correct way of doing this please share!

    Posted: 1 month ago #
  9. jsamlarose, to make the label only show for administrators you can try changing this function slightly to this:

    function hidden_forums_label($title,$id) {
    	global $hidden_forums;
    	 return ((bb_current_can('administrate') && in_array($id,$hidden_forums['hidden_forums'])) ? $hidden_forums['label'] : "").$title;
    }

    untested but in theory should work

    Posted: 1 month ago #
  10. To prevent 404's on Hidden forums when users logout edit your .htaccess file and add these two rules to the bottom of the rule list (before </ifmodule>)

    RewriteRule ^topic(|/)$ /forums/ [R=302,L,QSA]
    RewriteRule ^forum(|/)$ /forums/ [R=302,L,QSA]


    Note that you have to change /forums/ to the base of your forum path, whatever it might be if it's not forums. ie. /discussions/
    /community/
    whatever, etc.

    Posted: 1 month ago #
  11. Hi _ck_.
    This plugin is really handy! Thanks very much for all your hard work. :)

    One problem though - I found that, after activating and configuring it, I started getting this PHP error at the top of all my bbPress pages:
    Warning: in_array() [function.in-array]: Wrong datatype for second argument in <snip>/bb-plugins/hidden-forums/hidden-forums.php on line 54
    In this case, line 54 was:
    if (in_array($id,$hidden_forums['allow_users']['all_forums'])) {$hidden_forums_list=array();} // don't filter anything

    As I wasn't using the plugin to allow specific users access to a forum (only user roles) I commented this line out, along with the opening and closing of the statement (ie else { and }) below it, and the plugin works fine.

    In case it's relevant, I'm using bbPress v1.0-alpha-2, MySQL 4.1.22-standard and PHP 5.1.6.

    Posted: 6 days ago #

RSS feed for this topic

Add a Comment

You must log in to post.

Code is Poetry.