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: 25384
    Brajesh Singh on in reply to: BuddyPress Ajax Registration #10069

    Just checked, your register link is working fine now. Will assist on the login.

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: BuddyPress Ajax Registration #10068

    Thank you. Will do and let you know.

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: [Resolved] Redirect user if not member type #10067

    Hi Ahmed,
    your first way is the right way.

    Here is a modified version of it.

    
    
    function buddydev_example_redirect() {
    	if ( ! is_user_logged_in() ) {
    		//do something with non logged in member
    	}
    
    	$member_type = bp_get_member_type( bp_loggedin_user_id() );
    
    	if ( empty( $member_type ) ) {
    		// current user has no member type, do something
    	}
    
    	if( 'student' === $member_type ) {
    		// is student
    	} elseif( 'teacher' === $member_type ) {
    
    	} elseif( 'staff' === $member_type ) {
    
    	} else {
    		//in all other cases, do something.
    	}
    
    }
    
    add_action( 'bp_template_redirect', 'buddydev_example_redirect' );
    
    

    I hope you can take over from there.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: BuddyPress Editable Activity – not working #10058

    Thank you.

    I am glad it is working on profile. I had a look at the feed and I see the reason now. Your fede on home page but we don’t load the required js on the home page.

    If you put this in your bp-custom.php or your theme’s functions.php

    
    add_filter( 'bp_editable_activity_should_load_assets', function( $load ) {
    
    	return is_user_logged_in();
    });
    

    The js will be loaded on all the pages for the logged in user and it will make that work.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384

    Hi Allan,
    Thank you for asking.

    The first use will not work as you are using the meta query but you are not searching for meta query. BuddyPress profile field data is not stored in user meta.

    The second case will work if you change ‘search-terms’ to ‘search_terms’

    The currently supported options are:-(Example shows an array, you will use = instead of => in shortcode)

    
    
    			'type'                => 'active',
    			'page'                => 1,
    			'per_page'            => 20,
    			'max'                 => false,
    
    			'include'             => false,    // Pass a user_id or a list (comma-separated or array) of user_ids to only show these users.
    			'exclude'             => false,    // Pass a user_id or a list (comma-separated or array) of user_ids to exclude these users.
    
    			'user_id'             => false, // Pass a user_id to only show friends of this user.
    			'member_type'         => '',
    			'member_type__in'     => '',
    			'member_type__not_in' => '',
    			'search_terms'        => '',
    
    			'meta_key'            => false,    // Only return users with this usermeta.
    			'meta_value'          => false,    // Only return users where the usermeta value matches. Requires meta_key.
    
    

    Query based on profile field is possible using xprofile_query but it needs multi dimensional array(which is difficult to allow in the flat shortcode options).

    I will be looking at ways to improve it in future.

    Please try the ‘search_terms’ and let me know if it works or not?

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: [Resolved] Redirect user if not member type #10055

    Hi Ahmed,
    I will suggest hooking to ‘bp_template_redirect’ hook and checking for the logged in members member type using bp_has_member_type( bp_loggedin_user_id(), ‘member_type_name’ ) to redirect the users.

    If you need complete code example, please do let me know.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: Ajax Registration – manual approval? #10053

    Hi Diana,
    I will make the plugin compatible with one of these. Going to test them and report back.

    I share your feelings about the registration experience. BuddyPress Registration experience is not that great. The thing is, It still gives a lot of flexibility and flexibility and usability seldom go well together.

    Will try to do my best to assist you with the screening and approval.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: BuddyPress Editable Activity – not working #10052

    Please check your account now. You should be able to download the plugin for one more month.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384
    Brajesh Singh on in reply to: BuddyPress Editable Activity – not working #10051

    Hi Bogdam,
    Sorry about that. I am adding one more month to your membership in a minute.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25384

    Hi Thorsten,
    My apologies for the confusion

    1. Please use the option to display in the Header meta to have it back as earlier. Aa I had promised earlier( That the change on your site will be part of the plugin, It is part of the plugin now and can be enabled, but we have kept the default to the old one to avoid any issue for other members)

    2. Mutual:- It will only record when both the users have settings enabled. It was there earlier too(but not visible). These two policies have been part of the plugin for long, it was not visible earlier, Now it is visible to the site admins.

    3. You are right for notification, we don’t have a third option. We will have one today to disable.

    4. “Found out that you have to save each entry, then it works”, Do you mean doing it from user profile?

    5. Mutual is a little bit tricky mode:- To get it work, both users should have the profile visits settings on. Currently, you can set the default settings on/off but a user can override it.

    Can you please check again for the point 5 and see if it is not working as expected?

    Thank you
    Brajesh