Jump to content
TNG Community
dlech

Surname Search Results and Features

Recommended Posts

dlech

I'm a new user and setup my site using Template 14 and upload my data via GEDCOM from a legacy program. I have 2 questions.

Is it possible to modify what columns show up in a Surname Search result page? For example, how could I add a death date column?

Is it possible to remove some of the features in the Features list (e.g. Histories) ?

I imagine the key is know what file to modify and where that files is located...

Thanks!

Share this post


Link to post
Share on other sites
Michel KIRSCH

Hi dlech...

You're right, it is the key...

Main page for template 14 in located in templates/template14/index.php

"Other Features" list is 80% automatically generated by the index.php file (line 211and next) on basis of the ID's contained in the table "tng_mediatypes".

deleting the ID "histories" from this table is one solution : the histories disappear from the list. BUT : all the medias linked with this Id becomes unavailable

in TNG !

Other (better) solution is modifying the code to not show this id on your main page

example : line 212 

        if(!$mediatype['disabled'] AND $mediatype['ID'] != "histories") {

OR Line 206 (for not show anniversaries) placing the line in comment :

<!--                                            <li><a href="anniversaries.php"><?php echo $text['anniversaries']; ?></a></li>    -->

You've understand that this can only be done with good knowledge basis in html, PHP and MySQL

Those modifications can be done manually (after backup of the index.php file !!!) but the best way to do that

is to write a personnal Mod, so the changes can easily be undone if wanted...

Add a death column is more difficult, but possible.

Michel

 

 

 

Share this post


Link to post
Share on other sites
bhemph

Adding "&showdeath=yes" to the surname search string will add the died/buried and corresponding location.  From the advanced search, it is a checkbox above the search button.  To modify it in other locations, yes you would need to change the code that generates the link to add the extra query parameter to the link.  Writing a mod to do this would be best, so that when you upgrade TNG versions you uninstall the mod, do the upgrade, and reinstall the mod.  In that way you don't lose your changes at each upgrade.

Share this post


Link to post
Share on other sites
bhemph

Import/Export >> Secondary Processes and picking Trim Media Menus should remove any media menu links that you do not have by setting the $mediatype['disabled'] flag in the line Michel indicated in his post of changes that can be made.  If you use the Trim Media Menus method, when you add a media of that specified type, it will automatically be re-enabled without you having to remember to go put the line of code back into effect.

Share this post


Link to post
Share on other sites
dlech

Thanks everyone.

I ended up using both the Trim Media Menus suggestion and the manual commenting out lines of code suggestion. Knowing the Advanced Search will yield death information took care of that question.

I appreciate the Mod suggestions. As a software engineer who has been retired 10 years one side of my brain says 'that would be fun to figure out' and the other side says 'do you really want to get into that again?' But I will heed the warning and keep manual changes to an absolute minimum unless I want to start figuring out Mod creation.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×