Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 24 replies - 1 through 24 (of 24 total)

  • inderpreet2018
    Participant

    @inderpreet2018

    ??


    inderpreet2018
    Participant

    @inderpreet2018

    any reply?


    inderpreet2018
    Participant

    @inderpreet2018

    Can you help me little more?
    how I used that filter to remove denied user to mention, denied status is saved in usermeta.

    I am some code snippet getting users whose role is subscriber and status is denied/pending to exclude from members directory, members count
    $role = ‘subscriber’;// change to the role to be excluded.
    $user_ids = get_users(array( ‘role’ => $role, ‘fields’ => ‘ID’, ‘meta_query’ => array(‘relation’ => ‘OR’, array(‘key’ => ‘pw_user_status’, ‘value’ => ‘pending’), array(‘key’ => ‘pw_user_status’, ‘value’ => ‘denied’)) ) );
    2019-03-28_1300

    Is that way I used above filter?


    inderpreet2018
    Participant

    @inderpreet2018

    any help??


    inderpreet2018
    Participant

    @inderpreet2018

    I added the above filter to function.php file, but that’s not working at all
    2019-03-24_1458
    2019-03-24_1500


    inderpreet2018
    Participant

    @inderpreet2018

    Hi,

    I am using memberpress plugin for members login/profile with buddypress. And I am using New User approved plugin to approve members. So there are a number of denied users/members, which I don’t want to see in tagging option, as I described above.


    inderpreet2018
    Participant

    @inderpreet2018

    I write in same way, as you send above in function file. But nothing worked.


    inderpreet2018
    Participant

    @inderpreet2018

    I added above script to the function file, but it still not searching for the name.
    2019-03-20_1136


    inderpreet2018
    Participant

    @inderpreet2018

    Hi,

    I added the code to exclude denied and pending users from member directory, listing and forum count. It works fine 2 days before. But now it’s not.
    2019-03-19_1051
    2019-03-19_1055

    Total memebers are 122 but it shows 119. Even I run the repair tool.

    Here is my code
    ///// Remove pending/denied users from the member directory////////
    add_filter( ‘bp_after_has_members_parse_args’, ‘buddydev_exclude_users_by_role’ );
    function buddydev_exclude_users_by_role( $args ) {
    // do not exclude in admin.
    if ( is_admin() && ! defined( ‘DOING_AJAX’ ) ) {
    return $args;
    }

    $excluded = isset( $args[‘exclude’] ) ? $args[‘exclude’] : array();
    if ( ! is_array( $excluded ) ) {
    $excluded = explode( ‘,’, $excluded );
    }

    $role = ‘subscriber’;// change to the role to be excluded.
    $user_ids = get_users(array( ‘role’ => $role, ‘fields’ => ‘ID’, ‘meta_query’ => array(‘relation’ => ‘OR’, array(‘key’ => ‘pw_user_status’, ‘value’ => ‘pending’), array(‘key’ => ‘pw_user_status’, ‘value’ => ‘denied’)) ) );

    $excluded = array_merge( $excluded, $user_ids );
    $args[‘exclude’] = $excluded;

    return $args;
    }

    /********** Excluded ADmin and pending/denied users from members listing page ***************/
    function exclude_total_users($count){

    $role = ‘subscriber’;// change to the role to be excluded.
    $user_ids = get_users(array( ‘role’ => $role, ‘fields’ => ‘ID’, ‘meta_query’ => array(‘relation’ => ‘OR’, array(‘key’ => ‘pw_user_status’, ‘value’ => ‘pending’), array(‘key’ => ‘pw_user_status’, ‘value’ => ‘denied’)) ) );

    $user_excluded = count($user_ids);

    return ($count – $user_excluded – 1);
    }
    add_filter(‘bp_get_total_member_count’,’exclude_total_users’);

    /******* Exclude pending/denied and admin users from forum stats ***********/

    function exclude_users_forum($user_count){

    $role = ‘subscriber’;// change to the role to be excluded.
    $user_ids = get_users(array( ‘role’ => $role, ‘fields’ => ‘ID’, ‘meta_query’ => array(‘relation’ => ‘OR’, array(‘key’ => ‘pw_user_status’, ‘value’ => ‘pending’), array(‘key’ => ‘pw_user_status’, ‘value’ => ‘denied’)) ) );

    $user_excluded = count($user_ids);

    return ($user_count – $user_excluded – 1);
    }
    add_filter(‘bbp_get_total_users’,’exclude_users_forum’);
    /*******************/

    Can you help me to sort it out, what is the issue??

    Thanks in advance.


    inderpreet2018
    Participant

    @inderpreet2018

    Thanks for the suggestion. I will try it soon.


    inderpreet2018
    Participant

    @inderpreet2018

    That was not fixed with custom code. Custom code fixes “Viewing 1 to 20 of 46 active members”, not the main counts https://www.screencast.com/t/JR7qDZTkDL9D

    Everytime I need to go back to admin section, tools -> buddypress.


    inderpreet2018
    Participant

    @inderpreet2018

    Thanks for reply.

    I used custom code to achieve my goal. And it’s all working fine now.


    inderpreet2018
    Participant

    @inderpreet2018

    any solution??


    inderpreet2018
    Participant

    @inderpreet2018

    Hi,

    Can you let me know,
    1. For which I need to disable email, memberpress or something else?
    2. how I disable activation email?
    3. how I activate them manually?


    inderpreet2018
    Participant

    @inderpreet2018

    Hi,

    For members count on member listing page, every time I need to go back to admin and follow the above steps to show the current users counts.

    Is there a way it will automatically update the counts on members listing page?

    Thanks


    inderpreet2018
    Participant

    @inderpreet2018

    Yes, I am using “New User approve” plugin, as I am using “Memberpress” plugin to maintain registrations.

    How I approve new users from buddypress?


    inderpreet2018
    Participant

    @inderpreet2018

    Wow! it worked.

    Thanks for your help.


    inderpreet2018
    Participant

    @inderpreet2018

    Thanks for your help. It worked.


    inderpreet2018
    Participant

    @inderpreet2018

    Thanks Parshant, finally something is worked. Above code works and shows under Topics Started tab.
    2018-10-20_2006

    Is there any way to show Forum Form as tab like Topic started and other tabs?


    inderpreet2018
    Participant

    @inderpreet2018

    Hi,

    I used the above code as you said. But the same, nothing is showing up
    2018-10-18_0757


    inderpreet2018
    Participant

    @inderpreet2018

    Hi,

    I used “current_user_can” function, but Forum form is not displaying for moderators.


    inderpreet2018
    Participant

    @inderpreet2018

    I replaced current_user_can(‘moderate’) to bb_current_user_can(‘moderate’), but nothing works and gives error on my forum page
    2018-10-16_0729
    2018-10-16_0730


    inderpreet2018
    Participant

    @inderpreet2018

    How I check my theme or plugin conflict with that?


    inderpreet2018
    Participant

    @inderpreet2018

    I didn’t modified any template or file from Buddypress. I am using Divi theme and memberPress plugin for maintaining the members. Also used “MemberPress + BuddyPress Integration” plugin to integrates MemberPress with BuddyPress.

    Is any one from above creating issue for tabs?

Viewing 24 replies - 1 through 24 (of 24 total)
Skip to toolbar