-
Author
-
September 3, 2013 at 16:47 #2177RonPParticipant
Match number. As I add sample users I am adding like wise answers to their profiles and nothing is happening with the match meter.
How do I look into its properties and adding new profiles fields to it.
September 4, 2013 at 20:54 #2254SQadminKeymasterHi,
To change the fields that affects the matching system you need to override the default options.
To change those fields you need to add a code to sweetdate-child/functions.php and modify it to match your needs like this:COPY CODE//change matching system add_action('after_setup_theme','kleo_my_match'); 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, ); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 5, 2013 at 13:35 #2298RonPParticipantSo I have changed my site for friends. Do I assume that I comment these lines out to remove
//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;And I have these single value boxes in my profile fields Profession, Annual Income, Education, Political Views, Religion, Weight Type, Ethnicity Do I add them like so ?
//single value fields like select, textbox,radio
$kleo_config['matching_fields']['single_value'] = array (
'Marital status' => 5,
'Country' => 5,
'City' => 5,
'Profession' => 10,
'Annual Income' => 10,
'Education' => 10,
'Political Views' =>5,
'Religion' => 20,
'Weight Type' => 5,
'Ethnicity' => 15,
);And for checkbox items I use this, this way ?
//multiple values fields like multiple select or checkbox
$kleo_config['matching_fields']['multiple_values'] = array (
'Interests' => 10,
'Looking for' => 10,
'Smoking, Drinking & Drugs' => 10,
'Second Language' => 20,
);
}And this code is introduced to the functions.php file ? I didn’t find this code in there.
Thank youSeptember 5, 2013 at 13:52 #2304RonPParticipantI got it to not show any errors by adding it this way, but it isn’t working for me. Just like the hearts thing. Can’t get rid of them. Is this a cache issue? And where do you clear cache on this word press thing.
//single value fields like select, textbox,radio
$kleo_config[‘matching_fields’][‘single_value’] = array (
‘Marital status’ => 20,
‘Country’ => 5,
‘City’ => 5,
‘Profession’ => 10,
‘Annual Income’ => 10,
‘Education’ => 10,
‘Political Views’ =>5,
‘Religion’ => 20,
‘Weight Type’ => 5,
‘Ethnicity’ => 15
);
//multiple values fields like multiple select or checkbox
$kleo_config[‘matching_fields’][‘multiple_values’] = array (
‘Interests’ => 10,
‘Looking for’ => 10,
‘Smoking, Drinking & Drugs’ => 10,
‘Second Language’ => 20
);September 5, 2013 at 13:56 #2306RonPParticipantAnd considering the default profile fields that have been filled out aren’t working either. I have to ask is this working for anyone else ?
September 5, 2013 at 18:29 #2315RonPParticipantI see you replied to a post like this and I will post it here with questions.
I have a friend site. Men look for men automatically and it would be inappropriate for the action to be shown.
The matching numbers still dont work.
Hi,
For the search to work you need to enable matching field from Sweetdate -> Buddypress. You should match “I am a” and “Looking for”(your translated ones).If you have translated you fields then you need to change the kleo_status_icon shortcodes from the homepage to match your translated ones:
[kleo_status_icon type=”Translated Man” image=”http://seventhqueen.com/demo/sweetdatewp/wp-content/uploads/2013/06/apple-touch-icon.png” subtitle=”Man online”]
Change the name under the type attribute with your translated one
September 5, 2013 at 19:13 #2322RonPParticipantI need s2member membership plugin to be added to the kleo config matching fields.
Free user level 0 works with matching, but levels 1 thru 4 do not.
I know you spent a lot of time on the integration of the other membership and I apologize for not working with it. But I have a deadline and unique requirements.
Anyone reading this. Sweetdate doesn’t have any problems with this plugin past the matching.
Only changes that need to be made to a default instal of s2 is add this line to you welcome page login instead of creating a page /members/%%current_user_login%%/September 5, 2013 at 19:56 #2328SQadminKeymasterRegarding the matching arrays this is how your code should have looked after my example:
COPY CODEadd_action('after_setup_theme','kleo_my_match'); function kleo_my_match() { global $kleo_config; $kleo_config['matching_fields']['starting_score'] = 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, 'Profession' => 10, 'Annual Income' => 10, 'Education' => 10, 'Political Views' =>5, 'Religion' => 20, 'Weight Type' => 5, 'Ethnicity' => 15 ); //multiple values fields like multiple select or checkbox $kleo_config['matching_fields']['multiple_values'] = array ( 'Interests' => 10, 'Looking for' => 10, 'Smoking, Drinking & Drugs' => 10, 'Second Language' => 20 ); }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 5, 2013 at 19:58 #2329SQadminKeymasterDo you have a Sex field in you users profile?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 5, 2013 at 19:59 #2330SQadminKeymasterWhat exactly you want to achieve with s2 and the matching ?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 5, 2013 at 20:01 #2331SQadminKeymasterHi, To remove those hearts just add this simple css to Sweetdate -> Styling options -> Quick css box:
.circular-item .hearts {background:none;}Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 5, 2013 at 20:42 #2340RonPParticipantMatching calculation works for membership level 1 but no other membership levels.
September 5, 2013 at 21:08 #2344SQadminKeymasterHave you tried for example with 2 users being level 1 and then making them level 2?
Just saying maybe the user with higher level doesn;t have profile fields completed or something elseHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 5, 2013 at 21:20 #2348SQadminKeymasterBy not working you mean is not appearing or is not calculating anything because when you are viewing your own profile it won’t show?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionSeptember 5, 2013 at 21:47 #2351RonPParticipantNot calculating. I am using the next profile navigation in the top right
September 5, 2013 at 21:57 #2352SQadminKeymasterIf is not calculating then it has nothing to do with S2member. It has to do with the fact that users that are involved in the match(logged in user and the profile you are viewing) don’t have profile fields completed so the match should work or they are completely incompatible(man looking for man when I was looking for a woman for example)
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 2, 2013 at 21:31 #3752Bri7265ParticipantHow do I activate the matching system and where is it?
Sorry I’m new at this.
Arte
October 2, 2013 at 21:36 #3753RonPParticipantIf you are customizing match, enable sweetdate child theme. And add a functions.php from main theme and edit the fields in xprofile.
October 3, 2013 at 03:25 #3767SQadminKeymasterHi, Matching is enabled by default and shows when you are logged in and viewing somebody else profile
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 4, 2013 at 02:20 #3825osamabinmladenParticipant1. How to remove compatibility match with the site?
2. How to remove the circles with the heart of the pictures on caroseul?
3. Why we are not showing “Create my account” button within the “Sign Up” popup window?
Thanks in advance.
http://www.naucime.netOctober 5, 2013 at 00:44 #3857SQadminKeymasterHi,
For 1, 2 see this https://archived.seventhqueen.com/forums/topic/removereplace-the-love-hearts-in-site
for 3 see https://archived.seventhqueen.com/forums/topic/register-button-goneCheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 28, 2013 at 06:16 #5239hughmParticipantI have added the profile matching code to my functions.php file in my child theme. The single value fields that I am using (Country, City, Home State) are working.
The multiple value fields however are not registering. I am using “Interests” and “Looking for” but getting no point values to show in the match.
If a member selects multiple interests, does each match count or does the member have to be an exact match of all items in order for the value to count.
Here is my code:
add_action('after_setup_theme','kleo_my_match');
function kleo_my_match() {
global $kleo_config;
$kleo_config['matching_fields']['starting_score'] = 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 (
'Relationship status' => 5,
'Country' => 5,
'City' => 8,
'Home State' => 6,);
//multiple values fields like multiple select or checkbox
$kleo_config['matching_fields']['multiple_values'] = array (
'Interests' => 1,
'Looking for' => 3,);
}October 28, 2013 at 17:15 #5280SQadminKeymasterHi,
Each multiple value should add the specific percentage specified.
I just tested it and works. Also if members are not compatible by sex the fields won’t count
//If we want to match by members sex. values: 0|1
$kleo_config[‘matching_fields’][‘sex_match’] = 1;Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 28, 2013 at 20:24 #5292hughmParticipantThanks for your help. I ended up making the fields drop down questions and it works perfectly.
I have an additional questions. If one of my members is seeking the same sex, the matching doesn’t quite work. For example, if a woman is looking for a woman, then the men still appear as at least a 50% match. If there is another woman seeking a woman she will also appear as at least a 50% match.
Is there a way to lower the percentage score for the opposite gender when a member is seeking the same sex match? So that if a woman is seeking a woman and a man’s profile displays her match will be something like 25% rather than 50%+.
Thanks!October 29, 2013 at 03:59 #5303hughmParticipantI found the code for user percentage matching in sweetdate/custom_buddypress/bp-functions.php. I added a few lines to try and correctly match same gender preference users. If a woman is seeking a woman or a man is seeking a man they should also be given 49% points. I tested it and it doesn’t work but I think it is on the right track.
//Sex match
if ((isset($kleo_config['matching_fields']['sex_match']) && $kleo_config['matching_fields']['sex_match'] == '1')
|| !isset($kleo_config['matching_fields']['sex_match']) )
{
$field1_u1 = xprofile_get_field_data($kleo_config['matching_fields']['sex'], $userid1);
$field1_u2 = xprofile_get_field_data($kleo_config['matching_fields']['looking_for'], $userid2);
$field2_u2 = xprofile_get_field_data($kleo_config['matching_fields']['sex'], $userid2);
$field2_u1 = xprofile_get_field_data($kleo_config['matching_fields']['looking_for'], $userid1);
if ( $field1_u1 == $field1_u2 ) && ( $field2_u2 == $field2_u1 )
$score += $kleo_config['matching_fields']['sex_percentage'];
else
return $score;
}
October 29, 2013 at 11:51 #5319SQadminKeymasterHi,
You are right. Here is the code with the fix to match on both user preferences:COPY CODE//Sex match if ((isset($kleo_config['matching_fields']['sex_match']) && $kleo_config['matching_fields']['sex_match'] == '1') || !isset($kleo_config['matching_fields']['sex_match']) ) { $field1_u1 = xprofile_get_field_data($kleo_config['matching_fields']['sex'], $userid1); $field12_u1 = xprofile_get_field_data($kleo_config['matching_fields']['looking_for'], $userid1); $field1_u2 = xprofile_get_field_data($kleo_config['matching_fields']['sex'], $userid2); $field12_u2 = xprofile_get_field_data($kleo_config['matching_fields']['looking_for'], $userid2); if ( $field1_u1 == $field12_u2 && $field12_u1 == $field1_u2 ) { $score += $kleo_config['matching_fields']['sex_percentage']; } //if no sex match, return the score else { return $score; } }
here is the code if you want the script not to stop if the sex preferences does not match
COPY CODE//Sex match if ((isset($kleo_config['matching_fields']['sex_match']) && $kleo_config['matching_fields']['sex_match'] == '1') || !isset($kleo_config['matching_fields']['sex_match']) ) { $field1_u1 = xprofile_get_field_data($kleo_config['matching_fields']['sex'], $userid1); $field12_u1 = xprofile_get_field_data($kleo_config['matching_fields']['looking_for'], $userid1); $field1_u2 = xprofile_get_field_data($kleo_config['matching_fields']['sex'], $userid2); $field12_u2 = xprofile_get_field_data($kleo_config['matching_fields']['looking_for'], $userid2); if ( $field1_u1 == $field12_u2 && $field12_u1 == $field1_u2 ) { $score += $kleo_config['matching_fields']['sex_percentage']; } else { $score += 10; } }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 29, 2013 at 16:05 #5351hughmParticipantThanks. That is awesome! Works beautifully.
I am using the second set of code so that same gender preferences get points and no matching scores end up at 1%. Makes it more fun.
I appreciate the help. Really great!!October 30, 2013 at 14:12 #5391SQadminKeymasterGreat. Glad we could help!
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionOctober 31, 2013 at 22:51 #5511Bri7265ParticipantIm sorry about this question How do I add A sign up page? with a free trial so I can test the matching system?
Brian
November 1, 2013 at 11:22 #5532SQadminKeymasterHi, See the tutorial on initial setup: https://archived.seventhqueen.com/video-tutorials
Match the registration page in Settings – Buddypress – PagesHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 2, 2013 at 21:38 #5744JohnDoeParticipanti added a few new profile fields , and added it in the code , like this
function kleo_my_match() {
global $kleo_config;
$kleo_config['matching_fields']['starting_score'] = 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,
'Religion' => 20,
'You have Children?' => 5,
);
//multiple values fields like multiple select or checkbox
$kleo_config['matching_fields']['multiple_values'] = array (
'Interests' => 10,
'Looking for' => 10,
);
}
I tested this with a user , before my match was 80% , now it’s still 80%
so i guess it didn’t work?
November 4, 2013 at 13:00 #5830SQadminKeymasterYou haven’t added:
add_action(‘after_setup_theme’,’kleo_my_match’);Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionNovember 4, 2013 at 13:53 #5840JohnDoeParticipantWhen i add the code again , it gives me an error after updating the file, and when i look for the error on the line it says, then it shows the line is empty..
However , in DreamWeaver it shows this line red to
$kleo_config[‘matching_fields’][‘multiple_values’] = array (
December 10, 2013 at 00:36 #8018airsidworldParticipantHi,
I’ve been looking for a topic about the following issue:
how can i have the following matching system:I’m “A or B or C”
Looking for “A or/and B or/and C or ALL”Looking for contains a category ALL which means the user is interested in all 3 categories (A, B and C) but the user can also interested in 2 of them (A and C for example) or just 1 category (B for example).
December 10, 2013 at 09:39 #8050topdogParticipantHow do I customize the code for non-dating sites?
Example: instead of “I am a” being Male or Female, it would be Teacher, Student, Teaching Assistant, Administrator and the “I’m looking for” would be the same categories.
Also, is it possible for either variable to have more than on choice.
Example: “I am a” Student and a Teaching Assistant and “I’m looking for” a Teacher or an Administrator.
December 11, 2013 at 13:43 #8101AbeKeymasterHi, You cannot do it like that with an ALL option. They should be done with a multiselect field but you cannot add the field as a Matching fields to match the sex field. That functionality should be extended somehow by you or leave just the Preference field where people can choose from and select multiple options but the will search in people preference and not their own. Hope you understand what I said
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 11, 2013 at 13:44 #8102AbeKeymasterHi, All fields are customizable from WP admin – Users – Profile fields and you can change them to match your needs.
cheers
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 12, 2013 at 09:58 #8138topdogParticipantI’m guess I wasn’t clear with my question. I know how to customize the profile fields but my question was related to the matching score since in the example above I won’t be matching my sex.
If I match by Teacher to Student instead of Male to Female do I have to change all the variables in your code listed above from ‘sex’ to ‘teacher’ for the matching score to work? If so, where should all these changes be made. From the above I see it’s the child theme functions.php and custom_buddypress/bp-functions.php. Are there any other files that need to be corrected?
December 13, 2013 at 02:35 #8177AbeKeymasterFor the matching score to work you need to change the name of your new fields in the code above: https://archived.seventhqueen.com/forums/topic/match-numbers#reply-2254
Changing those fields should work
$kleo_config[‘matching_fields’][‘sex’] = ‘I am a’;
$kleo_config[‘matching_fields’][‘looking_for’] = ‘Looking for a’;or disable sex matching with:
$kleo_config[‘matching_fields’][‘sex_match’] = 0;
and set the normal fieldsHi 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.