BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] Redirect After Registration #45151

    Thank you.

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: installation breaks the groups #45150

    HI Greg,
    Thank you for purchasing from us.

    It seems you have created one or more tab with faulty configuration(using this plugin). Can you please check if you have created some tabs or not?

    If yes, Please check the configuration. Are the accessible? Are they set as default?

    We will issue the refund as and when you request it, there is no issue with that.

    If you can check the tabs configuration and let me know, I can assit you get it working.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] Generic Activity URL Needed #45148

    Hi,
    Welcome to BuddyDev.
    You can use the following url

    
    https://themislabeledspecimen.com/members/me/
    
    

    The ‘me’ will be automatically replaced by the current member.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi,
    Thank you for creating this topic and sharing the details.

    I will have the update within next 24 hours with a solution.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: [Resolved] Delay when posting on BP #45145
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi Quint,
    Thank you for the reply and confirming.

    2. I have slightly updated the code( Also included your code for inch2feet, so please remove the old one).

    
    
    function inches2feet($inches){
    
    	//Get the feet by dividing the inches by 12.
    	$feet = intval($inches/12);
    	//Then, get the remainder of that division.
    	$inches = $inches % 12;
    	//If there is no remainder, then it's an even figure
    	if($inches == 0){
    		return $feet . ' foot';
    	}
    	//Otherwise, return it in ft and inches.
    	return sprintf('%d ft %d inches', $feet, $inches);
    }
    
    /**
     * Converts inches to metric unit(zz meters, xx cms ).
     *
     * @param float $inches inch.
     *
     * @return string
     */
    function inches2metric( $inches ) {
    
    	$cms = $inches * 2.54;
    
    	$len_meters = floor( $cms / 100 );
    	$len_cms    = $cms % 100;
    
    	$out = array();
    
    	if ( $len_meters ) {
    		$out [] = sprintf( '%d meters', $len_meters );
    	}
    	if ( $len_cms ) {
    		$out [] = sprintf( '%d cm', $len_cms );
    	}
    
    	return join( ', ', $out );
    
    }
    
    add_filter( 'bp_get_the_profile_field_value', function ( $field_value, $field_type = '', $field_id = '' ) {
    	if ( ! $field_id || ! $field_value ) {
    		return $field_value;
    	}
    
    	$height_fields = array( 8, 9 );// update your field ids.
    	if ( ! in_array( $field_id, $height_fields ) ) {
    		return $field_value;
    	}
    
    	$field_value = floatval( $field_value );
    
    	$imperial_length = inches2feet( floatval( $field_value ) );
    	$metric_length   = inches2metric( $field_value );
    
    	return "{$imperial_length}({$metric_length})";
    
    }, 9, 3 );
    
    

    It will display in the format ” xx ft, yy inch( mm meters, zz cms)”.
    Please feel free to adapt it.

    3. Thank you. I do believe that.

    Sure, I am looking forward to it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi Quint,
    Welcome back.

    1. You can apply it to multiple fields in the profile loop using a filter

    
    
    add_filter( 'bp_get_the_profile_field_value', function ( $field_value, $field_type = '', $field_id = '' ) {
    	if ( ! $field_id || ! $field_value ) {
    		return $field_value;
    	}
    
    	$height_fields = array( 8, 9 );// update your field ids.
    	if ( ! in_array( $field_id, $height_fields ) ) {
    		return $field_value;
    	}
    
        return inches2feet( floatval( $field_value ) );
    
    }, 9, 3 );
    
    

    2. Do you want me to update to append the original value. If yes, what would be the display format.

    3. Thank you for the suggestion and I am surely considering adding a length field.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi Tosin,
    Thank you. I will be getting back to you late this weekend with more details.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211

    Hi April,
    Thank you for the details.

    I do not understand your point but I do understand that you want the link to be /members/xyz/first-name for xyz user.

    At the moment, the plugin does not have this ability. We can add it in next 2-3 days via hook. We will not add this to plugin core as it does not represent our intended use case and will be more trouble for most of the members who do not understand how BuddyPress/BuddyBoss works(You seem to know, so that does not apply to you).

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25211
    Brajesh Singh on in reply to: BuddyPress Group Tabs Creator Pro upgrade issue #45134

    Hi David,
    I am sorry. I am not sure what could be the cause as you do have active membership. Do you have any staging site where I can check the same?

    Regards
    Brajesh