Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • beforeplastic
    Participant

    @beforeplastic

    PS, I just added that code and it broke my site with the following error:
    Parse error: syntax error, unexpected ‘,’ in /home/mysite/public_html/wp-content/plugins/bp-custom.php on line 7


    beforeplastic
    Participant

    @beforeplastic

    Thank you but that doesn’t provide me the path the original file I was directed to update where I needed to add the ID numbers. I still need to know where that file lives.

    For this new solution, what is the latest “official” complete code I should include in the new bp-custom.php file? The link you provided is asking me to create a new file if it didn’t exist. I did that adding it here in the plugins folder: public_html/wp-content/plugins

    Including this code as a starting point:

    <?php
    // hacks and mods will go here
    ?>
    —————————–
    Is the below the correct and complete code to use?

    // Remove admin from the member directory
    function bpdev_exclude_users($qs=false,$object=false){

    $excluded_user=’1′; // Id’s to remove, separated by comma

    if($object != ‘members’ && $object != ‘friends’)// hide admin to members & friends
    return $qs;

    $args=wp_parse_args($qs);

    if(!empty($args[‘user_id’]))
    return $qs;

    if(!empty($args[‘exclude’]))
    $args[‘exclude’] = $args[‘exclude’].’,’.$excluded_user;
    else
    $args[‘exclude’] = $excluded_user;

    $qs = build_query($args);

    return $qs;

    }
    add_action(‘bp_ajax_querystring’,’bpdev_exclude_users’,20,2);

    // once admin is removed, we must recount the members !
    function bpfr_hide_get_total_filter($count){
    return $count-1;
    }
    add_filter(‘bp_get_total_member_count’,’bpfr_hide_get_total_filter’);


    beforeplastic
    Participant

    @beforeplastic

    Re: Hiding admins from member list:

    In looking back at all of these threads I realize we didn’t jot down the root path to the file we need to update with this code: $excluded_user=’1, 23, 267′;

    Can someone provide the path to get to this file? I can’t seem to find it again.

    example: wp-content/buddypress/bp-themes/otherfoldername/filename.php


    beforeplastic
    Participant

    @beforeplastic

    We have to update these two lines of code for each user correct?

    $excluded_user=’1′;
    add_action(‘bp_ajax_querystring’,’bpdev_exclude_users’,20,2);


    beforeplastic
    Participant

    @beforeplastic

    I found this. May I made a feature enhancement request to add each of these code features to enable a check box in the users section of the admin panel? Having to manually add the ID of new users to hide isn’t practical: https://buddypress.org/support/topic/hide-admin-from-members-and-activity/:

    // Remove admin from the member directory
    function bpdev_exclude_users($qs=false,$object=false){

    $excluded_user=’1′; // Id’s to remove, separated by comma

    if($object != ‘members’ && $object != ‘friends’)// hide admin to members & friends
    return $qs;

    $args=wp_parse_args($qs);

    if(!empty($args[‘user_id’]))
    return $qs;

    if(!empty($args[‘exclude’]))
    $args[‘exclude’] = $args[‘exclude’].’,’.$excluded_user;
    else
    $args[‘exclude’] = $excluded_user;

    $qs = build_query($args);

    return $qs;

    }
    add_action(‘bp_ajax_querystring’,’bpdev_exclude_users’,20,2);

    // once admin is removed, we must recount the members !
    function bpfr_hide_get_total_filter($count){
    return $count-1;
    }
    add_filter(‘bp_get_total_member_count’,’bpfr_hide_get_total_filter’);


    beforeplastic
    Participant

    @beforeplastic

    PS. Maybe hide by member type? or in the admin panel is there a checkbox? When I check ” Exclude user from Author-sitemap” the member still shows up under members.


    beforeplastic
    Participant

    @beforeplastic

    We put the PHP back to 5.6 and it started working again with only this one error on Groups sub-pages:
    https://www.beforeplastic.com/groups/shop-owners/

    Well that I have found… 🙂


    beforeplastic
    Participant

    @beforeplastic

    FYI we tried putting it back to 7.1 and it broke the site again:

    Error on the front end:
    Fatal error: Uncaught TypeError: Argument 1 passed to MC4WP_Form_Listener::listen() must be an instance of MC4WP_Request, instance of MC4WP_Request given, called in /home/mysite/public_html/wp-content/plugins/mailchimp-for-wp/includes/forms/class-form-manager.php on line 92 and defined in /home/mysite/public_html/wp-content/plugins/mailchimp-for-wp/includes/forms/class-form-listener.php:27 Stack trace: #0 /home/mysite/public_html/wp-content/plugins/mailchimp-for-wp/includes/forms/class-form-manager.php(92): MC4WP_Form_Listener->listen(Object(MC4WP_Request)) #1 /home/mysite/public_html/wp-content/plugins/mailchimp-for-wp/includes/forms/class-form-manager.php(59): MC4WP_Form_Manager->init_form_listener() #2 /home/mysite/public_html/wp-includes/class-wp-hook.php(298): MC4WP_Form_Manager->initialize(”) #3 /home/mysite/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #4 /home/mysite/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /home/mysite/public_html in /home/mysite/public_html/wp-content/plugins/mailchimp-for-wp/includes/forms/class-form-listener.php on line 27

    and now this error on the back end in WP-admin:
    Fatal error: Uncaught Error: [] operator not supported for strings in /home/mysite/public_html/wp-content/plugins/buddypress/bp-activity/classes/class-bp-activity-component.php:281 Stack trace: #0 /home/mysite/public_html/wp-includes/class-wp-hook.php(298): BP_Activity_Component->setup_admin_bar(”) #1 /home/mysite/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #2 /home/mysite/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 /home/mysite/public_html/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(143): do_action(‘bp_setup_admin_…’) #4 /home/mysite/public_html/wp-includes/class-wp-hook.php(298): bp_setup_admin_bar(Object(WP_Admin_Bar)) #5 /home/mysite/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #6 /home/mysite/public_html/wp-includes/plugin.php(515): WP_Hook->do_action(Array) #7 /home/mysite/public_html/wp-includes/admin-bar.php(83): do_action_ref_array(‘admin_bar_menu’, Array) #8 /home/mysite in /home/mysite/public_html/wp-content/plugins/buddypress/bp-activity/classes/class-bp-activity-component.php on line 281

    I guess 7.1 isn’t fixed yet.


    beforeplastic
    Participant

    @beforeplastic

    Thank you. FYI I am still having issues:

    See ticket I just submitted to my hosting company and their response.
    You
    Posted On 21 Jan, 2017 00:55 CST
    Hello,

    I am getting this error:

    Warning: include(): Filename cannot be empty in /home/mysite/public_html/wp-content/themes/rehub/buddypress/groups/single/index.php on line 14

    Warning: include(): Failed opening ” for inclusion (include_path=’.:/usr/local/php56/pear’) in /home/mysite/public_html/wp-content/themes/rehub/buddypress/groups/single/index.php on line 14

    on this page https://www.beforeplastic.com/groups/shop-owners/

    Wondering if this is connected to the support ticket submitted yesterday.

    Thanks so much

    Support GuruPosts: 5856Posted On 21 Jan, 2017 01:10 CST
    Hello,

    Thank you for contacting our Help Desk center!

    Indeed, this is caused by changing the PHP version as it was done in the previous ticket. It seems that by solving one problem another one arises and this might mean that something in your website is misconfigured. I recommend you to seek the assistance of a professional developer to find the weak link in the coding of BuddyPress.

    If you need further assistance, do not hesitate to contact us again.

    ——

    My hope is that the BuddyPress developers are already working on a fix to this problem.
    Thanks so much!


    beforeplastic
    Participant

    @beforeplastic

    On a profile page / viewed blog results, the previous entries link at the bottom of the results page takes you to a 404 page. Would this be a buddypress or buddyforms issue?

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