-
Author
-
September 8, 2013 at 21:40 #2461
sv1aud
ParticipantHello,
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.
September 10, 2013 at 17:01 #2601SQadmin
KeymasterHi 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 solutionSeptember 10, 2013 at 20:59 #2619sv1aud
ParticipantThanks, 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
September 11, 2013 at 14:48 #2639SQadmin
KeymasterSo 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 solutionSeptember 11, 2013 at 21:09 #2664sv1aud
ParticipantI’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
September 12, 2013 at 12:16 #2700SQadmin
KeymasterHi,
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 solutionSeptember 13, 2013 at 00:39 #2753moonpick
ParticipantI’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!
September 16, 2013 at 23:21 #2929SQadmin
KeymasterHere 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 solutionSeptember 17, 2013 at 09:36 #2955sv1aud
ParticipantGreat support, it works fine.
Thanks again for your help and keep up the good work.
September 18, 2013 at 03:56 #3028moonpick
ParticipantThank 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..
September 18, 2013 at 16:11 #3051SQadmin
KeymasterYes 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 fieldHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 20, 2013 at 11:38 #3111sv1aud
ParticipantHello
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 CODEadd_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 !
September 20, 2013 at 23:51 #3130SQadmin
KeymasterHi,
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 solutionSeptember 21, 2013 at 01:02 #3141sv1aud
ParticipantI’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 ?
September 21, 2013 at 01:25 #3142SQadmin
KeymasterI 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/NWaYHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.