Replies
- Ravi on April 1, 2020 at 6:20 pm in reply to: [Resolved] Exclude comments in BuddyPress Activity Shortcode plugin #28462
Hello Tiziano,
Thank you for posting. You can use ‘action=new_blog_post’ in your shortcode to list only new blog post activity in your activity listing. Please let me know it works or not.
Regards
Ravi Hello Bharat,
Thank you for posting. But BuddyPress does not allow to change sub-groups like group-create, group-settings etc. BuddyPress takes them as an action and process request accordingly.
Regards
Ravi- Ravi on February 14, 2020 at 6:24 am in reply to: [Resolved] Restrict Activity Commenting by Member-type #27698
Hello Keith,
Thank you for the acknowledgement.
Regards
Ravi - Ravi on February 13, 2020 at 6:38 am in reply to: [Resolved] Restrict Activity Commenting by Member-type #27687
Hello Keith,
Thank you for posting. Try the following code it prevents student type user from comment and replying on other user’s activity.
/** * Check weather user is restricted from commenting. * * @param int $user_id User id. * * @return bool */ function buddydev_is_restricted_commenter( $user_id ) { // Never restrict super admin from commenting. if ( is_super_admin( $user_id ) ) { return false; } return bp_has_member_type( get_current_user_id(), 'student' ); } /** * Check user can comment or not. * * @param bool $can Bool. * * @return bool */ function buddydev_user_can_comment( $can ) { $activity = new BP_Activity_Activity( bp_get_activity_id() ); $user_id = get_current_user_id(); // Do not restrict for its own activity. if ( $activity->user_id == $user_id ) { return $can; } if ( buddydev_is_restricted_commenter( $user_id ) ) { $can = false; } return $can; } add_filter( 'bp_activity_can_comment', 'buddydev_user_can_comment' ); add_filter( 'bp_activity_can_comment_reply', 'buddydev_user_can_comment' );Please do let me know if it works or not.
Regards
Ravi Hello Daniel,
It seems you have a customize message url. Please replace the following code,
$url = bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . $user->user_login ;with
$url = trailingslashit( bp_loggedin_user_domain() ) . 'bp-messages/?new-message&fast=1&to=' . $user->user_login;Please let me know if it works or not.
Regards
RaviHello Daniel,
Thank you for posting. Please make sure the message component is enabled. If enabled and you still facing the issue. Please share a screenshot of the page.
Regards
Ravi- Ravi on January 24, 2020 at 5:00 am in reply to: [Resolved] BuddyPress Private Message for Non Logged in Users #27459
Thank You for the acknowledgement. I am glad that I could help.
Regards
Ravi - Ravi on January 16, 2020 at 5:54 am in reply to: [Resolved] BuddyPress Profile Completion for BuddyBoss #27353
Hello,
Sorry for the inconvenience. Please do let me know what issue you are facing in this plugin. Is it about the profile fields, avatar or covers or redirects?.
Regards
Ravi- This reply was modified 6 years, 10 months ago by
Ravi.
- This reply was modified 6 years, 10 months ago by
- Ravi on January 15, 2020 at 5:48 pm in reply to: [Resolved] BuddyPress Private Message for Non Logged in Users #27352
Hello,
Thank you for posting. It seems you are using Noveau template pack. Please try the following code.
/** * Modify private message button args. * * @param array $buttons Array. * * @return array */ function buddydev_nouveau_filter_private_message_button( $buttons ) { if ( ! isset( $buttons['private_message'] ) || is_user_logged_in() ) { return $buttons; } $buttons['private_message']['must_be_logged_in'] = false; $buttons['private_message']['button_attr']['href'] = wp_login_url( site_url( '?message-redirect=' . bp_displayed_user_id() ) ); return $buttons; } add_filter( 'bp_nouveau_get_members_buttons', 'buddydev_nouveau_filter_private_message_button' ); /** * Redirect to the send message when the user logs in * */ function buddydev_redirect_to_send_message_on_login() { //make sure it is our url set in previous step if ( ! is_user_logged_in() || empty( $_GET['message-redirect'] ) ) { return; } //redirect to PM $user_id = absint( $_GET['message-redirect'] ); //let us make sure that user exists $user = get_user_by('id', $user_id ); //can not PM to invalid user //also you should not send message to yourself if ( ! $user || $user->ID == bp_loggedin_user_id() ) { return ; } $url = bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . $user->user_login ; bp_core_redirect( $url ); } add_action( 'bp_template_redirect', 'buddydev_redirect_to_send_message_on_login' );Let me know if it works or not.
Regards
Ravi - Ravi on January 15, 2020 at 5:51 am in reply to: [Resolved] Finding BP mail notification language files #27348
Hello Carsten,
Thank you for the acknowledgement. I have tried to find ‘You have unread messages’ string into BuddyPress and It shows empty result. There might be chances that this is coming from other plugin.
Please share a screenshot and let me know if there is other message regarding plugins you are using.Regards
Ravi