BuddyBoss Home – Web Support Forums Plugins BuddyBoss Wall Private group activity privacy

Viewing 15 posts - 1 through 15 (of 16 total)
  • Question

    #42113
    @milena

    Hi @tjchester,

    I need help hiding the selection box of activity privacy in my private groups.

    I actually think it shouldn’t be there, or ot least with less options- since in private groups only the group members can see the posts. So it’s confusing to the users, on the one hand they read a message saying that this group’s activity is private, but then under the “what’ new” box, suddenly the privacy appears with “everyone”, “signed-in users” etc.

    So can you please give me the php code to post in my functions php- just for the private *and hidden groups?
    Or help me locate this with a more specific css for the private groups..

    #bbwall-activity-privacy, #bbwall-privacy-selectbox

    Thank you.
    Happy 4th 🙂

    Answers

    #42119

    Alyssa
    Participant
    @alyssa-buddyboss

    @milena add this to functions.php:

    add_action( 'bp_before_group_header' , 'remove_viz' );
    function remove_viz(){
    if( bp_get_group_type()=='Private Group' || bp_get_group_type()=='Hidden Group' ){
      ?>
      <style>
        #bbwall-activity-privacy{display:none !important;}
      </style>
      <?
    }
    }
    #42124
    @milena

    Hi @tjchester,

    thank you,

    but this code doesn’t work.

    #42148
    @milena

    hi, do you have anything else for me to try @tjchester?

    #42163

    Alyssa
    Participant
    @alyssa-buddyboss

    @milena it works on my dev server, that is the only solution. It was difficult enough to develop. BP Activity Privacy doesn’t even have this option. You may want to test with the code to see if it is even being pulled on your site. If you are using a different group header file then your site may not be doing this action. Try removing the if statement and see if it will remove the code on all groups. Also check if the code is within your source code.

    #42194
    @milena

    Hi @tjchester,

    thanks for your reply.

    This code, without the “if” works (for all the groups- public too)

    add_action( 'bp_before_group_header' , 'remove_viz' );
    function remove_viz(){
      ?>
      <style>
        #bbwall-activity-privacy{display:none !important;}
      </style>
      <?
    }

    Is these something wrong with the if part?
    Maybe just leave the “private groups”?

    thanks.
    Milena

    #42195
    @milena

    p.s. I am using the new buddypress – LD integration, if that is relevant.

    #42213

    Alyssa
    Participant
    @alyssa-buddyboss

    Lets try just private groups with this code:

    add_action( 'bp_before_group_header' , 'remove_viz' );
    function remove_viz(){
    if( bp_get_group_type()=='Private Group' ){
      ?>
      <style>
        #bbwall-activity-privacy{display:none !important;}
      </style>
      <?
    }
    }

    If that does not work just try to echo bp_get_group_type() without the if statement and let me know the results.

    #42222
    @milena

    Hi @tjchester,

    thank you.

    That did not hide the privacy box,

    could you write the exact code with

    echo bp_get_group_type() without the if statement

    ?
    I am not sure how do do that.

    Milena

    #42229

    Alyssa
    Participant
    @alyssa-buddyboss

    @milena your previous code:

    add_action( 'bp_before_group_header' , 'remove_viz' );
    function remove_viz(){
      ?>
      <style>
        #bbwall-activity-privacy{display:none !important;}
      </style>
      <?
    }

    New code to try:

    add_action( 'bp_before_group_header' , 'remove_viz' );
    function remove_viz(){
    echo bp_get_group_type();
    }
    #42343
    @rugwarrior

    If this can be resolved will it make its way in the official Wall plugin?

    #42406

    Alyssa
    Participant
    @alyssa-buddyboss

    @rugwarrior I already have a request in to the developers, we will need to have an internal discussion first.

    #42516
    @milena

    Hi @tjchester,

    The last code does not hide the group privacy selector, and it adds a line “private/ public group” above the group avatar.

    I am using the code you gave me to hide the selector in all the groups for now.

    Let me know if there would be some permanent updates for this issue.

    thank for your efforts.

    #42526

    Alyssa
    Participant
    @alyssa-buddyboss

    @milena that’s exactly what I needed, try this new code:

    add_action( 'bp_before_group_header' , 'remove_viz' );
    function remove_viz(){
    if( preg_match('/private/i',bp_get_group_type()) || preg_match('/hidden/i',bp_get_group_type()) ){
      ?>
      <style>
        #bbwall-activity-privacy{display:none !important;}
      </style>
      <?
    }
    }
    #42554
    @milena

    No, sorry @tjchester. None hidden.

Viewing 15 posts - 1 through 15 (of 16 total)
  • The question ‘Private group activity privacy’ is closed to new replies.