Skip to:
Content
Pages
Categories
Search
Top
Bottom

Public Group Activity visible in only after user joins (without request sent)


  • billzy
    Participant

    @billzy

    Hi,

    Ive been looking top to bottom for an answer of this question, can’t find it anywhere.

    The problem: when a new user signs up to buddypress and groups that are set to public, they can already see the content.

    All I am wanting to do is simply change something that ensures I can create groups with the public visibility however to subscribe to the activity feed the user needs to become a member to that particular group (like the private group but without a request to join required). It sounds like the fix would be small and simple however I cant find it anywhere, the idea is kind of like Facebook pages where once you like a page you subscribe to the updates.

    Any help would be appreciated.

    Thanks,

    Billy

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t think this is very easy to do, if at all. The reason being groups are pretty much hardcoded to three types of membership status: public, private, hidden. You could add some checks to only permit display of the activity list page, but you’d need to somehow keep track of if the user has “joined” the group.

    I say “joined” because the user will have already joined the group — but you need a secondary type of group membership. You could store such a setting in group meta.


    billzy
    Participant

    @billzy

    hmmm .. yes I figured there was a chance it wouldnt be so easy. never thought of doing it via the group meta before… Im wondering if there is an easier fix?

    What about something like if (bp_group_is_member()) … If I included that in the activity loop somewhere could that work? When I tested that tag out it works to filter out public group content if not joined.

    The next thing is I have looked into using this via 1 of 2 ways; either a snippet that to checks if a activity post is related to a group and edit the activity/entry.php

    or the other option Ive been looking into is changing the core file bp-group/bp-group-activity.php on the line

    // If the group is not public, hide the activity sitewide.
    if ( isset( $bp->groups->current_group->status ) && ‘public’ == $bp->groups->current_group->status )
    $hide_sitewide = false;
    else
    $hide_sitewide = true;

    I assume I could somehow use the bp_group_is_member () function in there somewhere but not sure where?

    Any further thoughts on this would be appreciated?

    Thanks in advance

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Public Group Activity visible in only after user joins (without request sent)’ is closed to new replies.
Skip to toolbar