Replies
- Brajesh Singh on April 16, 2017 at 11:26 pm in reply to: [Resolved] Remove "add friend" button from admins' profile #8610
You are most welcome!
Thank you Gregg. Our community will appreciate that.
- Brajesh Singh on April 16, 2017 at 10:55 pm in reply to: [Resolved] Group Activities Notifier – Ignore 1 group #8606
Thank you for the appreciation Gregg.
I am glad I was able to help 🙂
It is quiet possible. Please post the message with the error to them and they should be able to helps.
It is related to access protection and something is triggering it on the server.
- Brajesh Singh on April 16, 2017 at 10:41 pm in reply to: [Resolved] Group Activities Notifier – Ignore 1 group #8603
Hi Gregg,
Thank you for the kind words and joining our premium membership.Here is the code that you can put in your bp-custom.php to skip the group
/** * Skip a group from the group notifications. * * @param bool $skip true to skip notification. * @param BP_Activity_Activity $activity current activity instance. * * @return bool true to skip. */ function buddydev_skip_group_from_notification( $skip, $activity ) { $group_id = $activity->item_id; //change the group id if ( $group_id == 3 ) { //Please change '3' with your group id $skip = true; //skip } return $skip; } add_filter( 'bp_local_group_notifier_skip_notification', 'buddydev_skip_group_from_notification', 10, 2 );Please change the group id with yours.
Let me know if it works for you or not?
Thank you
Brajesh Hi Gregg,
Thank you for posting.
if that is the error, it means your admin-ajax.php is not available due to access restrictions.Are you using any privacy plugin or some code to limit access to admin area?
- Brajesh Singh on April 14, 2017 at 4:20 am in reply to: [Resolved] Remove add friend button for member type on members page/members loop #8595
Hi Tosin,
about your last question.It is difficult to disable based on the member types as the member type is registered too late.
Ravi & I looked at it and we found that we can disable the component conditionally but not using member type as context./ if using the user roles as context will work for you please let us know and we will post the code.
Thank you
Brajesh - Brajesh Singh on April 14, 2017 at 3:46 am in reply to: [Resolved] Remove add friend button for member type on members page/members loop #8594
Posted a solution there.
- Brajesh Singh on April 14, 2017 at 3:45 am in reply to: [Resolved] Remove "add friend" button from admins' profile #8593
Hi,
Please use the following code in bp-custom.php/** * Disable add friends button fro admin users * * it is an example and not recommended. It can cause n extra queries due to capability checking on the members loop. * * @param $button * * @return mixed */ function buddydev_hide_admin_friends_button( $button ) { if( ! isset( $button['id'] ) || $button['id'] != 'not_friends' ) { return $button; } $user_id = absint( str_replace( 'friend-','', $button['link_id'] ) ); if ( ! $user_id ) { return $button ; } //we can check using is_super_admin( $user_id ) || user_can( $user_id, 'cap' ) if ( user_can( $user_id, 'manage_options' ) ) { $button['id'] = false; } return $button; } add_filter( 'bp_get_add_friend_button', 'buddydev_hide_admin_friends_button' );Please do note that it will cause n extra queries on the members loop.
Regards
Brajesh - Brajesh Singh on April 14, 2017 at 3:28 am in reply to: [Resolved] Change color of Activity Time Hyperlinks #8592
Hi dandy,
Thank you for posting.Please put teh following code in your css file
#activity-stream li .activity-content a.activity-time-since { color: red !important; /** change with your own color*/ }change the color with your preferred color and it will work.
Regards
Brajesh