Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25302

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 25302
    Brajesh Singh on in reply to: Hidden Members and Directory Profiles #16530

    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.php
    

    to

    
    Yourtheme/bp-profile-visibility-manager/privacy-settings.php
    
    

    You can override it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25302

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 25302

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 25302

    You are welcome 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25302
    Brajesh Singh on in reply to: [Resolved] Hyperlink to edit profile #16514

    You are welcome. Glad that it worked 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 25302
    Brajesh Singh on in reply to: Lightbox not loading #16513

    Thank you Oscar.

    Please link me to the image. It’s strange. If we can reproduce it, I can certainly fix it.

  • Keymaster
    (BuddyDev Team)
    Posts: 25302
    Brajesh Singh on in reply to: Translation to spanish Media Rating #16512

    Hi Oscar,
    I have asked @ravisharma to look into it and assist you. He will help you further.

  • Keymaster
    (BuddyDev Team)
    Posts: 25302
    Brajesh Singh on in reply to: [Resolved] Xprofile show age in "members-loop" #16500

    You are welcome.

  • Keymaster
    (BuddyDev Team)
    Posts: 25302
    Brajesh Singh on 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