This topic has 91 replies, 17 voices, and was last updated 10 years by ofcentral.

  • Author
  • #2177
     RonP
    Participant

    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.

    #2254
     SQadmin
    Keymaster

    Hi,
    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 solution
    #2298
     RonP
    Participant

    So 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 you

    #2304
     RonP
    Participant

    I 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
    );

    #2306
     RonP
    Participant

    And considering the default profile fields that have been filled out aren’t working either. I have to ask is this working for anyone else ?

    #2315
     RonP
    Participant

    I 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

    #2322
     RonP
    Participant

    I 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%%/

    #2328
     SQadmin
    Keymaster

    Regarding the matching arrays this is how your code should have looked after my example:

    COPY 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 ( 
        '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 solution
    #2329
     SQadmin
    Keymaster

    Do 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 solution
    #2330
     SQadmin
    Keymaster

    What 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 solution
    #2331
     SQadmin
    Keymaster

    Hi, 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 solution
    #2340
     RonP
    Participant

    Matching calculation works for membership level 1 but no other membership levels.

    #2344
     SQadmin
    Keymaster

    Have 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 else

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

    I’ll stay late and try your plugin again.

    #2348
     SQadmin
    Keymaster

    By 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 solution
    #2351
     RonP
    Participant

    Not calculating. I am using the next profile navigation in the top right

    #2352
     SQadmin
    Keymaster

    If 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 solution
    #3752
     Bri7265
    Participant

    How do I activate the matching system and where is it?

    Sorry I’m new at this.

    Arte

    #3753
     RonP
    Participant

    If you are customizing match, enable sweetdate child theme. And add a functions.php from main theme and edit the fields in xprofile.

    #3767
     SQadmin
    Keymaster

    Hi, 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 solution
    #3825
     osamabinmladen
    Participant

    1. 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.net

    #3857
     SQadmin
    Keymaster

    Hi,
    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-gone

    Cheers

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

    I 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,

    );
    }

    #5280
     SQadmin
    Keymaster

    Hi,
    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 solution
    #5292
     hughm
    Participant

    Thanks 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!

    #5303
     hughm
    Participant

    I 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;
    }

    #5319
     SQadmin
    Keymaster

    Hi,
    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 solution
    #5351
     hughm
    Participant

    Thanks. 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!!

    #5391
     SQadmin
    Keymaster

    Great. 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 solution
    #5511
     Bri7265
    Participant

    Im sorry about this question How do I add A sign up page? with a free trial so I can test the matching system?

    Brian

    #5532
     SQadmin
    Keymaster

    Hi, See the tutorial on initial setup: https://archived.seventhqueen.com/video-tutorials
    Match the registration page in Settings – Buddypress – Pages

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

    i 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?

    #5830
     SQadmin
    Keymaster

    You 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 solution
    #5840
     JohnDoe
    Participant

    When 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 (

    #8018
     airsidworld
    Participant

    Hi,
    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).

    #8050
     topdog
    Participant

    How 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.

    #8101
     Abe
    Keymaster

    Hi, 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.

    #8102
     Abe
    Keymaster

    Hi, 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.

    #8138
     topdog
    Participant

    I’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?

    #8177
     Abe
    Keymaster

    For 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 fields

    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.

Viewing 40 posts - 1 through 40 (of 92 total)

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

Log in with your credentials

Forgot your details?