BuddyBoss Home – Web › Support Forums › Plugins › BuddyBoss Wall › Private group activity privacy
Tagged: Activity Privacy, private groups
- This topic has 15 replies, 3 contibutors, and was last updated 9 years, 4 months ago by Alyssa.
Question
July 4, 2015 at 8:06 am #42113@milenaHi @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
July 4, 2015 at 2:14 pm #42119@alyssa-buddyboss
AlyssaParticipant@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> <? } }
July 4, 2015 at 2:26 pm #42124@milenaHi @tjchester,
thank you,
but this code doesn’t work.
July 5, 2015 at 6:49 am #42148@milenahi, do you have anything else for me to try @tjchester?
July 5, 2015 at 2:37 pm #42163@alyssa-buddyboss
AlyssaParticipant@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.
July 6, 2015 at 5:02 am #42194@milenaHi @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.
MilenaJuly 6, 2015 at 5:04 am #42195@milenap.s. I am using the new buddypress – LD integration, if that is relevant.
July 6, 2015 at 8:10 am #42213@alyssa-buddyboss
AlyssaParticipantLets 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.
July 6, 2015 at 10:40 am #42222@milenaHi @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
July 6, 2015 at 1:37 pm #42229@alyssa-buddyboss
AlyssaParticipant@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(); }
July 9, 2015 at 4:02 am #42343@rugwarriorIf this can be resolved will it make its way in the official Wall plugin?
July 9, 2015 at 6:38 pm #42406@alyssa-buddyboss
AlyssaParticipant@rugwarrior I already have a request in to the developers, we will need to have an internal discussion first.
July 12, 2015 at 6:17 am #42516@milenaHi @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.
July 12, 2015 at 9:17 am #42526@alyssa-buddyboss
AlyssaParticipant@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> <? } }
July 13, 2015 at 3:55 am #42554@milenaNo, sorry @tjchester. None hidden.
- The question ‘Private group activity privacy’ is closed to new replies.