Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to hide bbpress forums from users while allowing forums in buddypress groups

  • @ougian

    Participant

    I am using buddypress 1.0.1 + WPMU 2.7.1 + bbpress 1.0-rc-1

    I suppose even if the groups forums are set to private, users can still see the threads posted from bbpress and can post in those threads.

    I would like to hide the whole bbpress from the users and still allow users to access the forums through buddypress groups. But at the same time I would also like to use bbpress administration as the forums cannot be managed through buddypress.

Viewing 17 replies - 1 through 17 (of 17 total)
  • @plrk

    Participant

    I solved this by creating a bbPress theme that simply made everything invisible (css “display: none;” on everything) and redirected the users to the start page of my community by means of a meta refresh redirect.

    Since I am so extremely witty, I called it “Kakumei None”. You can download it here: http://dropbox.jobjorn.se/kakumei-none.zip

    @ougian

    Participant

    thanks for the wonderful fix :)

    @af3

    Participant

    I think this capability is something important that is missing in bp groups. The concept of group and its integration with bbpress are certainly expanding the users interaction within bp groups; yet the privacy of groups discussion is not assured.

    Firstly, is there a quick fix to autohide all bp groups forum from bbpress forum? I have not enabled group forum support because of this issue; and currently only using a separate install of bbpress integrated with wordpress as a place for general forum discussion. Hiding the whole forum is certainly not a totally acceptable solution especially when there are thousands of existing topics that are already there and not associated with any groups.

    Secondly, what is the code to check if the logged user is a member of a group with forum id that can be done from bbpress with deep integration; this could be added in bbpress to limit access to group topics where the logged in user is not a member.

    rgds

    @erich73

    Participant

    I am not sure I understand:

    are you saying, that if you create a “Private Group” within BP, then the associated “Group-Forum” is not private ?

    So when creating a private Group, the Forum-posts are still visible by everybody ?

    @af3

    Participant

    Ercih, if you set your bp groups to be PRIVATE, the forum in that group is actually using bbpress; and will be visible to users that go directly to bbpress itself — they can read, post new topics, edit, delete their topics — just like a normal bbpress stuffs :) that really defeats the purpose of having a privacy option for BP Groups, i.e. those that is setup with forum.

    I hope I am completely wrong; but this is what I am seeing with my wpmu2.8.6+bp1.1.3+bbpress1.0.2

    @chouf1

    Participant

    Hidding your page with the CSS trick display:none is pure illusion.

    It’s not by changing the wallpaper that you lock your door ! :-)

    The screen is effectively blank, but the datas are all visible by using right-click “view page source”.

    Demo link to “a blank screen”: http://www.netajour.com/buddytest/test.html

    If your datas need privacy, you have to use something better as display:none;

    @r-a-y

    Keymaster

    @af3

    The first post in this thread was made 7 months ago when bbPress needed to be separately installed.

    As of BP v1.1+, bbPress is now embedded into BuddyPress.

    Privacy options for group forums now exist natively.

    If you’re using an external bbPress install (which it sounds like you are), then you’re correct, privacy will still be an issue. I’m not even sure the BP Groups plugin by Burt Adsit even works with BP 1.1 / external bbPress.

    @af3

    Participant

    @ray, thanks for info; when i integrated wpmu and bbpress, bbpress was set to be in the same dbase as WPMU, and the bbpress was already with over 70k posts (not a new install). So when bp was installed, it’s also in the same db used by wpmu and bbpress. Even if I installed bp with the bbpress forum that came with it; wouldnt it be still using the bb tables that are already there in the existing db?

    Should i install two different bbpress with separate db so I can solve this privacy issues? Its a bit confusing to me now on the whole architecture of bp+bbpress and bp group forums. Pls help.

    @r-a-y

    Keymaster

    You say you are using BP 1.1.3.

    When you upgraded from the BP 1.0 series, what choice did you make when you upgraded the forums?

    https://codex.buddypress.org/developer-discussions/buddypress-forum/

    Did you choose to keep the existing installation?

    Or did you choose to create a new installation?

    Also how dependent are you on your external version of bbPress?

    Besides the group forums, do your members post in other areas in your external bbPress?

    After answering these questions, we’ll have a better idea on how to proceed.

    @af3

    Participant

    The obvious choice for me during that was to keep the existing installation; as bbpress was already installed in the same wpmu db (not an external db). I have abt 70,000 posts in the bbpress forum so most users are using them.

    I would like the group discussion forums to be only accessible to group members.

    @af3

    Participant

    @ray, i tested this again: enabled buddypress forum in the component setup, then reinstalled forum using existing bbpress installation setting ***.

    I created a private group with forum enabled and posted a topic in this group forum. I then logout, used other browser to view the wpmu forum (bbpress), and I can still see the topic posted in the bppress that should have been a private post. When logged in as another user (non-group member), i can reply to that topic! That’s the privacy issue that I was talking abt.

    *** would selecting new installation of bbpress overwrite my existing bbpress ?

    @r-a-y

    Keymaster

    The way I see it, you have a couple of options:

    1) Continue using your external bbPress setup for open, public discussions (similar to bp.org/forums), while hiding all group forums and group forum related discussions from your external bbPress install.

    BP group forum discussions will now be using the new integrated forums in BP 1.1 only for group discussions. And you can retain all your external bbPress posts!

    This essentially means you’ll have two forums.

    2) Move everything over to the integrated BuddyPress forums (not something you want to do I’m guessing).

    3) Move everything over to the external install of bbPress (requires BP core hacking, doable, but more work).

    Option 1 is probably the most viable.

    Here’s how to do it:

    Step #1 (optional, depending on where you installed your external version of bbPress)

    By default, BP group forums can be accessed at:

    hxxp://example.com/forums/

    If your external bbPress is also installed in /forums/, you’ll want to rename BP’s forums slug to something else.

    You can do this by adding the following in your wp-config.php or bp-custom.php:

    define( 'BP_FORUMS_SLUG', 'group-forums' );

    In the example above, your BP forums can now be accessed at hxxp://example.com/group-forums/

    Step #2

    In your external bbPress install, make sure all your group forums are under a forum category.

    If you don’t have a forum category specifically for your group forums, go into your bbPress admin area and add one (you can call the forum category “Group Forums” or whatever you want), then place each group forum under this new category.

    Note down the forum ID of the forum category. You can get the forum category ID by mousing over the “Edit” link and checking the “id” parameter.

    Step #3

    Now that you’ve created a forum category and noted down that forum category ID, we want to hide all group forum related stuff from access and view.

    We’re going to be using _ck_’s Hidden Groups plugin to do this.

    Since you’re using the BP Groups plugin by Burt Adsit, chances are you’re already using _ck_’s Hidden Forums plugin due to its usage with BP Groups.

    Open up the plugin (hidden-forums.php) in a text editor.

    Comment out this line:

    $hidden_forums['hidden_forums']=array(500,501,502); // hide these forums, list by comma seperated number

    Underneath that line, add the following:

    $bp_hide_group_forum_category_id = 3;

    $hidden_forums['hidden_forums']=array();
    $hidden_forums['hidden_forums'][] = $bp_hide_group_forum_category_id;

    $forums = get_forums();
    foreach ($forums as $forum) {
    if ($forum->forum_parent == $bp_hide_group_forum_category_id)
    $hidden_forums['hidden_forums'][] = $forum->forum_id;
    }

    Change the $bp_hide_group_forum_category_id variable to the forum category ID you noted down in step #2.

    And that should be it! By default, the admin can view every single forum post, so try viewing your bbPress install when you’re logged out!

    @af3

    Participant

    @ray – i really appreciate this. it’s all clear to me now. I can now manually hide the group forum in bbpress (irregardless of public or private or hidden group). Its quite basic but works fine i.e. group members must go their group site to have access to the group forum.. which is cool btw.

    In step #2 above:

    How do we make sure that all new group forums are automatically added into the forum category? At the moment, its added as another forum, so we have to manually change this as child to the bbpress forum category for group created in Step #2.

    Thanks again for your meticulous help & instructions abv.

    @r-a-y

    Keymaster

    I think if you have your group forum category listed last, new group forums will automatically be tacked on to that forum category, might need to double check this though.

    eg.

    Generic forum (this is a forum category)

    –generic sub forum #1

    –generic sub forum #1

    Generic forum 2(this is a forum category)

    –generic sub forum #2

    –generic sub forum #2

    Group forums (forum category for BP forums)

    –BP group #1

    –BP group #2

    I’m going to give this a quick try and report back.

    [EDIT]

    af3, you’re right, it doesn’t get created in the forum category! Will have to look into this.

    If you figure it out before me, let me know.

    @r-a-y

    Keymaster

    Okay af3, this requires manipulating your forums in the bbPress backend.

    For me, new group forums were being created as a child of forum ID #1.

    So what I did was change forum ID #1 to a forum category, then I moved all existing group forums under forum #1. Lastly, in step #3 above, I changed the ID from 3 to 1.

    Now all new BP group forums are created under forum category ID #1.

    Report back and let me know if this works for you.

    @af3

    Participant

    @ray — that works superbly! thank you again, your help to clarify the structure, use of the modified hidden forum plugin and idea to set group forum category as ID=1 !! thx

    @r-a-y

    Keymaster

    Glad you got it all sorted out!

    For anyone else reading, this only applies for people upgrading from the BP 1.0 series.

    For fresh BP installs circa v1.1 and up, don’t bother reading this thread!

Viewing 17 replies - 1 through 17 (of 17 total)
  • The topic ‘How to hide bbpress forums from users while allowing forums in buddypress groups’ is closed to new replies.
Skip to toolbar