changing the name of a field being displayed.
changing the name of a field being displayed.
Could you point me in the direction of what files I need to edit to change mother to Doe and father to Sire, Surname to Herd Name etc
Thanks,
It's for the goaties
Brandon
Thanks,
It's for the goaties
Brandon
- Huub
- HuMo-genealogy programmer
- Posts: 2693
- Joined: Wed 27 Aug 2008, 11:34
- Location: Heerhugowaard, Netherlands
- Contact:
Re: changing the name of a field being displayed.
Hello Brandon,
Welcome at the forum!
Goats
Probably the best way to do is, is changing the language files.
Go to: Admin -> Control -> Language Editor.
Select the language file, and change the language items.
Maybe disable other languages:
Go to: Admin -> Control -> Extensions.
Disable other languages.
Welcome at the forum!
Goats
Probably the best way to do is, is changing the language files.
Go to: Admin -> Control -> Language Editor.
Select the language file, and change the language items.
Maybe disable other languages:
Go to: Admin -> Control -> Extensions.
Disable other languages.
HuMo-genealogy update? Backup your database! Editing in HuMo-genealogy? Backup your data!
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Re: changing the name of a field being displayed.
this is so awesome! you guys have made an awesome tool here! one more question I hope is just as easy to resolve, I wont the surname to always display first, (dropping the comma wouldn't even be a bad thing) is that possible too!
Thank you so much!!
Brandon
Thank you so much!!
Brandon
- Huub
- HuMo-genealogy programmer
- Posts: 2693
- Joined: Wed 27 Aug 2008, 11:34
- Location: Heerhugowaard, Netherlands
- Contact:
Re: changing the name of a field being displayed.
Brandon,
In most scripts a class is used to show the firstname, prefix and surname.
To change these items, you have to change the script: include/person_cls.php.
Use notepad or notepad++ to open the script, and search for these items:
line 293:
$name_array["name"].=$personDb->pers_lastname;
change into (just add // before this line):
//$name_array["name"].=$personDb->pers_lastname;
line 298:
$name_array["short_firstname"].=$personDb->pers_lastname;
change into:
//$name_array["short_firstname"].=$personDb->pers_lastname;
line 310:
$name_array["standard_name"].=$personDb->pers_lastname;
change into:
//$name_array["standard_name"].=$personDb->pers_lastname;
For the index lists:
line 330:
$name_array["index_name"].=$personDb->pers_lastname.', ';
$name_array["index_name_extended"].=$personDb->pers_lastname.', ';
change into:
//$name_array["index_name"].=$personDb->pers_lastname.', ';
//$name_array["index_name_extended"].=$personDb->pers_lastname.', ';
I didn't test these changes... I do think the comma will be removed in most reports and pages if these codes are used.
In most scripts a class is used to show the firstname, prefix and surname.
To change these items, you have to change the script: include/person_cls.php.
Use notepad or notepad++ to open the script, and search for these items:
line 293:
$name_array["name"].=$personDb->pers_lastname;
change into (just add // before this line):
//$name_array["name"].=$personDb->pers_lastname;
line 298:
$name_array["short_firstname"].=$personDb->pers_lastname;
change into:
//$name_array["short_firstname"].=$personDb->pers_lastname;
line 310:
$name_array["standard_name"].=$personDb->pers_lastname;
change into:
//$name_array["standard_name"].=$personDb->pers_lastname;
For the index lists:
line 330:
$name_array["index_name"].=$personDb->pers_lastname.', ';
$name_array["index_name_extended"].=$personDb->pers_lastname.', ';
change into:
//$name_array["index_name"].=$personDb->pers_lastname.', ';
//$name_array["index_name_extended"].=$personDb->pers_lastname.', ';
I didn't test these changes... I do think the comma will be removed in most reports and pages if these codes are used.
HuMo-genealogy update? Backup your database! Editing in HuMo-genealogy? Backup your data!
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Re: changing the name of a field being displayed.
I have tried that, and tried swapping where it calls for firstname and lastname, all that seems to happy is the lastname (herd name) disappears.
Thanks again for your amazing support!
Brandon
Thanks again for your amazing support!
Brandon
Re: changing the name of a field being displayed.
hey again,
just seeing if you might be able to offer any advice, I tried adding those // but it just keeps dropping the surname and now the prefix is displaying twice...
I also reached out on email, not sure if you received it.
Thanks,
Brandon
just seeing if you might be able to offer any advice, I tried adding those // but it just keeps dropping the surname and now the prefix is displaying twice...
I also reached out on email, not sure if you received it.
Thanks,
Brandon
- Huub
- HuMo-genealogy programmer
- Posts: 2693
- Joined: Wed 27 Aug 2008, 11:34
- Location: Heerhugowaard, Netherlands
- Contact:
Re: changing the name of a field being displayed.
Hi,
I haven't received a mail.
Sorry, at this moment I don't understand the problem... Do you want to show or hide the lastname?
I haven't received a mail.
I probably misunderstood, I thought you wanted to remove the lastname.I wont the surname to always display first, (dropping the comma wouldn't even be a bad thing) is that possible too!
Sorry, at this moment I don't understand the problem... Do you want to show or hide the lastname?
HuMo-genealogy update? Backup your database! Editing in HuMo-genealogy? Backup your data!
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Re: changing the name of a field being displayed.
my apologies, I was probably not very clear.
I would like the last name to always display first, then the first name
(prefix last name firstname suffix)
Thanks you!
Brandon
I would like the last name to always display first, then the first name
(prefix last name firstname suffix)
Thanks you!
Brandon
Last edited by brandonh on Tue 14 Jan 2020, 20:32, edited 1 time in total.
- Huub
- HuMo-genealogy programmer
- Posts: 2693
- Joined: Wed 27 Aug 2008, 11:34
- Location: Heerhugowaard, Netherlands
- Contact:
Re: changing the name of a field being displayed.
Brandon,
Try this (not tested):
Change this code:
Into this code:
And this part of code:
into this code:
Try this (not tested):
Change this code:
Code: Select all
// *** Firstname, patronym, prefix and lastname ***
$name_array["name"]=$pers_firstname." ";
// *** feb 2016: added patronym ***
if ($personDb->pers_patronym) $name_array["name"].=$personDb->pers_patronym." ";
$name_array["name"].=str_replace("_", " ", $personDb->pers_prefix);
$name_array["name"].=$personDb->pers_lastname;
Code: Select all
// *** Firstname, patronym, prefix and lastname ***
$name_array["name"]=str_replace("_", " ", $personDb->pers_prefix);
$name_array["name"].=$personDb->pers_lastname;
$name_array["name"].=$pers_firstname." ";
Code: Select all
// *** Example: Predikaat Hubertus [Huub] van Mons, Title, 2nd title ***
$name_array["standard_name"]=$nobility.$title_before.$pers_firstname." ";
if ($personDb->pers_patronym) $name_array["standard_name"].=" ".$personDb->pers_patronym." ";
$name_array["standard_name"].=$title_between;
// *** Callname shown as "Huub" ***
//if ($personDb->pers_callname AND $privacy=='') $name_array["standard_name"].= ' "'.$personDb->pers_callname.'" ';
if ($personDb->pers_callname AND ($privacy=='' OR ($privacy AND $user['group_filter_name']=='j')) )
$name_array["standard_name"].= ' "'.$personDb->pers_callname.'" ';
$name_array["standard_name"].=str_replace("_", " ", $personDb->pers_prefix);
$name_array["standard_name"].=$personDb->pers_lastname;
if ($title_after){ $name_array["standard_name"].=$title_after; }
$name_array["standard_name"].=$stillborn;
$name_array["standard_name"].=$lordship;
$name_array["standard_name"]=trim($name_array["standard_name"]);
Code: Select all
// *** Example: Predikaat Hubertus [Huub] van Mons, Title, 2nd title ***
$name_array["standard_name"]=str_replace("_", " ", $personDb->pers_prefix);
$name_array["standard_name"].=$personDb->pers_lastname;
$name_array["standard_name"]=$pers_firstname." ";
$name_array["standard_name"].=$stillborn;
$name_array["standard_name"]=trim($name_array["standard_name"]);
HuMo-genealogy update? Backup your database! Editing in HuMo-genealogy? Backup your data!
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Make multiple backups with: PHPMyAdmin, gedcom export and database export.
HuMo-genealogy software: http://humo-gen.com
Re: changing the name of a field being displayed.
I have triple checked to make sure I was replacing all of the proper code and I am still not seeing the surname at all, it is only displaying in the index page not in any tree/chart views or on the profile pages.