Skip to:
Content
Pages
Categories
Search
Top
Bottom

when creating private/hidden group – forum should be hidden too but it's visible

  • @lokers

    Participant

    Ok, so I found out when I create private or hidden group in buddypress and I check “Enable discussion forum” – it will create public/visible forum.

    It looks like first action is creating a forum, then saving actual group settings / by default group will be “public”, so the forum.

    I tried to fix it but I am not sure where exactly can I switch the order of actions triggered.

    Anyone can help?

Viewing 7 replies - 1 through 7 (of 7 total)
  • @lokers

    Participant

    Just to clarify. I am talking about plugin for buddypress to communicate with bbpress. And by saying forum is visible I mean forum created with this plugin on bbpress side is visible (but should inherit settings from group).

    @plrk

    Participant

    bbPress does not have any native ways to hide forums that should be hidden. You can do as I have done – installing a “blank” theme that redirects users to your main site, limiting users to use the built-in group forums functionality only – or you could install a bbPress plugin that hides forums from those that are not allowed to view them. There is such a plugin, intended specifically for buddypress users, but I can’t remember what it is called.

    @lokers

    Participant

    yes, I’ve got this plugin (bpGroups), it works fine but it has this one bug and I don’t know how to fix this damn thing.

    Basicaly, when you are creating a new group there is a checkbox to create a forum on bb site too. Below are 3 group options: public, private, hidden.

    Now, the script creates forum (default is public), then it changes settings for a group (private or hidden), and it should do this at a first place so it could inherit proper group settings when creating a forum. Do you know what I mean? I just want to swap the order somewhere inside the code to make it working. It should first update group settings, then create a forum. That way it would work properly.

    I googled about this etc, looks like nobody’s aware of this bug cos I couldn’t find any answers and nobody even point this anywhere.

    @lokers

    Participant

    ok, I’ve got temporary solution.

    File: wp-content/plugins/buddypress/bp-groups.php

    Line 1481: yous should have (inside function groups_create_group() / case 2:)

    after:

    do_action( ‘groups_create_group_step2_save’ );

    I’ve added this line:

    oci_bb_group_updated($group_obj->id);

    So it works, but i had to modify this file which I am not happy with. I guess there is another way of doing this properly. If anyone will find better solution, could you please let me know too?

    @r-a-y

    Keymaster

    I experienced a similar problem as well.

    Did you edit a BuddyPress core file using a bpGroups function?

    You should let Burt Adsit know of your fix, so maybe he can provide a cleaner solution using his plugin instead of editing the core:

    https://buddypress.org/developers/burtadsit

    Try adding this to line 161 of /wp-content/mu-plugins/oci_bp_group_forums.php

    add_action( 'groups_create_group_step2_save', 'oci_bb_group_updated', 10, 1 );

    See if that does the same thing.

    @lokers

    Participant

    I have tried that too. It doesn’t work that’s why I’ve edited the core. Also, I sent PM to Burt with link to this post few days ago.

    @burtadsit

    Participant

    I haven’t updated bpgroup to be compatible with trunk bp yet. There’s a trac ticket by me whining about the lack of wp actions on group creation with the new group creation stuff.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘when creating private/hidden group – forum should be hidden too but it's visible’ is closed to new replies.
Skip to toolbar