Replies
- Ravi on November 26, 2018 at 8:36 am in reply to: [Resolved] MediaPress set Profile Photo: There was a problem cropping your profile photo. #19005
Hello Panos,
I have tested the plugin on my local development server and it is working fine. Please let me know which version of the plugin you are using it was a bug in older version but fixed by the new version.
Thank You
Ravi - Ravi on October 13, 2018 at 7:08 pm in reply to: [Resolved] How to disable public and private messages for specific users #18058
Hello Tosin,
Thank you for the acknowledgment. Yes plugin is conflicting with our custom code. Please use the following code and let me know it works or not.
function buddydev_hide_buttons() { if ( ! is_user_logged_in() ) { return; } $restricted_user_ids = array( 5, 26, 10, 4 ); // Replace by yours user ids. if ( ! in_array( get_current_user_id(), $restricted_user_ids ) ) { return; } if ( function_exists( 'bp_profile_message_ux_init' ) ) { remove_all_filters('bp_get_send_public_message_button'); remove_all_filters('bp_get_send_message_button'); } add_filter( 'bp_get_send_public_message_button', '__return_false' ); add_filter( 'bp_get_send_message_button_args', '__return_false' ); } add_action( 'bp_init', 'buddydev_hide_buttons', 11 );
Regards
Ravi - Ravi on October 13, 2018 at 10:21 am in reply to: [Resolved] How to disable public and private messages for specific users #18055
Hello Tosin,
Strange, This code is working for me. Can you please post me the code you are using.
Regards
Ravi - Ravi on October 12, 2018 at 11:04 am in reply to: [Resolved] How to disable public and private messages for specific users #18046
Hello Tosin,
For user ids, you can use the following code.
function buddydev_hide_public_button( $r ) { if ( ! is_user_logged_in() ) { return $r; } $restricted_user_ids = array( 5, 26, 10, 4 ); // Replace by yours user ids. if ( in_array( get_current_user_id(), $restricted_user_ids ) ) { return false; } return $r; } add_filter( 'bp_get_send_public_message_button', 'buddydev_hide_public_button' ); add_filter( 'bp_get_send_message_button_args', 'buddydev_hide_public_button' );
Regards
Ravi - Ravi on October 12, 2018 at 9:45 am in reply to: [Resolved] Check if there is a translation issue of plugin BuddyPress Ajax Registration #18044
Hello Thorsten,
Thank you for posting. As per sreenshot there will be no errors and code will work fine. You can use this.
Thank you for the translations
Regards
Ravi - Ravi on October 12, 2018 at 5:54 am in reply to: [Resolved] How to disable public and private messages for specific users #18040
Hello Tosin,
Please try the following code to hide public and private buttons based on user capability. Please follow the following url for more user capabilities.
https://codex.wordpress.org/Roles_and_Capabilities
function buddydev_hide_public_button( $r ) { if ( ! current_user_can( 'publish_posts' ) ) { return false; } return $r; } add_filter( 'bp_get_send_public_message_button', 'buddydev_hide_public_button' ); add_filter( 'bp_get_send_message_button_args', 'buddydev_hide_public_button' );
Use this code in your “bp-custom.php file”
Thanks
Ravi - Ravi on September 27, 2018 at 3:40 am in reply to: [Resolved] How to display buddyblog posts based on geolocation and/or language? #17696
Hello Kreatsya,
Sorry, This is beyond the scope of BuddyBlog plugin right now. It won’t be able to support these features and will need a lot of change which we are unable to add currently.
Regards
Ravi - Ravi on September 25, 2018 at 2:35 pm in reply to: [Resolved] Buddyblog disable featured image #17644
Hello Kreatsya,
Thank you for posting. We have updated BuddyBlog plugin settings. Now it has setting to allow/disallow users to upload featured image to post. Please download the latest version.
https://buddydev.com/plugins/buddyblog/
Thanks
Ravi Hello Travis,
Thank you for posting. Please refer the following gist url:
https://gist.github.com/raviousprime/d822dab7403858500159d94cc6e01278
Use the code in your “bp-custom.php” file and Please do let me know.
Regards
RaviHello Mwale,
Thank you for asking. There is a message function with name “messages_get_unread_count( $user_id = 0 )” it returns unread message count for the user id. Please try this.
Regards
Ravi