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: 25294

    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: 25294

    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: 25294

    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: 25294

    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: 25294

    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: 25294
    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: 25294
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 25294

    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: 25294

    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

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

    Hi Rika,
    Hope you are doing well.

    In order to change the colors, Please follow the following steps.

    1. Visit Dashboard->Customize
    2. On the customize Page, Please click on Additional Css

    3.In the additional css box, we will use css. Here is an example that you can copy and paste.

    
    #featured-box {
    	background: red;
    }
    
    #b-footer {
    	
    	background: green;
    }
    

    In the above example, we have changed the background of the page header to red and footer to green.

    we can either use the color name or the color code.

    You may pick color from here

    https://htmlcolorcodes.com/color-picker/

    and put the code like this

    
    
    #featured-box {
    	background: #FF0000;
    }
    
    #b-footer {
    	
    	background: green;
    }
    
    

    We have used hexadecimal color for the header(It is still red for example).

    In footer, when you change the background, you may want to change the text color and links color.

    To do that we may change our

    
    #b-footer {
    	
    	background: green;
    }
    
    

    to

    
    
    #b-footer {
    	
    	background: green;
           color: #333;
    }
    
    /* link*/
    #b-footer a{
      color: #333;
    }
    
    

    You can still use the hexadecimal colors for the color property too.

    Hope this helps.

    Regards
    Brajesh