Replies
OK thanks Brajesh, I’ll bring it up with BuddyBoss.
- Nicola Fern on November 1, 2019 at 9:24 am in reply to: [Resolved] Buddypress Anonymous Activity #26232
Thanks Brajesh, that seems to be working 🙂
Nic
- Nicola Fern on October 31, 2019 at 11:48 am in reply to: [Resolved] Buddypress Anonymous Activity #26224
Hi Brajesh
Is there any word on this? I would just like for the anonymity to work in selected groups, but for it to be optional in those selected groups.
Many thanks
Nicola - Nicola Fern on September 8, 2019 at 9:37 am in reply to: [Resolved] Buddypress Anonymous Activity #25229
Hi, Is there any resolution to this?
Thanks,
nic - Nicola Fern on August 31, 2019 at 4:41 pm in reply to: [Resolved] Buddypress Anonymous Activity #25128
Hi Ravi, here you go:
/** ANONYMOUS GROUP FUNCTIONALITY*/ /** * Disable UI. */ add_filter( 'bp_anonymous_is_valid_screen', function ( $valid ) { if ( ! bp_is_group() ) { return $valid; } // Do not show ui on anonymous groups. $anonymous_groups = array( 43, 42 );// please change with the group ids. return in_array( bp_get_current_group_id(), $anonymous_groups ); } ); /** * Custom enable for certain groups. * * @param bool $is is enabled. * @param string $context current context. * @param int $context_id context id. */ function bpanonymous_custom_enable( $is, $context, $context_id ) { if ( 'group' !== $context ) { return $is; } $allowed_groups = array( 2 );// please change with the group ids. return in_array( $context_id, $allowed_groups ); } add_filter( 'bp_anonymous_activity_is_anonymous_comment', 'bpanonymous_custom_enable', 10, 3 ); add_filter( 'bp_anonymous_activity_is_maybe_anonymous_comment', 'bpanonymous_custom_enable', 10, 3 ); add_filter( 'bp_anonymous_activity_is_anonymous_post', 'bpanonymous_custom_enable', 10, 3 );
- Nicola Fern on August 29, 2019 at 11:19 am in reply to: [Resolved] Buddypress Anonymous Activity #25058
Hi Ravi
Unfortunately this didn’t seem to work – it removed the UI everywhere, and made the specified group anonymous only again
Thanks
Nicola - Nicola Fern on August 2, 2019 at 8:07 am in reply to: [Resolved] Buddypress Anonymous Activity #24448
Hi Ravi
I tested this and unfortunately it doesn’t seem to work. I notice your comment in the code says “// Do not show ui on anonymous groups.”
However I /do/ want to show it on the anonymous groups, but only those I have specified to be anonymous. At the moment, this code removes the UI from the anonymous groups and shows it on the groups where anonymity is not enabled.
Thanks
Nicola - Nicola Fern on July 27, 2019 at 6:01 pm in reply to: [Resolved] Buddypress Anonymous Activity #24359
Hi
Sorry to bug you on this again 🙂 Could you tell me how to tweak the code again so that it’s only on the specific group but the UI is shown so that anonymity is optional? Feedback from users suggests this would be preferred.
Thanks!
Nic Hi Brajesh
Is there any update on this? I’m hoping to go live with my site next week.
Thanks
NicolaExcellent thanks so much 🙂
Have a great day!
Nic