This topic has 17 replies, 3 voices, and was last updated 11 years by sv1aud.

  • Author
  • #2461
     sv1aud
    Participant

    Hello,

    Congratulations for your fantastic job with this theme.

    I’d like to match users by birthdate : not to match years only, but also day / month.
    The idea is to increase match score not only when year matches, but also when month matches, then day.

    What should I do ?

    Thanks in advance for your support.

    #2601
     SQadmin
    Keymaster

    Hi and thank you,
    You could create three fields from Users -> Profile fields to be the year, month, day and then add them to the search form from Sweetdate -> Buddypress. Would that suite your needs?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2619
     sv1aud
    Participant

    Thanks, that’s what I started to do, but then I realized it doesn’t work if people registered their birthdate (using their profile birthdate field).

    Would it be easy to hook up a function in the child theme that use the 3 fields (month-day-year) to query the registered birthdate ?

    Thanks

    #2639
     SQadmin
    Keymaster

    So you should get rid of the birthday field and just use the 3 fields. Where you need to show birth date for this query?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2664
     sv1aud
    Participant

    I’d like to show it on the user profile page, just like it’s displayed now. In this case the birthdate would be displayed in 3 lines… Could I show it like a “regular” date ?

    Thanks again for your help

    #2700
     SQadmin
    Keymaster

    Hi,
    It requires some code change but it can be done. You can give me some credentials to ftp or tell me the name of each field for the birthday so I can give you the code to add.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2728
     sv1aud
    Participant

    Ok, I’ll send you all the details now, thanks !

    #2753
     moonpick
    Participant

    I’d like to use this also. I’ve tried the “date picker” from profile fields, however it doesn’t show up as an option under “numerical fields” or “matching fields,” only “age range fields” which doesn’t work correctly. I’d like something similar to the car-sharing theme, but matching people based on when (date) they are travelling to a country. Is this possible? Any help is much appreciated, thanks again for all the help!

    #2878
     moonpick
    Participant

    Bump

    #2929
     SQadmin
    Keymaster

    Here is the solution. Add the following code to sweetdate-child/functions.php and modify the field names if they are different: http://d.pr/n/OZiN

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2955
     sv1aud
    Participant

    Great support, it works fine.

    Thanks again for your help and keep up the good work.

    #3028
     moonpick
    Participant

    Thank you very much for the support, I appreciate it. However, I still can’t figure this out. I followed your instructions, copied the code to sweetdate-child/functions.php and the date selector still won’t show up. I simply want to show the date selector on the form on the homepage. It looks like the code you provided was for three separate fields. Is it not possible to have a date selector? Thanks again..

    #3051
     SQadmin
    Keymaster

    Yes the code was made to match @sv1aud need where he had 3 separate fields for the date.
    We will see if we can do something to render the normal date field

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3111
     sv1aud
    Participant

    Hello

    just to come back to my initial request, since you solved my birthdate display problem 😉

    I wanted to match users by birthdate. I added the following code to sweetdate-child/functions.php but the matching score stats to “1”, what’s wrong ?

    COPY CODE
    
    add_action('after_setup_theme','kleo_my_match');
    function kleo_my_match() {
      global $kleo_config;
      $kleo_config['matching_fields']['starting_score'] = 1;
      $kleo_config['matching_fields']['single_value'] = array ( 
        'Day of Birth' => 20,
        'Month of Birth' => 30,
        'Year of Birth' => 30,
        'Country' => 10, 
        'City' => 10
      ); 
    }
    

    Thanks !

    #3130
     SQadmin
    Keymaster

    Hi,
    You need to put the name of the fields exactly how you see them in Users-> Profile fields(the initial language they are added into).
    Users need to have matching dates to increase the percentage.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3141
     sv1aud
    Participant

    I’m missing something here.

    I’ve tried with the exact field names or the translated ones, but I’m still stucked to 1.
    The dates or values are matching when I’m testing.

    Something wrong with the code ?

    #3142
     SQadmin
    Keymaster

    I think I know what is it about. Original matching system looks for the sex of the members first and if they are not compatible no longer searches. So please add this function to your sweetdate-child/functions.php file and it no longer check for the sex of the members:
    http://d.pr/n/NWaY

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3144
     sv1aud
    Participant

    Exactly, now it works !

    Thanks a lot.

Viewing 18 posts - 1 through 18 (of 18 total)

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?