Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi Herve,
    to be honest, I have no idea what worked in the first and what did not. That’s why I tried to rewrite it.

    As per your previous message

    The idea is at the moment of connection (That’s when I can not do it, I think), check if the member has
    * a photo
    * all mandatory fields filled
    * a subscriber role
    * a special value for an xprofile field

    If yes I change the role of the member (member0)

    I made it such.

    What changes do you want in this. Please do know that like I explained earlier, I am unable to work with parts. The code you had supplied was using incorrect variable($this outside the class scope, $bp without declaring global).

    Can you please tell me the issue you are facing with the above code. It is just an upgrade of the previous code and as per your requirement, It does change the role.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi Patricia,
    Welcome to BuddyDev.

    The error you are seeing is due to a bug in BuddyPress 3.0

    At the moment, any field using multi select and multiple checkboxes are throwing the error.

    Please find more details here

    https://buddypress.trac.wordpress.org/ticket/7845

    The fix needs to be in BuddyPress. My suggestion will be to apply the path from the above ticket.

    Thank you
    Brajesh

    • This reply was modified 7 years, 11 months ago by Brajesh Singh.
  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi tangpage

    I am sorry but I am unable to understand.

    1. Can you please tell me the plugin you are using? Is it about BuddyPress member Types Pro?

    2. Can you please clarify the issue in a little more details.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Thank you for the kind words Jill. It is always a pleasure to assist.

    Best regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Thank you. The name sounds good.

    If possible, please use any of the only screenshot sharing site like
    https://prnt.sc/
    or
    https://snag.gy/

    It won’t be easy to allow searching these in optimized way. The search will need to search between the range. Since BuddyPress can not store these data as structured value, we will have to use the serialized value and may be we can put the information in profile data meta. Search from the meta is not efficient and I will try to avoid it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi Jill,
    Thank you for the patience.

    Please upgrade to 1.2.2 and it will allow you to edit from sitewide activity widget too.
    https://buddydev.com/plugins/bp-editable-activity/

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi Sujee,

    There is nothing to be sorry. It was just a request from my end 🙂

    Tank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on in reply to: BuddyPress 3.0 and BuddyDev Plugins #15391

    Thank you Graham.

    That’s a good idea. 3.0.1 will have many fixes and should work as expected.

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    You are welcome. Please do let me know how it goes.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi Sujee,
    Thank you for confirming.

    For the assistance with the other topic:-

    Please leave the members loop intact and you can put this in the functions.php/bp-custom.php

    
    
    /**
     * Filter members loop args.
     *
     * @param array $args
     *
     * @return array
     */
    function buddydev_filter_all_members_list_for_members_dir( $args = array() ) {
    
    	if ( ! bp_is_members_directory() ) {
    		return $args;
    	}
    
    	if ( ! is_user_logged_in() ) {
    		$args['include'] = array( 0, 0 );// invalid
    	} else {
    		$args['user_id'] = get_current_user_id();
    	}
    
    	return $args;
    
    }
    
    add_filter( 'bp_after_has_members_parse_args', 'buddydev_filter_all_members_list_for_members_dir' );
    
    

    That will hide the list for non logged in users and for logged in, only their friends will be visible.

    The script does have following side effects:-
    1. The total members count is still visible in the tab
    2. It affects search.

    PS:- In future, if possible, please open a new topic for new issues. That way, the topic becomes useful for other members having similar issues. I hope you won’t mind that.

    Thank you
    Brajesh