BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 5
    Mark Lawrence on #30477

    No problem at all thanks so much for your help. This is a really great feature.

    I still get the same error after removing the ‘?>’

    How can I check the error logs. Little new to this bit.

    Regards

    Mark

  • Participant
    Level: Initiated
    Posts: 5
    Mark Lawrence on #30475

    Hi This is throwing

    There has been a critical error on your website. Please check your site admin email inbox for instructions.

    This is the layout of my bp-custom.php file in plugins

    <?php
    add_filter( ‘bp_docs_get_default_access_options’, ‘my_change_docs_default_access_levels’ );
    function my_change_docs_default_access_levels( $defaults ) {
    $defaults[‘read’] = ‘loggedin’;
    $defaults[‘edit’] = ‘creator’;
    $defaults[‘read_comments’] = ‘loggedin’;
    $defaults[‘view_history’] = ‘creator’;
    return $defaults;
    }

    /*allowing badges to be shown first in the searches*/
    add_filter( 'bp_has_members', function ( $has_members, $members_template ) {

    if ( ! $has_members || ! function_exists( 'bp_user_badges_get_user_badges' ) ) {
    return $has_members;
    }

    if ( ! bp_is_members_directory() ) {
    return $has_members;
    }

    usort( $members_template->members, function ( $first, $second ) use ( $members_template ) {

    if ( count( bp_user_badges_get_user_badges( $second->ID ) ) >= count( bp_user_badges_get_user_badges( $first->ID ) ) ) {
    return 1;
    }

    return -1;
    } );

    return $has_members;
    }, 10, 2 );
    ?>

    I have another function at the top. Im also using the plugin bp profile search. Which I think uses filters, could this be the problem?

  • Participant
    Level: Initiated
    Posts: 5
    Mark Lawrence on #30436

    Hi Brajesh

    Just seeing if you had any luck with this feature.

    Thanks for looking into this.

  • Participant
    Level: Initiated
    Posts: 5
    Mark Lawrence on #30337

    THanks so much thats amazing. Cheers for this, please let me know if I can help in any way. Have a great weekend. 🙂

  • Participant
    Level: Initiated
    Posts: 5
    Mark Lawrence on #26018

    Hi Brajesh

    This is just what im after did this ever come together?

    Really been scratching my head trying to find a solution Your plugin is perfect (Great work by the way) to blanket block all members.

    Im trying to have

    Non member – Cant see anything bar info on the system. (Sorted this with Buddy Press Members Only)

    Level 1 – Read only, can read public groups but not join and post.

    Level 2 – Can join and post freely.

    Is there a way to link the Limit Group membership Settings with a role?

    Thanks so much for your help.

    Regards

    Mark