User Footer Copyright

From TNG_Wiki
Revision as of 12:57, 25 April 2015 by Torlund (talk | contribs) (Sites using this mod)

Jump to: navigation, search
Ambox notice.png The User Footer Copyright will not work with Templates 6, 8, and 12 until TNG V10.0.1 which will provide the updated footer.php files for those templates to use the TNG Copyright from genlib.php.

See section below on how you can modify the footer.php for these 3 templates until then
See the Known Issues section for a couple of known problems.

TNG 10.0

User Footer Copyright
Summary Allows users to add a user copyright to their site
Validation Latest mods are XHTML compliant.Valid-xhtml10.png
Mod Updated {{{mod_last_update}}}
Download link For
TNG 10.1.1
TNG 10.1.0
TNG 10.0
Download stats View Download Stats
Author(s) Ken Roy
Homepage User Footer Copyright (This page)
Mod Support TNG Forums
Contact Developer
Latest Mod for TNG V10.1.1 and above for TNG V10.1 for TNG V10 and above
Min TNG V 10.0.0
Max TNG V 10.1.1
Files modified
Related Mods

Purpose of the Mod

TNG V10 moved the contents of the footer.php to genlib.php to allow easier footer switching for Mobile Mode Display. While it is still possible to add User Site Copyright information to the template footer.php file, it is now easier to modify the code in genlib.php.

This mod adds a site specific Copyright to the TNG footers so users do not need to edit the footer.php file nor other TNG files to do so, but rather update the Custom Copyright Start in Setup >> General Settings >> Site Design section and change custom text variables as appropriate if they want different text displayed.

This mod further ensures the Site Copyright is displayed on the Print pages and PDF created pages.


Mod Developer is Ken Roy.

Revision History

Version Date Contents
v10.1.1.3 5 April 2015 Updated for TNG 10.1.1
v10.1.0.2 12 February 2015 Updated for TNG 10.1
v10.0.0.1 24 February 2014 Updated to show the Copyright symbol correctly in the PDF footer change for both ISO-8859-1 and UTF-8
v10.0.0.0 21 February 2014 Original version of the mod


  • a working TNG installation.
  • a backup of your TNG genlib.php and tngpdf.php files or access to your original TNG installation package.

Automated Installation Requirements

  1. Download the appropriate mod configuration file as shown in the summary in the upper right corner of the page
  2. Unzip the file to your mods folder
  3. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the private_notes_for_admins.cfg.

In the event of a problem

  • Try using the Mod Manager Remove capability
  • copy your backup genlib.php file to your root TNG folder

Custom Text

The following custom text is provided for the English and English-UTF8 cust_text.php files

// added for User Footer Copyright mod
$admtext['copyrightstart'] = "Custom Copyright Start Year";
$text['usercreatedby'] = "Created and maintained by ";
$text['usercopyright'] = "Copyright ©";
$text['userrights'] = "All rights reserved.";

Note that the copyright symbol is not entered as shown above in the English and English-UTF8 cust_text.php updates made by the Mod Manager cfg file because the file is ANSI and I do not want to provide both an ANSI and UTF8 version of the cfg file. HTML special codes only work when displayed by the browser, which is not the case with creating a PDF file.

If you want different text for your site footer, then the easiest thing to do is to add the text variables you want to override to your cust_text.php file after the mod is installed. Do NOT modify the mod, but either manually or with an override mod add your changes to the cust_text.php file at the bottom of the cust_text.php file just before the terminating ?> line.

Since PHP uses the last occurrence of the $text variable, you can add the custom text variables you want to change after the mod is installed. For example, you could add the following after the above either manually or as an override mod

//  My overrides to the User Footer Copyright mod
$text['userrights'] = "Please contact us with your suggestions.";


My French translation is as follows. The file download was removed since HTML codes for accents get displayed as test strings. It is easier to update the cust_text.php file directly in the correct language folder where the files should already have the correct charset encoding. Note that I show the copyright symbol in this case since the cust_text.php will be in the correct encoding.

// added for User Footer Copyright mod
$admtext['copyrightstart'] = "Année de début des droits d'auteur";
$text['usercreatedby'] = "créé et entretenu par";
$text['usercopyright'] = "Droits d'auteur ©";
$text['userrights'] = "Tous droits réservés";

Visualization of this mod

The User Footer Copyright mod adds a Custom Copyright Start Year field for you to enter the year you originally launched your TNG web site.

It also uses the Site Name and Site Owner fields and some custom text variables

User footer copyright input.png

to generate a Site Copyright statement

User footer copyright display.png

Template 6, 8, and 12

The footer.php files in Template 6, 8, and 12 were not updated in TNG V10 for the change made to the footer for Mobile Mode Display. If you want to use this mod with those templates, you can change the following code in the footer.php file

                    &nbsp;&nbsp;<?php echo $text['pwrdby'];  ?> <a class="footer"  href="" target="_blank">The  Next Generation of Genealogy Sitebuilding</a> &copy;, v.  <?php echo $tng_version; ?>, <?php echo $text['writby']; ?>  Darrin Lythgoe 2001-<?php echo date('Y'); ?>

to use

                $flags['basicfooter'] = true;
                echo tng_footer($flags);

Known Issues

The following are a couple of known issues and how to handle them.

  • PDF Footer text now overlays the PDF creation date
  • Question mark is displayed for copyright symbol on public site and a square box in the PDF footer
  • User modified footer from a prior version of TNG

Text Overlay

To correct the text overlay if your footer copyright is now too long in the PDF footer, you can change the fontSizeLarge to fontSizeSmall in tngpdf.php around lines 442 and 478 so that they are

    $this->SetFont($footerConfig['font'], '', $footerConfig['fontSizeSmall']);

Question Mark Display

If your site is running as UTF-8 and you get a question mark display, then you need to change the Language in your Admin >> Setup >> General Settings >> Language from English to English-UTF8

Modified Footer

If you use a modified footer.php or your own template, you need update your footer to include the code used by TNG v10, as shown in the changes needed for Template 6, 8, and 12 above.

Sites using this mod

If you download this mod, please add your TNG site to the table below:

URL User Note Mod-Version TNG-Version User-language
Our Roy and Boucher Family Ken Roy Mod Developer. I generalized my site copyright mod 10.1.1 EN, FR
Steve's Family Tree Steve Overton V10.0.0.0 10.0.0 EN
Chamberlain & Eidenbenz Genealogy Graham Chamberlain V10.0.0.1 10.0.0 EN, FR, DE, SP, NL
Stewart Family Genealogy Michael Stewart V10.0.0.1 10.0.0 EN
Total Family History Scott Bennett V10.0.0.1 10.0.0 EN
Genealogy Cook Klaus Dieter Cook 10.0.0 English,German,Spanish
Polys Family Genealogy David Polys 10.0.0 English
Colleen & Jeff's Roots Colleen Greene Replaced copyright with Creative Commons license 10.0.0 English
Farnham & Paradise Ohana Barbara Farnham Paradise with Modifications (Mobile & Standard sites different) 10.0.1 English
History of Klein, Landgraf and Eckarts Michael Klein 10.0.1 EN,DE,FR,IT
Pannier Genealogy Martin Pannier modified and with imprint link see here see here DE
Wortelboer Genealogy Bernard Wortelboer Public site 10.1.1 NL, EN
DJCM.DK Claus Martinussen Public site 10.1.0 DA, EN
MacomberKin Rev. Clinton Macomber Wonderful! Thanks 10.0.3 EN
The Dutton's of Vermont Darrin Dutton Public Site 10.1.0 EN
Our Family History Tor Lund Public site TNG 10.1.1 EN, NO, DA, FR, DE