Married Name Display

From TNG_Wiki
Jump to navigation Jump to search
Married Name Display
Summary This mod adds a married woman's husbands surname to displays like 'Wilma Flintstone (nee Quartz)'.
Validation This mod is XHTML compliant.Valid-xhtml10.png
Mod Updated 19 Feb 2021
Download link v13.0.3.0
TNG 13.0
v12.1.0.2
TNG 12.0
Download stats none
Author(s) Larry Lewis
Homepage Jenolan's CESS
Mod Support TNG Community Forum
Contact Developer via TNG Forum
Latest Mod 13.0.3.0
Min TNG V 12.0.0
Max TNG V 13.x
Files modified
globallib.php admin_people.php
Related Mods
Notes

Introduction

This mod adds a married woman's husbands surname to displays like 'Wilma Flintstone (nee Quartz)'.

This mod is for use where traditionally the female assumes the male family name, it is not a design error, if your usage is not compatible do not install the mod

Left


Developer

This mod was developed by Larry Lewis.

Requirements

  • A working TNG installation.
  • A backup of all affected files (see the list in the summary in the upper right corner of the page)
  • An installed current version of the Mod Manager.
  • Both English and English-UTF8 folders be on your site

Upgrade from v12 to v13

  1. As per TNG upgrade instructions (disable mod)
  2. Delete the old mod totally
  3. upload new version
  4. enable as per normal

In the event of a problem with your TNG site

  1. Try using the Mod Manager to Remove the mod
  2. Contact me via TNG Forum.
  3. The order of the 'marriages' decides which male name to use, make sure that your marriages are ordered correctly by date
  4. *** Spouses can be sorted by marriage date in Admin:Import/Export: Secondary Processes: Sort Spouses ***

Standard Options

All of the following add additional conditions to retrieve the marriage status. You may choose which ones are active depending on your preferences. For example you may or may not like having a divorced female revert to their maiden name. You may enable/disable the options as you like.

Married Type

If you set the value to '1' for this option Married Name Display will not occur if the family 'Marriage Type' (field 'marrtype') has not been set to a non-empty value.

Married Date

If you set the value to '1' for this option Married Name Display will not occur if the family 'Married Date' (field 'marrdate') has not been set to a non-empty value.

Divorced (Date)

If you set the value to '1' for this option Married Name Display will not occur if the family 'Divorced Date' (field 'divdate') has been set to a non-empty value.

No Husband Switch

If you set the value to '1' for this option Married Name Display will not occur if the family has no 'Husband' set. This should not really be required as a single parent (female only) family should already work this way. This option added by request so it must apply in some instance and require handling.

Display Format

As opposed to the page by page option available in the advanced options, you may set the way Married Name Displays the maiden/married name globally with this optn.

There are five substitution parameters, see the mod option display. You may add literal characters to suit, see examples below. Please note that the @nee@ is used so that the value is as per language translation requirements.

Format String Display
@husband_last@ @open@@nee@ @female_last@@close@ Flintstone (nee Quartz)
@husband_last@ @open@Previously @female_last@@close@ Flintstone (Previously Quartz)
@open@@female_last@@close@ @husband_last@ (Quartz) Flintstone

Advanced Options


Caution You are able to enable/disable the display and change the formatting of the mod per page, this will require that you construct you own mod or modify TNG files directly (not recommended).

Please remember in your mod to check that married name display is active as shown in the example.
Caution

Toggle Display

You can enable/disable mod processing my calling the function marriedNameDisplaySet() to turn on use 'true' to turn off use 'false' eg marriedNameDisplaySet( true ) to enable processing, calling with no argument will return the current setting.

If you need to turn off processing for a page do something like;

if( function_exists( 'marriedNameDisplaySet' ) )
{
    marriedNameDisplaySet( false );    ## Turn off Married name display
}

Disable married name in showmedia.php

%target:showmedia.php%
%location:%
		$namestr = getName( $row );
%end:%
%insert:before%
		if( function_exists( 'marriedNameDisplaySet' ) )
		{
			marriedNameDisplaySet( false );    ## Turn off Married name display
		}
%end:%
%location:%
		$namestr = getName( $row );
%end:%
%insert:after%
		if( function_exists( 'marriedNameDisplaySet' ) )
		{
			marriedNameDisplaySet( true );    ## Turn on Married name display
		}
%end:%

Modify Display Format

You can change the format of the displayed string by calling marriedNameDisplayFormat() pass the required string format as the argument eg;

1marriedNameDisplayFormat( ' @open@@female_last@@close@ @husband_last@' )

If you need to restore the original format do something like;

1if( function_exists( 'marriedNameDisplayFormat' ) )
2{
3    $fmtString = marriedNameDisplayFormat();    ## Get current format
4    marriedNameDisplayFormat( ' @open@@female_last@@close@ @husband_last@' ); ## Set temporary format
5}
6// do whatever
7if( function_exists( 'marriedNameDisplayFormat' ) ) marriedNameDisplayFormat( $fmtString );  ## Restore format

non-Tradional Marriage

Caution This is a potentially dangerous process Caution

If you are unable to use the various switches to achieve the desired display and you are recording in the 'Married Type' unique information that will identify a union that should not have the Married Name Display handled then you may add the type(s) to the option as a comma separated list of types like;

Single type unmarried
Multiple types unmarried,not married,other

Languages

Translations for German and French text provided by Jürgen. If you want to use it with a different language, add the correct text (between double quotes) in the code below and add to your cust_text.php file in the appropriate language folder.

// ********** START: Married Name Display language files
$text['nee'] = "nee";
// ********** END: Married Name Display language files

To have an additional translation added to the Mod please provide the localisation string and language to Larry.

Revision History

Mod Version TNG Versions Date Note
v13.0.3.1 v13.0 In progress
  • Added switch to not process a female without a husband
  • Added option to not process if female marriage type is excluded
  • Will not add the nee if the record does not have a surname
  • Mod source now with defaults set correctly
  • Added function to enable/disable mod per page (see instructions)
  • Added function to modify the display format per page (see instructions)
v13.0.3.0 v13.0 19 Feb 2021 Updated to TNG v13.0.3
v12.1.0.2 v12.0 1 April 2019 Added ability to modify search SQL. Handle case where maiden name is empty
v12.1.0.1 v12.0 19 March 2018 Internationalisation added thanks to Jürgen (German, French)
v12.0.0.0 v12.0 18 March 2018 Initial version of the mod.

Sites using this mod

If you download and install this mod, please add your TNG site to the table below:

URL User Note Mod-Version TNG-Version User-language
Jenolan's CESS Larry & Helen Lewis Mod developer 13.0.0.0 13.0 English
Genealogy of the van Heerden Family Emile van Heerden Owner 12.0.0.0 12.0 English
adupree.com A.Scott DuPree Owner 12.0.0.0 12.0.3 English
www.vidunge.com Hans-Eric Holmqvist Owner 13.0.3.0 13.0 Swedish
Roots & Relatives Remembered Ron Krzmarzick changed to fname (bname) mname header only See here See here EN,DE,CS
Lathrope Family Genealogy S Sharpe Public 13.0.3.1 13.0.4 EN
Delvee Family Association Rob Roy Public 13.0.3.0
TNG 15.0
English
theskytree.com Nestor Holynskyj Public 13.0.3.0 13.1.1 EN