bbPress

Simple, fast, elegant

bbPress Plugin Browser »

Hidden Forums (0.0.9)

Download

Version: 0.0.9

Last Updated: 2009-5-13

Requires bbPress Version: 0.9 or higher

Compatible up to: 0.9

Author Homepage »

Plugin Homepage »

Donate to this plugin »

Average Rating

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

Your Rating

Author: _ck_


  1. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    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: 1 year ago #
  2. 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: 1 year ago #
  3. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    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: 1 year 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 year ago #
  5. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    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 year 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 year 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 year 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 year ago #
  9. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    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 year ago #
  10. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    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 year 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: 1 year ago #
  12. one little thing that i've noticed is this...

    if you allow guests to post (using the anonymous posting plug-in) and they visit the hidden forum, then they can still post topics into it using the post form which appears.
    since in most cases the hidden forum is likely only going to be one number out from the normal forums, it's not impossible that they could cobble together the correct URL.

    sure, they won't actually be able to see it... but is there a little line that we can out into our forum template to hide the form altogther?

    this bug might apply for registered members being able to post as well, but i haven't checked that

    Posted: 1 year ago #
  13. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    I haven't tested this against anonymous posting, but they should not even be able to enter the hidden forum, it should redirect them away. The anonymous plugin might be overriding something, what happens if you deactivate anonymous and try entering the hidden forum without being logged in?

    Posted: 1 year ago #
  14. after having another look i don't think it's got anything to do with anonymous posting.
    it's something to do with the hidden forums plugin. because this is what i'm getting...

    with anonymous posting turned on:
    Both guests and members can visit the URL, and use the form which appears to post a topic into the hidden forum. But they can't actually see the forum, or the topic which they've posted. (After they've posted it, they get the 'Topic not found' message appear -- but it does actually post.)

    with anonymous posting turned off:
    Members can still do as above. Guests get the 'You must log-in to post' message

    If a guest or member tries to visit a URL that doesn't actually exist, then they get the correct 'Forum not found' message -- which i'm guessing is what they should be seeing for the hidden forum.

    Posted: 1 year ago #
  15. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    I need to know what version of bbPress you are using and the hidden forum settings you are using to make sure there is not a mistake.

    During posting, an anonymous user is actually a member for a moment.
    Anonymous posting is a very, very, very messy process. Very.
    (I would never use it on any of my own forums so that might make a point.)

    But there might need to be some filter adjustments for newer versions of bbPress with Hidden Forums in regard to posting. They are constantly breaking things.

    Posted: 1 year ago #
  16. i'm using 1.0-Alpha-4.
    i've got one forum hidden for everyone except 'administrator' and 'moderator'
    i'm not any using any of the settings for individual users

    i'm happy to give you a link so you can see...
    http://www.londondrum.com/forum/

    this is the hidden forum, which you can still post into...
    http://www.londondrum.com/forum/forum.php?id=10

    Posted: 1 year ago #
  17. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    I've been able to reproduce the problem you are talking about on the bbpress trunk
    (where you get the "New Topic in this Forum") when an anon user has the ability to start topics and somehow knows the hidden forum url and still gets the posting form.

    I've just posted 0.0.5 with a temporary workaround to prevent entry into forums that they should not be.

    Posted: 1 year ago #
  18. cool, thanks

    Posted: 1 year ago #
  19. AnttiJN

    Member

    It would be nice, if it would be possible to hide all forums without listing their id's. Or can this already be done?

    edit: btw thanks for the great plugin!

    Posted: 1 year ago #
  20. _ck_

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Moderator

    AnttiJN, sorry that's not built in (because it's very unusual).
    Why are you trying to hide all forums? Sounds like you might need a better solution.

    Posted: 1 year ago #

RSS feed for this topic

Add a Comment »

You must log in to post.

Code is Poetry.