jeff g Posted November 29, 2021 Report Share Posted November 29, 2021 Hi Everyone! I have a suffix situation! Background: It is necessary for me to unconventional work with the suffix field in my tree. This pertains to one family name only. My family lived in the same village for 350 years before immigrating. 1 pair had 3 sons that created 350 years of branches and marriages between the branches SO I created a family line code that I can see completely how it follows back, so the lines don't get tangle, or to figure where new people I find enter the picture. Parameters: The suffix box is the only box, that is consistently there in my workflow, and transfers well to TNG. ANCtree==>FTM2019==>Rootsmagic==>TNG I need to maintain the same workflow as well as the fact ancestry's fields are limited, so that is why the lineage code is in the suffix field. What I want to do: I want to batch remove the suffix after the name in the title BUT Leave it below the name in the Suffix Data Box. I have attached a screenshot. I am so happy If anyone can help me solve this! TNG is my end presentation out to the web. Thanks for any help, Jeff Quote Link to comment Share on other sites More sharing options...
bhemph Posted November 29, 2021 Report Share Posted November 29, 2021 Jeff, In globallib.php there is a function getNameUniversal. In that change the line $suffix = $row['suffix']; to $suffix = ""; and that should drop the suffix only from the name. Brent Quote Link to comment Share on other sites More sharing options...
jeff g Posted November 29, 2021 Author Report Share Posted November 29, 2021 5 minutes ago, bhemph said: Jeff, In globallib.php there is a function getNameUniversal. In that change the line $suffix = $row['suffix']; to $suffix = ""; and that should drop the suffix only from the name. Brent Brent, Bless You! Thank You So Much For the Help! Inspect tool takes me very long to figure out the root file. Well appreciated! Jeff Quote Link to comment Share on other sites More sharing options...
jeff g Posted January 3, 2023 Author Report Share Posted January 3, 2023 Hi Everyone! Happy New Year! Any help on a follow up issue is well appreciated! Thanks! Jeff I am using Ver. 14.0 with Template 14. Previously it was template 12, but the suffix box field is still intact. The code in globallib.php has changed. my code search now shows: Search "getNameUniversal" (3 hits in 1 file of 1 searched) globallib.php (3 hits) Line 66: $namestr = getNameUniversal($row, $locnameorder, $hcard); Line 76: $namestr = getNameUniversal($row, $locnameorder, $hcard); Line 81: function getNameUniversal($row, $order, $hcard=null) { ----------------------------------------------------- with SUFFIX i get: globallib.php (28 hits) Line 38: function constructName($firstnames, $lastnames, $title, $suffix, $order) { Line 46: $namestr = trim("$lastnames $title$firstnames$suffix"); Line 51: if($suffix) $namestr .= ", $suffix"; Line 55: if($suffix) $namestr .= ", $suffix"; Line 93: $title = $suffix = ""; Line 100: $suffix = isset($row['suffix']) ? $row['suffix'] : ''; Line 104: $namestr = constructName($firstname, $lastname, $title, $suffix, $order); Line 112: $namestr = constructName($firstname, $lastname, "", $suffix, $order); //title intentionally omitted Line 124: $hquery = "SELECT personID, firstname, lnprefix, lastname, title, prefix, suffix, birthdate, birthdatetr, altbirthdate, altbirthdatetr, living, private, branch, nameorder, gedcom FROM $people_table WHERE personID = \"{$row['husband']}\" AND gedcom = \"{$row['gedcom']}\""; Line 138: $wquery = "SELECT personID, firstname, lnprefix, lastname, title, prefix, suffix, birthdate, birthdatetr, altbirthdate, altbirthdatetr, living, private, branch, nameorder, gedcom FROM $people_table WHERE personID = \"{$row['wife']}\" AND gedcom = \"{$row['gedcom']}\""; Line 1082: $prefix = $suffix = ""; Line 1105: $suffix = "</a>"; Line 1149: $photo = "$prefix<img src=\"$photoref\" border=\"$border\" alt=\"" . str_replace("\"",""",$alttext) . "\" width=\"$photowtouse\" height=\"$photohtouse\" class=\"smallimg\"{$align}/>$suffix"; Line 1311: $suffix = $tngconfig['personsuffix']; Line 1315: $suffix = $tngconfig['familysuffix']; Line 1319: $suffix = $tngconfig['sourcesuffix']; Line 1323: $suffix = $tngconfig['reposuffix']; Line 1326: $prefix = $suffix = ""; Line 1331: $suffixlen = strlen($suffix); Line 1335: if($suffix && $entity_suffix != $suffix && is_numeric($entity_suffix)) $entityID = $entityID . $suffix; Line 1392: people.prefix as prefix, people.suffix as suffix, nameorder, people.title as title, place, Quote Link to comment Share on other sites More sharing options...
bhemph Posted January 4, 2023 Report Share Posted January 4, 2023 Line 100 $suffix = isset($row['suffix']) ? $row['suffix'] : ''; is the one that you want to change. Quote Link to comment Share on other sites More sharing options...
jeff g Posted January 4, 2023 Author Report Share Posted January 4, 2023 2 hours ago, bhemph said: Line 100 $suffix = isset($row['suffix']) ? $row['suffix'] : ''; is the one that you want to change. Brent, God Bless You and thanks again! So it would be ===> $suffix = isset('') ? $row[''] : ''; ??? Jeff Quote Link to comment Share on other sites More sharing options...
jeff g Posted January 4, 2023 Author Report Share Posted January 4, 2023 OH! I got it! t would be ===> $suffix = " "; as before! Jeff Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.