Replies
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 - Brajesh Singh on July 25, 2018 at 11:54 pm in reply to: How add new type notification for BuddyPress? #16498
Hi Max,
Welcome to BuddyDev.You can use
bp_notifications_add_notification();to add new type of notifications. Please do note that you will need to register a dummy component and notification callback to make it render the notification.
From your post, It seems you are using some kind of task management plugin. My suggestion will be to ask the developer to add it. It should be a very simple task as they might have some of the notifications already there.
Regards
Brajesh