Jump to content
TNG Community
Sign in to follow this  
Sylvia

Changing labels on getperson page?

Recommended Posts

Sylvia

Is it possible to change the row labels on the getperson page?

The left hand side of the getperson page has various labels: Birth, Gender, Person ID, Father, Mother, Family etc

What I would like to do is to change the label "family" to read "spouse/partner"

Is this possible and if so would some kind soul please give me really basic instructions as to how?

Sylvia

Share this post


Link to post
Share on other sites
arnold

Find the file named cust_text.php. It is in the English subdirectory. Enter the following:

$text[family] = "spouse/partner";

Then upload it again. Of course, make a copy of the original cust_text.php file.

This is what we use:

$text[family] = "Family / Spouse";

Share this post


Link to post
Share on other sites
Sylvia

Find the file named cust_text.php. It is in the English subdirectory. Enter the following:

$text[family] = "spouse/partner";

Then upload it again. Of course, make a copy of the original cust_text.php file.

This is what we use:

$text[family] = "Family / Spouse";

Wow Arnold, Thanks for such a quick reply. That was easier than I had expected and worked a treat.

Best wishes

Sylvia

Share this post


Link to post
Share on other sites
Premo

Hi Arnold

I would like to make this change to my website and have followed your instructions,

But I see no change from the currant text, 'Family'.

This is what is in my English/cust_text.php and I have TNG v6.0.4

<?php

//Put your own custom messages here, like this:

//$text[messagename] = "This is the message";

?>

Any help would be appreciated

Share this post


Link to post
Share on other sites
arnold

<?php

//Put your own custom messages here, like this:

//$text[messagename] = "This is the message";

?>

Change the above to:

<?php

//Put your own custom messages here, like this:

//$text[messagename] = "This is the message";

$text[family] = "ENTER THE TEXT HERE YOU WANT TO APPEAR IN LIEU OF FAMILY";

?>

You have to add the extra line of code you see above this paragraph. Then upload the file to your English sub-directory. Always remember to keep a copy of the original file!!!

Share this post


Link to post
Share on other sites
Premo

Change the above to:

<?php

//Put your own custom messages here, like this:

//$text[messagename] = "This is the message";

$text[family] = "ENTER THE TEXT HERE YOU WANT TO APPEAR IN LIEU OF FAMILY";

?>

You have to add the extra line of code you see above this paragraph. Then upload the file to your English sub-directory. Always remember to keep a copy of the original file!!!

OK Arnold, that’s sorted that out, it looks much better like this,

easy when you know how.

Thank you very much for your help.

David

Share this post


Link to post
Share on other sites
Premo

Change the above to:

<?php

//Put your own custom messages here, like this:

//$text[messagename] = "This is the message";

$text[family] = "ENTER THE TEXT HERE YOU WANT TO APPEAR IN LIEU OF FAMILY";

?>

You have to add the extra line of code you see above this paragraph. Then upload the file to your English sub-directory. Always remember to keep a copy of the original file!!!

Hi Arnold

This small but significant bit of code for getperson page as made the meta description look much better, when I view the source in my browser now I see the following;

<title>Pike Family Tree History Ancestry and Genealogy: Stanley Pike b.28 Oct 1911 4 Ashfield Terrace, Alfred st, Handsworth, Birmingham. d.2 Oct 2004 Woodgate Valley, Birmingham.</title>

<meta name="Keywords" content="Stanley Pike b.28 Oct 1911 4 Ashfield Terrace, Alfred st, Handsworth, Birmingham. d.2 Oct 2004 Woodgate Valley, Birmingham.">

Is it possible to make this work with my family/Group sheet view?

This is what I see at present;

<title>Pike Family Tree History Ancestry and Genealogy: Family Group Sheet for spouse/partner F2</title>

<meta name="Keywords" content="Family Group Sheet for spouse/partner F2">

Look forward to hearing your thoughts on this.

David

Share this post


Link to post
Share on other sites
arnold

Hi David,

What you are asking is beyond my meager talents. Someone else will have to jump in.

Arnold

Share this post


Link to post
Share on other sites
Ken Roy

Hi Arnold,

Are you aware that your change above http://www.tngforum.us/index.php?s=&sh...post&p=9032 also changes the text on the Family Group sheet where it does not read as well as on the Individual page?

I played around with trying to get the name of the persons who were married to display in the title and description by replacing the text in the tng_header in line 307, but unfortunately that information does not appear to have been obtained at that point in the code, so the best I could get was to display the person ID number which is sort of meaningly to a Google Search.

That is when I discovered that the code in line 307

tng_header( "$text[familygroupfor] $text[familyof] $familyID", $flags );
and line 311
    $namestr = "$text[familyof]: " . getFamilyName( $famrow );
would have to be changed at a minimum to add a new $text tag in your cust_text.php I have used
$text[familyof] = "Family"; 

in the code above

Share this post


Link to post
Share on other sites
Premo

Hi Arnold,

Are you aware that your change above http://www.tngforum.us/index.php?s=&sh...post&p=9032 also changes the text on the Family Group sheet where it does not read as well as on the Individual page?

I played around with trying to get the name of the persons who were married to display in the title and description by replacing the text in the tng_header in line 307, but unfortunately that information does not appear to have been obtained at that point in the code, so the best I could get was to display the person ID number which is sort of meaningly to a Google Search.

That is when I discovered that the code in line 307

tng_header( "$text[familygroupfor] $text[familyof] $familyID", $flags );
and line 311
    $namestr = "$text[familyof]: " . getFamilyName( $famrow );
would have to be changed at a minimum to add a new $text tag in your cust_text.php I have used
$text[familyof] = "Family"; 

in the code above

Hi Ken Roy

Yes you are right, when you go to family group the text at the top of the page is now Spouse: name/name, where it used to be Family: name/name. To be honest I hadn’t noticed till you pointed it out.

I am fairly new to all this so you will have to explain things in layman terms,

I don’t mind having a go so long as you can guide me to the correct folder/file and tell me which line to change.

Does the code you have given correct this?

And which file are you talking about that contains line 307.

David

Share this post


Link to post
Share on other sites
Ken Roy

Hi Ken Roy

Yes you are right, when you go to family group the text at the top of the page is now Spouse: name/name, where it used to be Family: name/name. To be honest I hadn’t noticed till you pointed it out.

I am fairly new to all this so you will have to explain things in layman terms,

I don’t mind having a go so long as you can guide me to the correct folder/file and tell me which line to change.

Does the code you have given correct this?

And which file are you talking about that contains line 307.

David

David,

Sorry I left the file name out of the above. It should be familygroup.php where I changed line 307 and line 311 to use $text[familyof] which I defined in cust_text.php, in my case for English and French.

Share this post


Link to post
Share on other sites
Ken Roy

Is it possible to change the row labels on the getperson page?

The left hand side of the getperson page has various labels: Birth, Gender, Person ID, Father, Mother, Family etc

What I would like to do is to change the label "family" to read "spouse/partner"

Is this possible and if so would some kind soul please give me really basic instructions as to how?

Sylvia

A better approach than changing the $text[family] = value as shown in the previous entries, might be to replace the $text[family] with $text[spouse] in the following lines of code in getperson.php at line 308 (TNG V6.0.4 prior to any mods)

        if( $spouserow[allow_living] )
            $persontext .= showEvent( array( "text"=>"$text[family]$marrstr", "fact"=>$spouselink, "entity"=>$marriagerow[familyID], "type"=>"F" ) );
        else
            $persontext .= showEvent( array( "text"=>"$text[family]$marrstr", "fact"=>$spouselink ) );

since the $text[family] is used in other places besides the getperson page, such as the family group page and the browse media page.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×