-
Author
-
December 19, 2013 at 16:54 #8563matbcnParticipant
Hi, it seems no matter what fields I chose in Buddypress–>Search form customization the Compatability match on the members profile always show 50%
I also tried adding the function (from another tread here in the forum) below to my sweetdate-child’s function.php and even changing the percentages there did not have any effect.
function kleo_my_match() {
global $kleo_config;
$kleo_config[‘matching_fields’][‘starting_score’] = 1;
//If we want to match by members sex. values: 0|1
$kleo_config[‘matching_fields’][‘sex_match’] = 1;
//required for initial match. If the sex preference matches it will continue to the specified fields below
$kleo_config[‘matching_fields’][‘sex’] = ‘I am a’;
$kleo_config[‘matching_fields’][‘looking_for’] = ‘Looking for a’;
//sex percentage
$kleo_config[‘matching_fields’][‘sex_percentage’] = 49;
//single value fields like select, textbox,radio
$kleo_config[‘matching_fields’][‘single_value’] = array (
‘Marital status’ => 20,
‘Country’ => 5,
‘City’ => 5
);
//multiple values fields like multiple select or checkbox
$kleo_config[‘matching_fields’][‘multiple_values’] = array (
‘Interests’ => 10,
‘Looking for’ => 10,
);
}Any idea, what I might be missing?
Thanks in advance!
mat
December 20, 2013 at 16:45 #8624AbeKeymasterif it is set to 50 from the code means that it matches only sex preference and not the other fields like
‘Marital status’ => 20,
‘Country’ => 5,
‘City’ => 5
‘Interests’ => 10,
‘Looking for’ => 10,probably they don’t have the same preference
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.December 22, 2013 at 13:05 #8669matbcnParticipantThanks for the reply!
In the meantime I found out I was missing the line on topadd_action(‘after_setup_theme’,’kleo_my_match’);
in my code.
However, I have another question regarding compatibility matching:
I found out that the percentages of the multiple values fields (like multiple select or checkbox) only are added, if ALL SELECTIONS are identical.
I would like to change it in that way that only ONE SELECTION needs to be identical in order for the percentage to be added to the overall match percentage.
Basically change the formula from AND to AND/OR, I guess.
Is that possible?
Thanks!
December 23, 2013 at 14:04 #8717AbeKeymasterBy default it will increase for each matched value from the multiple values
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.February 21, 2014 at 05:43 #11251oneder22ParticipantI’m also seeing the same results as matbcn. The match score only increases if there is an identical match for checkboxes, multi-select and text boxes.
Is there a fix so the match score will increase even if it’s not an identical match for all multiple selections? Like matbcn said, changing the formula from AND to AND/OR would be perfect.
February 21, 2014 at 22:46 #11270AbeKeymasterHi, That is the way is should work for multiple fields, to increase with each matching field
For single fields it increases if it finds the same fieldHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.February 21, 2014 at 22:46 #11271AbeKeymasterThis topic shows how to change what fields affects matching: https://archived.seventhqueen.com/forums/topic/match-numbers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.February 21, 2014 at 23:06 #11272oneder22ParticipantHey Abe, thanks for the response. I’ve generated my code from the link you sent, but it’s still not functioning properly with multiple fields. Here’s my code in functions.php:
add_action(‘after_setup_theme’,’kleo_my_match’);
function kleo_my_match() {
global $kleo_config;
$kleo_config[‘matching_fields’][‘starting_score’] = 25;
$kleo_config[‘matching_fields’][‘sex_match’] = 0;
//single value fields like select, textbox,radio
$kleo_config[‘matching_fields’][‘single_value’] = array (
‘Country’ => 10,
‘State’ => 20,
‘City’ => 30,
‘Province’ => 20,
‘Other Interests’ => 5,
‘Relationship Status’ => 5,
‘Ethnicity’ => 5,
‘Religious Views’ => 5
);
//multiple values fields like multiple select or checkbox
$kleo_config[‘matching_fields’][‘multiple_values’] = array (
‘Interested In’ => 15,
‘Interests’ => 10,
‘Hobby/Hobbies’ => 30
);
}Do you see anything wrong with the code?
February 25, 2014 at 00:48 #11375AbeKeymasterHi, I guess you are right. It increases just one time even though multiple are found. Please update this file content wp-content\themes\sweetdate\custom_buddypress\bp-functions.php from this one: https://archived.seventhqueen.com/files/bp-functions.txt
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.March 21, 2014 at 01:59 #13126metalmickParticipantHi,
Can you confirm that file content above was included in this weeks theme update? Or should I do the same as suggested above?March 23, 2014 at 01:54 #13269AbeKeymasterYes it was included in 2.5 update
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.March 25, 2014 at 22:47 #13488BottossoParticipantHi All
How it’s works if the $kleo_config[‘matching_fields’][‘looking_for’] is a array?
For example: I have a field called Gender (Checkbox) there, the user can choose if they are looking for (Man, Female, Couples, bla bla bla), if the user choose (Female and Couples) will it work? If not how I can solve it?
Many Thanks
March 29, 2014 at 01:50 #13730AbeKeymasteryes it will work for multiple value fields. You add it in this example array:
$kleo_config[‘matching_fields’][‘multiple_values’] = array (
‘Interested In’ => 15,
‘Interests’ => 10,
‘Hobby/Hobbies’ => 30
);Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.