Replies
- Brajesh Singh on July 27, 2018 at 1:47 am in reply to: [Resolved] BP Deactivate Account updated Version has caused HTTP 500 Error #16532
Hi Daniel,
1. Please delete BP Deactivate Account plugin and download fresh copy from the site and upload it.The plugin caused issue as it contains the old style include for our settings framework(with an older version of the settings framework).
We have changed the way included the settings framework to avoid it happening again in future. In future, only the latest version will be loaded.
2. Yes, They are compatible. MediaPress Directory won’t work properly with the BP Nouveau though. I am working on a solution for it.
Regards
Brajesh Thank you.
Please upgrade to 1.6.0
https://buddydev.com/plugins/bp-profile-visibility-manager/It fixes the pagination issue.
You can override the settings template now.
Please copy
wp-content/plugins/bp-profile-visibility-manager/templates/bp-profile-visibility-manager/privacy-settings.phpto
Yourtheme/bp-profile-visibility-manager/privacy-settings.phpYou can override it.
Regards
Brajesh- Brajesh Singh on July 26, 2018 at 4:13 pm in reply to: Mediapress uploader shortcode – Uploading Temporarily disabled? #16521
Hi George,
The problem is happening as the uploader is reporting component as ‘members’ which is disable in the gallery settings.It seems to me that the mpp_get_current_component() has a bug.
For testing purpose, you cam put the following line in bp-custom.php
add_filter( 'mpp_get_current_component', function ( $component ) { if ( 'members' == $component && ! mpp_is_active_component( $component ) ) { $component = 'sitewide'; } return $component; } );Regards
Brajesh - Brajesh Singh on July 26, 2018 at 2:58 pm in reply to: Mediapress uploader shortcode – Uploading Temporarily disabled? #16517
Hi George,
The problem is component.Please use
[mpp-uploader gallery_id=2581 component=sitewide]That will fix it.
Let me know if it works or not?
Regards
Brajesh - Brajesh Singh on July 26, 2018 at 2:50 pm in reply to: [Resolved] Hide a specific post category in the activities #16515
You are welcome 🙂
You are welcome. Glad that it worked 🙂
Thank you Oscar.
Please link me to the image. It’s strange. If we can reproduce it, I can certainly fix it.
Hi Oscar,
I have asked @ravisharma to look into it and assist you. He will help you further.- Brajesh Singh on July 26, 2018 at 12:02 am in reply to: [Resolved] Xprofile show age in "members-loop" #16500
You are welcome.
- Brajesh Singh on July 26, 2018 at 12:02 am in reply to: Creating galleries only to role admin #16499
Hi Antonio,
In that case, we will need to first create a function to test for role like this/** * Check if a user has given WordPress role. * * @param int $user_id user. * @param string $role role. * * @return bool */ function buddydev_user_has_role( $user_id, $role ) { $user = get_user_by( 'id', $user_id ); if ( empty( $user ) ) { return false; } $user_roles = $user->roles; if ( empty( $user_roles ) ) { return false; } return in_array( $role, $user_roles, true ); }And then, we can use it like below(I am only enabling for administrator in this case)
/** * Only allow galleries for a certain role. * * @param bool $is_active Can create gallery or not. * @param string $component Component name. * @param int $component_id Component id. * * @return bool */ function buddydev_enable_gallery_for_role_only( $is_active, $component, $component_id ) { if ( 'members' == $component ) { $is_active = buddydev_user_has_role( $component_id, 'administrator' ); // 'editor', 'contributor', 'subscriber' } return $is_active; } add_filter( 'mpp_is_enabled', 'buddydev_enable_gallery_for_role_only', 10, 3 );That will do it for you.
Regards
Brajesh