BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27778

    Disregard, It’s only not working on one members profile. I’m not sure why.

  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27777

    Here is the code I used in my bp-custom.php

    //Add visibilty by member type
    add_filter( 'bp_xprofile_get_visibility_levels', 'buddydev_add_member_type_profile_visibility' );
    
    function buddydev_add_member_type_profile_visibility( $visibilities ) {
     
        $member_types = bp_get_member_types( array(), 'object' );
        // If there is no registered member type, return the original visibilities.
        if ( empty( $member_types ) ) {
            return $visibilities;
        }
     
        // Add our member type as visibility levels.
        foreach ( $member_types as $member_type => $member_type_object ) {
            $visibilities[ $member_type ] = array(
                'id'    => $member_type,
                'label' => $member_type_object->labels['singular_name'],
            );
        }
     
        return $visibilities;
    }
    
    function buddydev_get_hidden_visibility_types_for_user( $hidden_levels, $displayed_user_id, $current_user_id ) {
     
        $member_types = bp_get_member_types();
     
        // If user is not logged in
        // All member type visibilities will be hidden.
        if ( ! is_user_logged_in() ) {
            $hidden_levels = array_merge( $hidden_levels, $member_types );
        } elseif ( ( $displayed_user_id == $current_user_id ) || is_super_admin( $current_user_id ) ) {
            // Do not hide anything on own profile or viewed by super admin.
        } else {
            // User is logged in and viewing other user's profile.
            $logged_member_types = bp_get_member_type( $current_user_id, false );
            // except current user's member type, all other levels will be hidden.
            if ( $logged_member_types ) {
                $member_types = array_diff( $member_types, $logged_member_types );
            }
     
            $hidden_levels = array_merge( $hidden_levels, $member_types );
        }
     
        return $hidden_levels;
    }
     
    add_filter( 'bp_xprofile_get_hidden_field_types_for_user', 'buddydev_get_hidden_visibility_types_for_user', 10, 3 );
  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27751

    It looks like it’s working now. She has 95% of her storage allotment now. Thanks.

  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27693

    It worked. Thanks Ravi

  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27692

    There is a system check option in Media Cloud that will run a test. I would suggest doing that and see what the results are. It might help you debug.

  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27685

    Are the images not in the Gallery or the Library? I use Media Cloud and I see the images in both.

  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27621

    I use Media Cloud to upload to my S3 storage. It works pretty good.

  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27469

    I found a plugin that opens all external links in a new window. This seems to do what I was looking for. Here is the plugin link in case anyone else needs the same thing. https://wordpress.org/plugins/open-in-new-window-plugin/

  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27468

    You can use WP All Import with the User Add-on. It works great. I’ve used it on a few sites.
    http://www.wpallimport.com/add-ons/user-import/

  • Participant
    Level: Enlightened
    Posts: 38
    Keith on #27451

    Hey Brajesh,

    I was able to narrow down the conflict to Ultimate Memberships Pro.https://codecanyon.net/item/ultimate-membership-pro-wordpress-plugin/12159253

    Once I deactivated that and cleared my cache it was fine. I’m trying out Paid Memberships Pro in the mean time.