Replies
- Ravi on April 29, 2019 at 4:17 am in reply to: [Resolved] BuddyPress Avatar Moderator – Profile Pic Disappears After Approval #22647
Hello Mic,
Thank you for the acknowledgement. I am glad that problem is resolved.
Regards
Ravi - Ravi on April 26, 2019 at 5:43 am in reply to: [Resolved] BuddyPress Avatar Moderator – Profile Pic Disappears After Approval #22613
Hello Mic,
I have tested the plugin and it is working for me. But with your custom code, no random image is showing for the user who has not uploaded the avatar. I just modified the filter and it is working for me. Try the following code and let me know if it works or not.
Replace the following add_filter( "bp_core_mysteryman_src", "avatar_photo_random_default" ) with add_filter( "bp_core_default_avatar_user", "avatar_photo_random_default" )
Regards
Ravi Hello Vivek,
We have created a new plugin for Moderator extended version. It will a new tab “Moderate” visible only for moderation. Under this tab user can see group members and Moderator can ban, unban, accept membership, reject membership request. We have not implement invite as it can be enable from manage section. Please download the following plugin and check if it fit for your requirement.
https://github.com/buddydev/bp-extended-moderator
Please let me know if it works or not.
Regards
Ravi- Ravi on April 24, 2019 at 11:33 am in reply to: [Resolved] Activity confirm action support for confirm bp action plugin #22560
Hello Tosin,
Thank you for the acknowledgement. I am glad that I could help.
Regards
Ravi - Ravi on April 24, 2019 at 11:03 am in reply to: [Resolved] Activity confirm action support for confirm bp action plugin #22556
Hello Tosin,
I have checked again. Now it is working for me. Please check
Regards
Ravi - Ravi on April 24, 2019 at 10:51 am in reply to: [Resolved] Activity confirm action support for confirm bp action plugin #22550
Hello Tosin,
It seems you have not used my code. Make sure in your bp-custom.php file. The following filter attached with priority 9
add_filter('bp_get_activity_delete_link', 'bpdelete_remove_activity_delete_text', 9 );
Or please post me code from bp-custom.php again.
Regards
Ravi - Ravi on April 24, 2019 at 4:03 am in reply to: [Resolved] Activity confirm action support for confirm bp action plugin #22544
Hello Tosin,
Please link me to your site with some demo credential so that I can check there.
Regards
Ravi - Ravi on April 23, 2019 at 1:31 pm in reply to: Automatic email notification for any new thread #22539
Hello Luke,
Thank you for posting. Please give a try to the following plugin. It will work.
https://wordpress.org/plugins/buddypress-group-email-subscription/
Thank You
Ravi - Ravi on April 23, 2019 at 1:19 pm in reply to: [Resolved] Change comment edit link/button to "delete" button #22537
Hello,
I have modified the code now you can allow certain roles who can delete comments. I am sorry but due to lack of time, I am unable to assist you with confirm message.
function buddydev_delete_comment() { if ( ! isset( $_GET['action'] ) || ! isset( $_GET['id'] ) || 'delete_comment' != $_GET['action'] ) { return; } if ( ! isset( $_GET['nonce'] ) || ! wp_verify_nonce( $_GET['nonce'], 'delete-comment' ) ) { return; } $comment = get_comment( $_GET['id'] ); if ( empty( $comment ) || ! buddydev_user_can_delete( get_current_user_id() ) ) { return; } wp_delete_comment( $comment->comment_ID ); wp_safe_redirect( get_permalink( $comment->comment_post_ID ) ); exit; } add_action( 'template_redirect', 'buddydev_delete_comment' ); function buddydev_add_delete_comment_button() { if ( ! is_user_logged_in() || ! buddydev_user_can_delete( get_current_user_id() ) ) { return; } $comment = get_comment(); $delete_url = add_query_arg( array( 'id' => $comment->comment_ID, 'action' => 'delete_comment', 'nonce' => wp_create_nonce( 'delete-comment' ), ), get_permalink( $comment->comment_post_ID ) ); echo sprintf( '<a href=%s>%s</a>', $delete_url, __( 'Delete' ) ); } add_filter( 'wp_list_comments_args', function( $r ) { $r['end-callback'] = 'buddydev_add_delete_comment_button'; return $r; } ); function buddydev_user_can_delete( $user_id ) { if ( ! is_user_logged_in() || empty( $user_id ) ) { return false; } // Add roles who can delete comments $allowed_roles = array( 'administrator', 'editor' ); $user_id = $user_id ? $user_id : get_current_user_id(); $user = get_user_by( 'id', $user_id ); $common_roles = array_intersect( $allowed_roles, $user->roles ); if ( empty( $common_roles ) ) { return false; } return true; }
Regards
Ravi- This reply was modified 6 years, 2 months ago by
Ravi.
- This reply was modified 6 years, 2 months ago by
- Ravi on April 23, 2019 at 11:17 am in reply to: [Resolved] Activity confirm action support for confirm bp action plugin #22532
Hello Tosin,
Please try the following code. Replace your code with this
function bpdelete_remove_activity_delete_text(){ $url = bp_get_activity_delete_url(); $class = 'delete-activity'; $link = '<a href="' . esc_url( $url ) . '" class="button item-button bp-secondary-action delete-activity confirm no-ajaxy fas fa-trash-alt" rel="nofollow">' . __( '', 'buddypress' ) . '</a>'; return $link; } add_filter('bp_get_activity_delete_link', 'bpdelete_remove_activity_delete_text', 9 );
Please let me know if it works or not.
Regards
Ravi