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: 25384
    Brajesh Singh on in reply to: [Resolved] What is orphaned media? #10919

    Hi Margrita,
    An orphan media is a media uploaded from activity when the user decides to not post the activity. A user can remove the media if they want but if they don’t do it, the media is marked as orphaned.

    Hope that clarifies.

    For email, please make sure to check your spam folder and mark our email as non spam.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: [Resolved] Admin upload photos in user's profile #10918

    Please use user switching plugin while uploading to other user’s profile. We do not support automatically changing the ownership of the uploaded photo.

    https://wordpress.org/plugins/user-switching/

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384

    Hi Margrita,
    You are using the old development version, that’s why you are seeing the issues.

    I am sorry, I did not add the plugin to your account earlier, have added now. Please upgrade and let me know.

    PS:- Options might have changed, Please make sure to check the settings after update.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384

    HI Janelle,
    Does your theme restricts visibility of user in any way?

    Can you please visit the backend(Users->Members Types) and click on Edit Member type and see if the setting is like this?
    https://buddydev.com/docs/guides/plugins/buddypress-plugins/buddypress-member-types-pro/members-visibility-directory-member-type/

    Is there any user visibility/privacy/exclusion(hiding) related plugin or code are you using?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384

    Hi,
    Did you upgrade from the BP Member type generator plugin?

    Can you please visit the backend(Users->Members Types) and click on Edit Member type and see if the setting is like this?
    https://buddydev.com/docs/guides/plugins/buddypress-plugins/buddypress-member-types-pro/members-visibility-directory-member-type/

    Also, are you using a custom theme? Which theme it is? Is there any user visibility/privacy/exclusion(hiding) related plugin or theme are you using?

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384

    Thank you for marking it resolved.
    For anyone visiting this page, you can create a Multi Member type field and assign multiple member types based on it.

    You can find more details on creating member type field here:-
    https://buddydev.com/docs/guides/plugins/buddypress-plugins/buddypress-member-types-pro/creating-buddypress-member-type-profile-fields/

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: Moving Buddypress activity sub nav #10889

    Hi Taiwo,
    My apologies for the delayed reply.

    It seems you want to add those links to WordPress custom menu? If it is not, you should link to the user’s profile pages(user/activity/mention etc) instead of the directory links. Directory links behave differently and need js triggers to work(or cookies etc).

    Please let me know if it is a WpordPress custom menu and I may be able to provide some code.

  • Keymaster
    (BuddyDev Team)
    Posts: 25384

    Hi Margrita,
    Please put this in your bp-custom.php

    
    
    /**
     * Filter on the gallery creation permission.
     *
     * @param bool   $can can create.
     * @param string $component component name.
     * @param string $component_id component id.
     *
     * @return bool
     */
    function mpp_custom_limit_gallery_creation( $can, $component, $component_id ) {
    	// non logged in user's don't have permissions and admin's don't have restrictions.
    	if ( ! is_user_logged_in() || is_super_admin() ) {
    		return $can;
    	}
    
    	$user_id = get_current_user_id();
    
    	// How many galleries?
    	$allowed_gallery_count = 1; // 0 = no restriction.
    
    	if ( ! $allowed_gallery_count ) {
    		// No restrictions when someone sets it to zero zero.
    		return $can;
    	}
    	// only limit if crossed the limit.
    	if ( mpp_get_user_gallery_count( $user_id ) >= $allowed_gallery_count ) {
    		$can = false;
    	}
    
    	return $can;
    }
    add_filter( 'mpp_user_can_create_gallery', 'mpp_custom_limit_gallery_creation', 10, 3 );
    
    /**
     * Filter on the media upload permission.
     *
     * @param bool        $can can create.
     * @param string      $component component name.
     * @param string      $component_id component id.
     * @param MPP_Gallery $gallery gallery object.
     *
     * @return bool
     */
    function mpp_custom_limit_media_upload( $can, $component, $component_id, $gallery ) {
    
    	// non logged in user's don't have permissions and admin's don't have restrictions.
    	if ( ! is_user_logged_in() || is_super_admin() ) {
    		return $can;
    	}
    
    	$user_id = get_current_user_id();
    	// How Many media is allowed?
    	$allowed_media_count = 2; // 0 = no limit.
    
    	if ( ! $allowed_media_count ) {
    		// No restrictions when zero.
    		return $can;
    	}
    	// only limit if crossed the limit.
    	if ( mpp_get_user_media_count( $user_id ) >= $allowed_media_count ) {
    		$can = false;
    	}
    
    	return $can;
    }
    add_filter( 'mpp_user_can_upload', 'mpp_custom_limit_media_upload', 10, 4 );
    
    

    That will do it. It will only work for MediaPress 1.2.0 or above.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: Error when activating Buddyblog #10887

    Hi Aldo,
    Please allow me a day to check this plugin. I haven’t personally tested it recently. Will give it a try and then get back to you.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384

    Hi Alexandre,
    Please try hooking to ‘init’ section and it should work.

    Here is your code with init action

    
    
    add_action( 'init', 'remove_admin_bar_user', 10001 );
    function remove_admin_bar_user() {
    
    	if ( current_user_can( 'administrator' ) || is_admin() ) {
    
    		show_admin_bar( true );
    	} else {
    		show_admin_bar( false );
    	}
    }
    
    

    Does it work?

    • This reply was modified 8 years, 6 months ago by Brajesh Singh. Reason: Updated privacy to normal
    • This reply was modified 8 years, 6 months ago by Brajesh Singh. Reason: Updated priority to normal