BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25128
    Brajesh Singh on in reply to: Help Needed with Profile Completion Plugin #55037

    Please put it in your theme’s functions.php

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25128
    Brajesh Singh on in reply to: Help Needed with Profile Completion Plugin #55031

    Thank you.

    In that case the following code will avoid redirection.

    
    
    /**
     * Do not redirect on page 1401.
     */
    add_filter( 'bp_force_profile_completion_skip_check', function ( $skip ) {
    	if ( is_page( 1401 ) ) {
    		$skip = true;
    	}
    
    	return $skip;
    } );
    

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25128

    Hi Josh,
    Thank you for the question.

    I will list the issues you are facing and the probably solutions.

    
    1. Is it possible to stop access to members directory page?
    

    Yes, we can simply check if it is members directory page and not single member page, redirect to somewhere else.

    2. The profile page data links to directory, now that would be a problem as BuddyPress files your profile data and links to directory in a searchable format.
    The solution would be to either disable this linking completely or put Andrea’s search plugin’s search form on your members directory.

    I can help with your question 1 but I lack time to assist you the issue 2. Please let me know if you need code for 1.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25128
    Brajesh Singh on in reply to: “This file type is not supported” #55029

    Hi John,
    Hope you are doing well.
    I am sorry for the delayed reply.

    Which file type are you trying to upload. Can you visit Dashboard->MediaPress->Settings->General and check which image file extensions are allowed?
    It is probably an issue with the allowed extensions list.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25128
    Brajesh Singh on in reply to: Rename Circles? #55028

    Yes, Please use poedit or similar tool that allows changing/creating localization without the need for installing it on your site.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25128
    Brajesh Singh on in reply to: User Circles – How to rename "circles" #55027

    Hi Lawrence,
    Thank you for the reply.

    There is only one hardcoded instance which can not be localized, It is slug. That’s why we provide the option to change slug in settings.

    For all other changes, you will need to localize it. You can use a translation plugin or a localization tool such as poedit that does it one time.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25128
    Brajesh Singh on in reply to: BuddyCircles message button not working #55026

    Hi Lawrence,
    Thank you for your reply.

    We do not have any message button to send message to your circle. The message button being discussed here is the button on individual user card for sending DM to them.

    Is that button appearing/not appearing for you?

    Regards
    Brajesh

    PS:- Please open a new topic and link me, we should leave old topics to avoid unnecessary notifications to the original topic author.

  • Keymaster
    (BuddyDev Team)
    Posts: 25128
    Brajesh Singh on in reply to: bug BuddyPress Profile Data Moderator #54970

    Hi Jerome,
    Thank you for your patience.

    I have investigated the issue thoroughly and the only solution is to avoid using wp-bigraphy/similar mapping and use the BuddyPress Xprofile field(create one named Bio).

    The problem is with BuddyPress and It will have impact on your search as well.

    When a user saves a field which is mapped to WordPress fields, BuddyPress does not have it in the xprofile field data.

    If you had a field in xprofile and you mapped, the old data will remain there and will never be updated. In case of mapped fields, It updates user meta.

    The problem with this approach is it is neither consistent, causes data redundancy/inconsistent state and issues with Profile Data search. It seems, when this feature was introduced(It has been in recent years), It did not go through thorough testing.

    I will suggest avoid using this field mapping as there are no visible benefit of mapping the field.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25128
    Brajesh Singh on in reply to: BuddyDev Friends Suggestions Pro “like/not like” #54969

    HI Alex,
    I am sorry for the delayed reply.

    I have been thinking a solution about it. There is a solution without BuddyPress Friends suggestions pro though. xprofile query are costly(slow), so I am not sure if we should do that or not.

    The approach is to first create a xprofile query builder or this field

    
    function bpfscustom_get_multiselect_field_query( $user_id, $field_id, $match_field_id, $compare ) {
    
    	$field_data = xprofile_get_field_data( $field_id, $user_id );
    
    	if ( empty( $field_data ) ) {
    		return array();
    	}
    
    	if ( ! is_array( $field_data ) ) {
    		return array(
    			array(
    				'field'   => $match_field_id,
    				'value'   => $field_data,
    				'compare' => $compare,
    			)
    		);
    	}
    
    	$query = array();
    	foreach ( $field_data as $datum ) {
    		$query[] = array(
    			'field'   => $match_field_id,
    			'value'   => $datum,
    			'compare' => $compare,
    		);
    	}
    
    	return $query;
    }
    
    

    and then use it in the bp-friend-suggestions-pro-functions.php near line 119

    
    
    		if ( $rule['field_id'] == ACTUAl_MULTI_SELECT_FIELD_ID ) {
    			$queries = bpfscustom_get_multiselect_field_query( $user_id, $rule['field_id'], $rule['match_field_id'], $compare );
    			if ( ! empty( $queries ) ) {
    				$xp_query = array_merge( $xp_query, $queries );
    			}
    continue;
    		}
    

    You should replace the ACTUAl_MULTI_SELECT_FIELD_ID with the numeric field id for the multi select.

    So, the lines in this file which looked like this’

    
    		$xp_query[] = array(
    			'field'   => $rule['match_field_id'],
    			'value'   => $value,
    			'compare' => $compare,
    		);
    

    will be

    
    
    		if ( $rule['field_id'] == ACTUAl_MULTI_SELECT_FIELD_ID ) {
    			$queries = bpfscustom_get_multiselect_field_query( $user_id, $rule['field_id'], $rule['match_field_id'], $compare );
    			if ( ! empty( $queries ) ) {
    				$xp_query = array_merge( $xp_query, $queries );
    			}
    			continue;
    		}
    
    		$xp_query[] = array(
    			'field'   => $rule['match_field_id'],
    			'value'   => $value,
    			'compare' => $compare,
    		);
    
    

    Hope that helps.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25128

    Hi Dianne,
    Thank you for the reply and renewing membership. Announcement coming on February 4th(current plan).
    It is something we discussed over mail long ago, I got some of your great suggestions, It’s delayed but finally getting ready 🙂

    Regards
    Brajesh