BuddyDev

Search

Replies

  • Participant
    Level: Enlightened
    Posts: 126

    Hi Brajesh
    I’m sorry but I’m going to need help again
    I have a big problem with the program.
    When a member changes their profile picture, the program immediately puts it back in the base role.
    I just checked it.
    I updated the version on https://gist.github.com/sbrajesh/238153f70f770f957fd1c4b2ba60be77
    Regards

  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on in reply to: filter the buddypress members in the list of members #13788

    Hello Brajesh
    I want to exclude these people from a member’s search results, with this criterion
    Good day
    Regards

  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on in reply to: filter the buddypress members in the list of members #13719

    Hello Brajesh

    1/ bug
    I think there is a bug with the previous proposal
    It works well on the list of members.
    It also filters elsewhere and especially on the tab my friends.
    IF I have 10 friends [5 man and 5 woman] (and that I put that I looked for a woman in my profile), I will see only the 5 women

    2 / limited profile photo visibility
    I want to add a 2nd criterion to not display the profile photos of a member whose value of the numeric xprofile field “photo_priorite” is less than 3.
    I found but https://buddypress.trac.wordpress.org/ticket/5839 but I had to make a mistake

    Would it be possible to modify the script for these 2 points.

    Regards

  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on in reply to: [Resolved] reduce the maximum size avatar // gravatar #13715

    Hi Brajesh

    Ok I hope it works but I have not seen the members who use gravatar.
    In addition I have to change the string of characters “If you use Gravatar with the email that you indicated during your registration, it will be displayed.” . Can I overload a single string or do I need to update the entire pot file?

    ok I got it wrong (ko instead of byte) for define ( ‘BP_AVATAR_ORIGINAL_MAX_FILESIZE’, 400 );

    ok i’m looking a plugin to rename a file

    Thank you for these guides that I put in favorites in Firefox
    Hervé

  • Participant
    Level: Enlightened
    Posts: 126

    Hi Brajesh

    1/ The idea is to rename xxrSSDzsrO8iVK99FGzrDl72eJkfbmt4t8yenImKBV9ip2J1EIeUzA9paTSgKmv.jpg by nickname.jpg at the time of registration if it is possible?
    Maybe easier with
    https://screenshots.firefox.com/QtiR2YyHwPx4NKda/null
    https://screenshots.firefox.com/2m0HOHqkv9afntPZ/null

    2 / I tried to disable the checkbox gravatar. No more profile pictures are displayed on the site

    Regards

  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on in reply to: [Resolved] reduce the maximum size avatar // gravatar #13682

    Hello Brajesh

    Thank you for this quick and efficient reply

    1 / works well in bp_custom (at the beginning I put it in functions.php and it did not work) but I do not understand why BP_AVATAR_ORIGINAL_MAX_FILESIZE does not work
    but with buddydev_limit_buddypress_avatar_file_size, would it be possible in addition! save the name of the nickname as filename (because during backups, files with very long names are not saved)

    2/ how to completely disable gravatar* ?

    Regards
    * * it’s a dating site so the photo is mandatory (with your plugin) and must be personalized

  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on in reply to: filter the buddypress members in the list of members #13131

    hi

    Thank you

    For sorting on a numeric field linked to the profile of a member, is there another way to sort?
    knowing that the theme only loads about twenty profiles at a time

    Regards

    • This reply was modified 6 years, 10 months ago by Hervé.
  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on in reply to: filter the buddypress members in the list of members #13125

    Hi Brajesh
    I just did a quick test and it works 🙂
    I will replace by the field id to optimize!
    Is it easy to do a descending sort on a numerc (0 to 10) xprofile at the same time?
    thank you very much

  • Participant
    Level: Enlightened
    Posts: 126

    Hi Brajesh

    No problem.
    I just corrected the problem. I forgot that wordpress stores hard urls (unlike joomla). Do not forget to change the urls if you change the pages related to buddypress
    Thank you for answering

  • Participant
    Level: Enlightened
    Posts: 126
    Hervé on in reply to: filter the buddypress members in the list of members #13099

    Hi Brajesh,

    Thank you for this tips.
    I put the name of my fields but it does not work. So I put the field_id, it does not work, but maybe I was wrong !?

    function buddydev_filter_members_list_herve( $args ) {
    
    	if ( ! is_user_logged_in() ) {
    		return $args;
    	}
    
    	$user_id = get_current_user_id();
    	// get the value for the field.
    	// Use field id for better performance.
    	
    	$field_searching_for = '42'; // the ID of the field referenced in table wp_bp_xprofile_fields
    $searching_for = xprofile_get_field_data( $field_searching_for, $user_id );
    
    	if ( empty( $searching_for ) ) {
    		return $args;
    	}
    
    	$xprofile_query = isset( $args['xprofile_query'] ) ? $args['xprofile_query'] : array();
    
    $field_jesuis = '41'; // the ID of the field referenced in table wp_bp_xprofile_fields
    
    	$xprofile_query[] = array(
    		'field'   => $field_jesuis, // I sugget using field id for more efficiency.
    		'value'   => $searching_for,
    		'compare' => '=',
    	);
    
    	$args['xprofile_query'] = $xprofile_query;
    
    	return $args;
    }
    
    add_filter( 'bp_after_has_members_parse_args', 'buddydev_filter_members_list_herve' );

    Does the type of field (radio button, radio button, select) have an impact on this filter function!?

    I also want to sort descending on the xprofile digital field “priority”
    I found the filter “add_filter( ‘bp_ajax_querystring …” on https://codex.buddypress.org/developer/function-examples/bp_ajax_querystring/ . Is not it easier to manage before displaying a theme?

    Regards