- Posts: 2165
Question PERSONAL_NAME_PIECES
- WGroleau
- Topic Author
- Offline
- Platinum Member
webtrees has no problem operating effectively "with less structured information."The NPFX, GIVN, NICK, SPFX, SURN, and NSFX tags are provided optionally for systems that cannot operate effectively with less structured information.
Therefore, I would prefer to not have them in my data nor in my exported GEDCOM. I understand there may be a few users exporting to programs that need them. I am not one.Those using the optional name pieces should assume that few systems will process them, and most will not provide the name pieces.
I would request a settings option to not generate those. I do use NICK but rarely. If not generating SURN, GIVN, etc. also loses NICK, I can add it manually for those few cases.
(I am happy to see that the latest version uses TYPE married instead of _MARNM.)
--
Wes Groleau
UniGen.us/
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
See my recent post regarding the CEME tag.
The NAME tag has lots of logic associated with it, to read values from the GIVN/SURN/etc.
So, you'd need to replace NAME with a simple input field.
You should then tell webtrees that the INDI:XXXX tag should not have the following subtags (0,0 means min/max of zero).
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- TheDutchJewel
- Offline
- Junior Member
I would prefer to not have them in my data nor in my exported GEDCOM.
Agreed. I would greatly appreciate it if the creation of the NPFX, GIVN, NICK, SPFX, SURN, and NSFX name parts became optional.
See also: How to prevent creation of GIVN, SPFX and SURN tags?
• webtrees 2.0.19 (later 2.0.x versions have a different markdown implementation)
+ XAMPP 8.2.12 with PHP 7.4.33 + Rural theme + Vesta Classic L&F & Ext. Relationships + other modules
• latest webtrees 2.1.x (only for testing and presentation) + PHP 8.2.x
Please Log in or Create an account to join the conversation.
- TheDutchJewel
- Offline
- Junior Member
Note: the second SPFX subtag should be NSFX.
But it doesn't work quite right.
If I add a child to a family whose name contains a Surname prefix, then by default the Surname prefix and the Surname are still shown and stored when entering. Despite the fact that these are disabled via the custom module.
In this case, how can name parts be prevented from being stored?
• webtrees 2.0.19 (later 2.0.x versions have a different markdown implementation)
+ XAMPP 8.2.12 with PHP 7.4.33 + Rural theme + Vesta Classic L&F & Ext. Relationships + other modules
• latest webtrees 2.1.x (only for testing and presentation) + PHP 8.2.x
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
When webtrees creates a new individual, it uses the "Surname Tradition" settings to create a new name.
This name can include the SPFX and SURN from the parent/spouse.
Just change the surname tradition setting to none.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- TheDutchJewel
- Offline
- Junior Member
OK - webtrees will always display any existing tags.
Only the NAME of the parent/spouse is stored, so the subtags SPFX and SURN don't exist but are created by webtrees when creating an new individual.
Just change the surname tradition setting to none.
Without a surname tradition the surname must be entered each time, which is not convenient and also error-prone due to possible typing errors.
Isn't there a possibility to omit the creation of the SPFX and SURN subtags in the surname tradition?
• webtrees 2.0.19 (later 2.0.x versions have a different markdown implementation)
+ XAMPP 8.2.12 with PHP 7.4.33 + Rural theme + Vesta Classic L&F & Ext. Relationships + other modules
• latest webtrees 2.1.x (only for testing and presentation) + PHP 8.2.x
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
At present no.
But I plan to reorganise the surname-tradition code to be more like the gedcom tag code.
This will allow a module to register a new surname tradition. You can add your own. It would be simple to modify an existing one and remove the SURN tags.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- WGroleau
- Topic Author
- Offline
- Platinum Member
- Posts: 2165
I think you could do this very easiliy with a custom module.
See my recent post regarding the CEME tag.
The NAME tag has lots of logic associated with it, to read values from the GIVN/SURN/etc.
So, you'd need to replace NAME with a simple input field.
Code:'INDI:NAME' => CustomElement(I18N::translate('Name')),
This changes the edit form? If I leave it out, will it still build the name from the other fields?
Or do these prevent them from appearing in the edit form? Is it allowed to have a comma after the last element in the array?You should then tell webtrees that the INDI:XXXX tag should not have the following subtags (0,0 means min/max of zero).
Code:'INDI:NAME' => [['NPFX', '0:0']], 'INDI:NAME' => [['GIVN', '0:0']], 'INDI:NAME' => [['SPFX', '0:0']], 'INDI:NAME' => [['SURN', '0:0']], 'INDI:NAME' => [['SPFX', '0:0']],
This has evolved from feature request to customization, so I have posted www.webtrees.net/index.php/en/forum/4-cu...85-limit-name-pieces
--
Wes Groleau
UniGen.us/
Please Log in or Create an account to join the conversation.
- hermann
- Offline
- Elite Member
Hermann
Designer of the custom module "Extended Family"
webtrees 2.1.21 (all custom modules installed, PHP 8.3.12, MariaDB 10.6) @ ahnen.hartenthaler.eu
Please Log in or Create an account to join the conversation.
- WGroleau
- Topic Author
- Offline
- Platinum Member
- Posts: 2165
An admin setting to choose whether default is ticked or not ticked.
Can still use the entries for indexing (save them in a separate column or table?) even if not putting them in raw GEDCOM.
Or, an admin setting to hide them from raw GEDCOM (including export) while keeping them in the DB and the edit panel.
--
Wes Groleau
UniGen.us/
Please Log in or Create an account to join the conversation.
- norwegian_sardines
- Offline
- Platinum Member
- Posts: 3137
These surname traditions effect Polish, Nordic, Portuguese, Brazilian, Spanish and other surname customs.
You probably don’t have these, but I’m pointing this out if others think this concept might be a good idea for them.
Ken
Please Log in or Create an account to join the conversation.
- WGroleau
- Topic Author
- Offline
- Platinum Member
- Posts: 2165
I have Polish and Mexican, but so far I have not needed either (1) or (2). But I don't want to eliminate it, just make it optional. People who export to "systems that cannot operate effectively with less structured information" will still need the option.I use the SURN tag to support: 1) multiple surnames separated by comma, 2) stem surname where gender effects name suffix, 3) family group when individual has no surname by tradition
These surname traditions effect Polish, Nordic, Portuguese, Brazilian, Spanish and other surname customs.
You probably don’t have these, but I’m pointing this out if others think this concept might be a good idea for them.
--
Wes Groleau
UniGen.us/
Please Log in or Create an account to join the conversation.
- WGroleau
- Topic Author
- Offline
- Platinum Member
- Posts: 2165
I think you could do this very easiliy with a custom module.
The NAME tag has lots of logic associated with it, to read values from the GIVN/SURN/etc.
So, you'd need to replace NAME with a simple input field.
Code:'INDI:NAME' => CustomElement(I18N::translate('Name')),
You should then tell webtrees that the INDI:XXXX tag should not have the following subtags (0,0 means min/max of zero).
Code:'INDI:NAME' => [['NPFX', '0:0']], 'INDI:NAME' => [['GIVN', '0:0']], 'INDI:NAME' => [['SPFX', '0:0']], 'INDI:NAME' => [['SURN', '0:0']], 'INDI:NAME' => [['SPFX', '0:0']],
I have a module with the second part, the 0:0 lines, but not the CustomElement. It still creates the name pieces. Does the CustomElement go in the same file? Before or after the other part?
I tried it this way, and got a "Error: Call to undefined function NamepieceNamespace\CustomElement() in /var/www/html/un/unigen.us/modules_v4/namepieces/NamepieceModuleCustomTags.php:141"
--
Wes Groleau
UniGen.us/
Please Log in or Create an account to join the conversation.