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

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

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

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

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

  • Keymaster
    (BuddyDev Team)
    Posts: 25394
    Brajesh Singh on in reply to: how to add shortcode to top of activity feed #14091

    Hi Peter,
    I am not sure how you want it now and it will help if you can write exactly the way you want the shortcode.

    The earlier was to make it like ‘user-name-story’ e.g. peterfae-story.

  • Keymaster
    (BuddyDev Team)
    Posts: 25394

    Hi Peter,
    What you need is save the date with the update. It is feasible but at the moment, there is no available UI that allows it.

    The way I see it is you will add a date/time picker on the activity update screen and then save the date with the activity instead of the current date/time.

    You will need to implement it as a custom solution as there is no such UI available.

    Best Regards
    Brajesh

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