0 Members and 1 Guest are viewing this topic.

*

R D

  • *
  • 6
  • osDate Version: osDateEvo v1.2
Couples Mod v1 removes muilt accounts on login
« on: February 15, 2018, 11:52:00 PM »
Does anyone know of or have a registration  for couples so that a couple can register only once (1X)  as a couple? Currently with Evo the couple has to register as two singles (2x) and the two singles profile remain on and are searchable. Then after the 2 singles you have to register as a couple or 3 registrations total.

Or if anyone has the older code where this used to work (as mentioned in another forum) or knows anything it would be helpful...

Or even a good work around would be great.

Many thanks


*

Pharg

  • *****
  • 3,074
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Couples Mod v1 removes muilt accounts on login
« Reply #1 on: February 16, 2018, 03:54:51 AM »
Hi R D and Members,

So after being asked if there was a way to change the couples login and have been thinking of doing the same thing
for many years but kept putting it aside to fix other issues.

I have removed the couples complicated login needing you to have 2 exciting accounts before you can create a couples account.

Now it's as easy as signing up for a normal account, now you can create one account for a couple no other accounts needed.

Just upload all the files in the Couples mod v1 and that's it.  ;)
« Last Edit: February 20, 2018, 09:27:36 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

R D

  • *
  • 6
  • osDate Version: osDateEvo v1.2
Re: Couples Mod v1 removes muilt accounts on login
« Reply #2 on: February 16, 2018, 05:25:57 PM »
Hi Pharg

Many thanks for your quick response on this.. will give it a go...

R D
« Last Edit: February 20, 2018, 09:28:14 AM by Pharg »

*

R D

  • *
  • 6
  • osDate Version: osDateEvo v1.2
Re: Couples Mod v1 removes muilt accounts on login
« Reply #3 on: February 20, 2018, 03:33:07 AM »
Installed the registration for couples as above. The registrations works well but only allows input for one of the male (or female) but not both. Tried to make extra questions in admin so both male and female could answer and this works but is time consuming and a bit redundant.

Once the questions were added with admin the search feature does not work... (assuming the search is set up for singles only ???).

Has anyone crossed this bridge before and resolved?

Or had a work around discovered?

Many thanks...




*

Pharg

  • *****
  • 3,074
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Couples Mod v1 removes muilt accounts on login
« Reply #4 on: February 20, 2018, 09:11:51 AM »
Hi R D,

Moved your question here, since it's about the same subject!

More details here: https://www.osdateforum.com/general-osdate-help/drop-down-menu-additions/

It does say to add it to both the $lang['signup_gender_look'] And the $lang['search_genders']

Did you add all the genders for the search also so they can be found by the script?

I am betting you didn't add them to the search as $lang['search_genders'] yet  :D

Quote
Once the questions were added with admin the search feature does not work... (assuming the search is set up for singles only ??)

What in the search stops working?? ( Advanced Search Profile Search even shows the new questions and more )

The search works in more than just singles, couples and groups plus more!!

Add a screenshot so I can see what it's not doing or is doing please?
« Last Edit: February 20, 2018, 09:52:28 AM by Pharg »
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35

*

Pharg

  • *****
  • 3,074
    • OsDateFourm
  • osDate Version: osDateEvo v1.3
Re: Couples Mod v1 removes muilt accounts on login
« Reply #5 on: February 20, 2018, 11:24:07 PM »
Here is a further detailed info for adding more Gender to the system.

The search parts seemed to have been missed.

As they can't all be the same, each one would have to have a different letter for it to work.
Example: Couple would be C Couple MF would be K and so on

   'M' => 'Male',
   'F' => 'Female',
   'C'=> 'Couple',
   'K' => 'Couple MF',
   'L' => 'Couple FF',
   'H' => 'Couple MM'

First edit the lang_main.php file.
Find the string $lang['signup_gender_values']

These would now be:
Code: [Select]
$lang['signup_gender_values'] = array(
'M' => 'Man',
'F' => 'Woman',
'C' => 'Couple',
        'K' => 'Couple MF',
        'L' => 'Couple FF',
        'H' => 'Couple MM',
'G' => 'Group'
);
Code: [Select]
$lang['signup_gender_look'] = array(
'M' => 'Man',
'F' => 'Woman',
'C' => 'Couple',
        'K' => 'Couple MF',
        'L' => 'Couple FF',
        'H' => 'Couple MM',
'G' => 'Group',
'B' => 'Man or Woman',
'A' => 'Any Gender'
);
Now ad the same to the search.
Code: [Select]
$lang['search_genders'] = array(
'M' => 'Men',
'F' => 'Women',
'C' => 'Couples',
        'K' => 'Couple MF',
        'L' => 'Couple FF',
        'H' => 'Couple MM',
'G' => 'Groups'
);


Once you have done the changes above, you must go to the admin Manage Languages find the language your editing and select it, in our case it's English Now you need to load it again so the changes show in the Database and in the site.


Moving on to Next step:

Now in the init.php you also need all the new Couples.

Code: [Select]
$t->assign( 'gents', $row['gents'] );

$t->assign( 'females', $row['females'] );

$t->assign( 'couples', $row['couples'] );

$t->assign( 'fcouples', $row['fcouples'] );

$t->assign( 'hcouples', $row['hcouples'] );

One thing that is missed in that post is you need to change the searchmatch.php.
Find this:
Code: [Select]
if (isset($_REQUEST['txtlookgender']) && $_REQUEST['txtlookgender'] == 'A') {
$gender_search .= "'M','F','C'";
} elseif ( isset($_REQUEST['txtlookgender']) && $_REQUEST['txtlookgender'] == 'B') {
$gender_search .= "'M','F'";
} else {
$gender_search .= "'".(isset($_REQUEST['txtlookgender'])?$_REQUEST['txtlookgender']:'A')."'";
}
$gender_search .= ") ";

Change to:
Code: [Select]
if (isset($_REQUEST['txtlookgender']) && $_REQUEST['txtlookgender'] == 'A') {
$gender_search .= "'M','F','C','K', 'L', 'H'";
} elseif ( isset($_REQUEST['txtlookgender']) && $_REQUEST['txtlookgender'] == 'B') {
$gender_search .= "'M','F','K', 'L', 'H'";
} else {
$gender_search .= "'".(isset($_REQUEST['txtlookgender'])?$_REQUEST['txtlookgender']:'A')."'";
}
$gender_search .= ") ";

In advsearch.php find this:
Code: [Select]
/* Bypass cross matching in search if set in global settings or the lookgender is not accepted */
if ( ($config['bypass_search_lookgender'] == 'N' or $config['bypass_search_lookgender'] == '0' ) and ( $config['accept_lookgender'] == 'Y' or $config['accept_lookgender'] == '1') ) {

$txtgender_search = "and (user.lookgender = 'A' or (user.lookgender = 'B' and '".$usergender."' in ('M','F') ) or user.lookgender = '".$usergender."') ";

$sqlselect .= $txtgender_search;
}

Change to this:
Code: [Select]
/* Bypass cross matching in search if set in global settings or the lookgender is not accepted */
if ( ($config['bypass_search_lookgender'] == 'N' or $config['bypass_search_lookgender'] == '0' ) and ( $config['accept_lookgender'] == 'Y' or $config['accept_lookgender'] == '1') ) {

$txtgender_search = "and (user.lookgender = 'A' or (user.lookgender = 'B' and '".$usergender."' in ('M','F','K', 'L', 'H') ) or user.lookgender = '".$usergender."') ";

$sqlselect .= $txtgender_search;
}

Don't forget to add this to the getsnap.php files, Admins getsnap.php included.
Code: [Select]
   if ($gender == 'M') {
      $nopic = SKIN_IMAGES_DIR.'male.jpg';
   } elseif ($gender == 'F') {
      $nopic = SKIN_IMAGES_DIR.'female.jpg';
   } elseif ($gender == 'K') {
      $nopic = SKIN_IMAGES_DIR.'couple.jpg';
   } elseif ($gender == 'L') {
      $nopic = SKIN_IMAGES_DIR.'coupleff.jpg';
   } elseif ($gender == 'H') {
      $nopic = SKIN_IMAGES_DIR.'couplemm.jpg';
   }

And find pictures to assign to them all.

This should fix all the issues you might have now.
Regards,
Pharg ( Phill )

REMEMBER: ALWAYS BACKUP BEFORE YOU MAKE ANY CHANGES!!

osDateEvo v1.3 | PHP: 5.3.42 & PHP: 7.1.15 | MySQL: 5.5.35