Jump to content
TNG Community

Add '1st' cousin in Relationship calculator


DelG

Recommended Posts

re: Martha Ann C KNAPP is the cousin 5 times removed of Living

We TNG users understand the omission means 1st cousin but the typical website user will not. And, the phrase "1st cousin" is a typical, usual, and widespread term in family discussions and it should be present in TNG.

Link to comment
Share on other sites

Del,

I second that motion. Shouldn't be a difficult change for Darrin's Relationship Chart/Calculator, or Chris's Relate Mod, or Jeff's  Relationship Display Mod, all of which, only specify "the cousin of" for a first cousin.   In our circles, calling someone a 'cousin' is a bit vague,..whereas 'first cousin' becomes  significant to folks.  A sneak peak at some code in ajx_relate.php looked to be a bit over my head to sift through.

Ron

 

Link to comment
Share on other sites

  • 1 month later...

Since it was originally coded to say only "cousin" rather than "1 x cousin" it may have been done this way as a matter of preference.

To change it to suit your preference, the simple fix is:

1) Open the 'relationship.php' file in a file editor.   You may choose to make a backup copy of this file beforehand if you like.

2) Search for the string: $cousins >

   The search will find this line of code: $cousinmsg = $cousins > 1 ? "$cousins x" : "";

3) Change the 1 to 0 (the number zero) and save the file change.

Now the response in the relationship calculator will show "is the 1 x cousin of".

David

Link to comment
Share on other sites

For the moment ignoring the language setup, this can be taken a step further to change the '1 x cousin', '2 x cousin', etc to '1st cousin', '2nd cousin' , etc with a few more statements after David's suggested line:

                $cousinmsg = $cousins > 0 ? "$cousins x" : "";

add statements like these:

               if ($cousinmsg == "1 x")  $cousinmsg = "1st";
               if ($cousinmsg == "2 x")  $cousinmsg = "2nd";
               if ($cousinmsg == "3 x")  $cousinmsg = "3rd";
               if ($cousinmsg == "4 x")  $cousinmsg = "4th";   

Of course could be first, second, etc, based on personal preference, and the languages could be setup.

Will put into my personal mod.

Ron

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...