Korycki Posted January 3, 2013 Report Share Posted January 3, 2013 Hello,I need help with the placing/showing the nickname. As you can see on the screenshot the title and the prefix go before the name as should but the nickname is not showing in the bold letters above, it is showing up only in the description.I would like to have the nickname showing up after first name and before the lastname but I have no idea how to do that. Please help.Thank you,Piotr Korycki Quote Link to comment Share on other sites More sharing options...
MichaelS Posted January 23, 2013 Report Share Posted January 23, 2013 Hello,I need help with the placing/showing the nickname. As you can see on the screenshot the title and the prefix go before the name as should but the nickname is not showing in the bold letters above, it is showing up only in the description.The way I did it was to edit a few lines in globallib.php, adding in the nickname variable.this function at line 55 (edited)function constructName($firstnames, $nicknames, $lastnames, $suffix, $order) { $nn .= ""; if($nicknames) $nn .= "\"$nicknames\""; switch($order) { case "3": if($lastnames && $firstnames) $lastnames .= ","; $namestr = trim("$lastnames $firstnames $nn $suffix"); break; case "2": $namestr = trim("$lastnames $firstnames $nn"); if($suffix) $namestr .= ", $suffix"; break; default: $namestr = trim("$firstnames $nn $lastnames"); if($suffix) $namestr .= ", $suffix"; break; } return $namestr;} then lines 102 and 110 in this function function getNameUniversal($row, $order) { global $text, $admtext, $tngconfig, $nonames; //$nonames = showNames($row); $lastname = trim( $row['lnprefix']." ".$row['lastname'] ); if($tngconfig['ucsurnames']) $lastname = tng_strtoupper($lastname); $title = $row['title'] && ($row['title'] == $row['prefix']) ? $row['title'] : trim($row['title'] . " " . $row['prefix']); if( ($row['allow_living'] || !$nonames) && ($row['allow_private'] || !$tngconfig['nnpriv']) ) { $firstname = trim( $title . " " .$row['firstname'] ); $namestr = constructName($firstname, $row['nickname'], $lastname, $row['suffix'], $order); } elseif( $row['living'] && !$row['allow_living'] && $nonames == 1 ) $namestr = $text['living']; elseif( $row['private'] && !$row['allow_private'] && $tngconfig['nnpriv'] == 1 ) $namestr = $admtext['text_private']; else { //initials $firstname = trim( $title . " " . initials( $row['firstname']) ); $namestr = constructName($firstname, $row['nickname'], $lastname, $row['suffix'], $order); } return $namestr; Quote Link to comment Share on other sites More sharing options...
Genealogia Polska Posted December 2, 2014 Report Share Posted December 2, 2014 Thank You! Quote Link to comment Share on other sites More sharing options...
Hiraeth Posted December 2, 2014 Report Share Posted December 2, 2014 Thank You!To protect against future upgrades (getperson.php is almost always changed at an upgrade) these changes should be incorporated in a mod.There is already a mod on the TNG Wiki that does something similar: Show Nicknames Quote Link to comment Share on other sites More sharing options...
DelG Posted December 2, 2014 Report Share Posted December 2, 2014 To protect against future upgrades (getperson.php is almost always changed at an upgrade) these changes should be incorporated in a mod.There is already a mod on the TNG Wiki that does something similar: Show NicknamesJust a comment to demonstrate how I handle 'nicknames'. Rather than create a separate Tag, I incorporate a nickname in the First Name tag in my gedcom, ex: Glenn Glessner 'Gladstone' BILLER. ex: http://www.ourfamilysaga.com/getperson.php...;tree=ourfam001I include these comments in my 'What's New' page to aide visitors:"Searching for someone in our databaseYou can search by name for a person by utilizing the Search boxes visible in the header area of each page of our website. Utilizing these search boxes you can search for a person by their Nickname only or Nickname + Last Name because some folks were never or rarely known by their real names... " 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.