changing the name of a field being displayed.

If you've programmed a new HuMo-genealogy feature (that you'd like to see included in the official version), please upload and describe your work here.
brandonh
Posts: 6
Joined: Sun 12 Jan 2020, 17:03

changing the name of a field being displayed.

Post by brandonh »

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 :-D
Brandon
User avatar
Huub
HuMo-genealogy programmer
HuMo-genealogy programmer
Posts: 2692
Joined: Wed 27 Aug 2008, 11:34
Location: Heerhugowaard, Netherlands
Contact:

Re: changing the name of a field being displayed.

Post by Huub »

Hello Brandon,

Welcome at the forum!

Goats :shock: :D


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
brandonh
Posts: 6
Joined: Sun 12 Jan 2020, 17:03

Re: changing the name of a field being displayed.

Post by brandonh »

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
User avatar
Huub
HuMo-genealogy programmer
HuMo-genealogy programmer
Posts: 2692
Joined: Wed 27 Aug 2008, 11:34
Location: Heerhugowaard, Netherlands
Contact:

Re: changing the name of a field being displayed.

Post by Huub »

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.
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
brandonh
Posts: 6
Joined: Sun 12 Jan 2020, 17:03

Re: changing the name of a field being displayed.

Post by brandonh »

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
brandonh
Posts: 6
Joined: Sun 12 Jan 2020, 17:03

Re: changing the name of a field being displayed.

Post by brandonh »

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
User avatar
Huub
HuMo-genealogy programmer
HuMo-genealogy programmer
Posts: 2692
Joined: Wed 27 Aug 2008, 11:34
Location: Heerhugowaard, Netherlands
Contact:

Re: changing the name of a field being displayed.

Post by Huub »

Hi,

I haven't received a mail.
I wont the surname to always display first, (dropping the comma wouldn't even be a bad thing) is that possible too!
I probably misunderstood, I thought you wanted to remove the lastname.

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
brandonh
Posts: 6
Joined: Sun 12 Jan 2020, 17:03

Re: changing the name of a field being displayed.

Post by brandonh »

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
Last edited by brandonh on Tue 14 Jan 2020, 20:32, edited 1 time in total.
User avatar
Huub
HuMo-genealogy programmer
HuMo-genealogy programmer
Posts: 2692
Joined: Wed 27 Aug 2008, 11:34
Location: Heerhugowaard, Netherlands
Contact:

Re: changing the name of a field being displayed.

Post by Huub »

Brandon,

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;
Into this code:

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." ";
And this part of code:

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"]);
into this code:

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
brandonh
Posts: 6
Joined: Sun 12 Jan 2020, 17:03

Re: changing the name of a field being displayed.

Post by brandonh »

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.
Post Reply