New
PeoplePress is here. Community building for WordPress, reimagined. Fast, modern, and built for the communities you've always wanted to run.
See it live

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: Is it possible to share and/or embed a media? #14135

    Hi Jon,
    Welcome to BuddyDev.

    Please re download the plugin. We had the development going on in another branch. @ravisharma has merged it to main and the plugin will work with lightbox.

    https://github.com/mediapress/mpp-social-share

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi George,
    Thank you for reminding.
    I could not check it as 1.3.5 got more priority. Please allow me next 2 days to put a solution for this.

    Congratulations on acquiring new knowledge and the plugin. I am sure it will be helpful in future for all of us.

    I am looking forward to see the new things you will bring to life. Don’t forget to link me to the plugin once it is available in release state 🙂

    Best Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Mwale,
    The code you have linked is very inefficient. It will do the processing/checking on each page load which is not a great strategy.

    I will suggest not using the code in its current form.

    Also, The solution should be simple like I showed in my previous example, it is all a matter of knowing what action fires when the membership expires/deactivates.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Keith,
    I am not able to help with the All Import plugin but here is an example of how I had done it for BP Gallery

    https://github.com/mediapress/mpp-bp-gallery-migrator

    This should give enough inspiration.

    The basic steps are to

    1. Create MediaPress Gallery based on your input(mpp_add_gallery())
    2. Add media to this gallery(mpp_add_media() )
    3. If you are working with existing files, move them to appropriate directory.

    Please see the plugin for more details.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Herve,
    You can create a field and set it’s visibility to Admin only. That should most probably help you achieve it.

    For the data part, i will leave it upto you to handle.

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Khalid,
    Please upgrade to 1.0.8
    https://buddydev.com/plugins/buddypress-user-profile-tabs-creator-pro/

    Let me know if that fixed it or not?

    I have added fix for modifying the existing navs with urls(having no default slug specified).

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    Brajesh Singh on in reply to: [Resolved] about search box & footer color #14106

    Hi Rika,
    Thank you for confirming.

    Please feel free to use the forum to ask any question.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Herve,
    Please change the log_deleted function in your class file with mine. The error means you are using it outside the class file.

    Or you may share the original class and I can update it for you.

    If CSS works, that will be nice too.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25509

    Hi Herve,
    Please use this updated code

    
    
    /**
     * Custom filter for members list for Herve.
     *
     * @param BP_User_Query $query query object.
     *
     * @return array
     */
    function buddydev_filter_members_list_herve( $query ) {
    
    	if ( ! is_user_logged_in() ) {
    		return;
    	}
    
    	$user_id = get_current_user_id();
    	// get the value for the field.
    	// Use field id for better performance.
    	$searching_for = xprofile_get_field_data( 'I search', $user_id, 'comma' );
    
    	if ( empty( $searching_for ) ) {
    		return;
    	}
    
    	if ( bp_is_user_friends() ) {
    		return;// do not filter on the friends page. It will be problemetic as it won't filter the widget/shortcode on the friends page.
    	}
    
    	$xprofile_query = isset( $query->query_vars['xprofile_query'] ) ? $query->query_vars['xprofile_query'] : array();
    
    	$xprofile_query[] = array(
    		'field'   => 'I am', // I suggest using field id for more efficiency.
    		'value'   => $searching_for,
    		'compare' => '=',
    	);
    
    	if ( bp_is_members_directory() ) {
    		//photo_priorite
    		$xprofile_query[] = array(
    			'field'   => 'photo_priorite',
    			'value'   => 3,
    			'compare' => '>=',
    			'type'    => 'NUMERIC',
    		);
    	}
    
    	if ( ! empty( $xprofile_query ) ) {
    		$query->query_vars['xprofile_query'] = $xprofile_query;
    	}
    
    	return $query;
    }
    
    add_action( 'bp_pre_user_query_construct', 'buddydev_filter_members_list_herve', 0 );
    

    It will not hide users on friends screen anymore and on the directory, will only list users who have
    xprofile field named “photo_priorite” and value set to 3 or above.

    Regards
    Brajesh