Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • lesanis
    Participant

    @lesanis

    I have no words… thank you so so much shanebp!!!! You opened my eyes!!


    lesanis
    Participant

    @lesanis

    The code I have now is

    
    <?php $excluded_users = implode(',',get_users("role__in=array('administrator','subscriber','customer')&fields=ID")); ?>
    
    <?php if ( bp_group_has_members( bp_ajax_querystring( 'group_members' ) .'&exclude=' .$excluded_users ) ) : ?>

    but no user is excluded. Isn’t that code right?


    lesanis
    Participant

    @lesanis

    Thank you shanebp, I tried

    
    <?php $excluded_users = implode(',',get_users('role_in=array('administrator','subscriber','customer')&fields=ID')); ?>

    and with double quotes

    
    <?php $excluded_users = implode(',',get_users("role_in=array('administrator','subscriber','customer')&fields=ID")); ?>

    but now no members appear in the directories at all. What do you think is the mistake?


    lesanis
    Participant

    @lesanis

    I don’t believe it, it worked!!! I have spent a lot of time trying to achieve that, thank you so so so much shanebp!!!!!!!!! Is there a way to modify
    get_users('role=subscriber&fields=ID'));
    so more than one roles can be excluded?


    lesanis
    Participant

    @lesanis

    Hello shanebp,

    Thank you for your response! I do not know what d($included_users); does. I just found the code from an old thread. I modified it after your reccommendation to

    
    <?php $included_users = implode(',',get_users('role=subscriber&fields=ID')); ?>
    
    <?php if ( bp_group_has_members( bp_ajax_querystring( 'group_members' ) .'&include=' .$included_users ) ) : ?>

    After that change the page is not breaking but the code does not work at all to filter the members.. Is there anything else that you think I should change?

    Thank you!!


    lesanis
    Participant

    @lesanis

    Hi again,

    I found a way to achieve that…I made a copy of home.php inside my header.php but now

    1) User’s name is not appearing above the cover image inside theme’s header
    2)Buddypress tabs and cover image are appearing in every page..

    Do you think that there is a way to fix these 2 issues?


    lesanis
    Participant

    @lesanis

    Hi @djpaul,

    Mediapress or rtmedia plugins let users create galleries but there is no connection with the profile photo or cover image. In that way if there is a big number of users in a website that are changing their photos all the time the amount of photos that are uploaded in the sever is very big. Is there a way admin to identify wich photos are not used and delete them manually as they cannot be used again?

    Thank you,
    lesanis


    lesanis
    Participant

    @lesanis

    Ok, thank you for your response Henry!


    lesanis
    Participant

    @lesanis

    I don’t believe that it was that simple… Danmp I want to kiss you!!!!! I had read the codex previously but I was so tired and I didn’t understand what I should do. Thank you very very very much once more!!!


    lesanis
    Participant

    @lesanis

    Hello,

    Very usefull code, I have added it in my website and it’s working! Is there a way to make it work with dynamic links like friends followers etc? And is there a way to make it work generally for all user’s profiles and not only if a user is logged in?

    Thank you!!


    lesanis
    Participant

    @lesanis

    Hello @djpaul & @danbp,

    Thank you so so so much for your support!!!! I am searching 2 days now for a solution and the code you provided did the trick!!! You are awesome guys!!!!!!!!!


    lesanis
    Participant

    @lesanis

    Hello danbp,

    I have tried all the following but no luck…

    function value_field_remove_html_filter() {
    	remove_filter( 'bp_get_the_profile_field_value',           'xprofile_filter_kses', 1 );
    }
    add_action( 'bp_init', 'value_field_remove_html_filter' );
    
    function edit_value_field_remove_html_filter() {
    	remove_filter ( 'bp_get_the_profile_field_edit_value',      'wp_filter_kses',       1 );
    }
    add_action( 'bp_init', 'edit_value_field_remove_html_filter' );
    
    function data_field_remove_html_filter() {
    	remove_filter ( 'xprofile_get_field_data',                  'xprofile_filter_kses', 1 );
    }
    add_action( 'bp_init', 'data_field_remove_html_filter' );
    
    function data_value_before_save_remove_html_filter() {
    	remove_filter( 'xprofile_data_value_before_save',          'xprofile_sanitize_data_value_before_save', 1, 4 );
    }
    add_action( 'bp_init', 'data_value_before_save_remove_html_filter' );
    
    function value_2_field_remove_html_filter() {
    	remove_filter( 'bp_get_the_profile_field_value',           'xprofile_filter_kses', 1 );
    }
    add_action( 'bp_init', 'value_2__field_remove_html_filter' );
    
    function options_before_save_field_remove_html_filter() {
    	remove_filter( 'xprofile_field_options_before_save', 'bp_xprofile_sanitize_field_options' );
    }
    add_action( 'bp_init', 'options_before_save_field_remove_html_filter' );
    
    function default_before_save_field_remove_html_filter() {
    	remove_filter( 'xprofile_field_default_before_save', 'bp_xprofile_sanitize_field_default' );
    }
    add_action( 'bp_init', 'default_before_save_field_remove_html_filter' );
    

    I have managed to remove the html filter for Name and Description but I am not able to do the same for Xprofile fields what is that I need. Do you have any suggestions?

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