Template Settings - V8.1 Fixes

From TNG_Wiki
Jump to: navigation, search
Ambox notice.png The Template Settings - V8.1 Fixes mod was added to TNG version 8.1 and above to remove hard-coded English text, so that changes for your Home page can be done through Admin >> Configuration >> Template Settings.

This mod is obsolete with TNG V9. While parts of this mod might still be required to change headings in Templates 6 and 8, it will not be reworked by the developer.
TNG version: 8.1.3
TNG version: 8.1.0
TNG 8.1


Template Settings - V8.1 Fixes
Summary Updates templates 4, 5, 6, and 8 to remove hard-code English text
Validation Mod for TNG 8.1.2 is XHTML compliant.Valid-xhtml10.png
Mod Updated {{{mod_last_update}}}
Download link for
TNG 8.1.2
template_settings_fixes_v8.2.1.zip
for
TNG 8.1
template_settings_fixes_v8.2.0a.zip
Download stats {{{download_stats}}}
Author(s) Ken Roy
Homepage Template Settings - V8.1 Fixes
Mod Support TNG Community Forums
Contact Developer My Mod Support
Latest Mod 8.2.0
Min TNG V 8.1.0
Max TNG V 8.1.2
Files modified
Related Mods
Related to Template_Settings_-_Multi-language_Mod but can be installed independently
Notes


Introduction

This mod applies to TNG V8.1 and fixes hard-coded English text in the Home page (index.php) for templates 4, 5, 6, and 8.

After installing this mod, you will need to update your cust_text.php file for the languages you use if you are using this mod in conjunction with the Template Settings - Multi-language Mod. See the Custom Text section below.

The additional hard-coded text and images were replaced by $tmp variables to allow users to customize the templates in other languages. See After Installation Actions. However, this mod can be installed without the Multi-language mod, since it also allows users to customize their Contact Us text for the Home page in templates 4, 5, and 8. It further allows customizing the Icon note text for template 6 and section headings in the Home Page for templates 6 and 8.

Note that this mod expects that you have copied all templates/templateN folders and files to your TNG root path folder, sometimes called the genealogy directory, as indicated in the readme files for TNG V8.1.

Developer

This mod was developed by Ken Roy.

Our thanks to Cornelis Kuit, Graham Chamberlain, and Jeff Robison for helping test and debug this mod for TNG V8.1.0.

Advantages

This mod provides the capability to customize:

  • the Contact Us text for the Home page (index.php) in templates 4, 5, and 8
  • the Icon text for template 6
  • the section headings for the Home page (index.php) in templates 6 and 8

Requirements

  • a working TNG V8.1 installation
  • a backup of the following TNG files
    • templateconfig.php
    • index.php for templates 4, 5, 6, and 8

Note that this mod expects that you have copied all templates/templateN folders and files to your TNG root folder, sometimes called the genealogy directory, as indicated in the readme files for TNG V8.1. The mod updates the index.php files for template 4, 5, 6, and 8 only to replace hard-coded English text with either $text or $tmp variables, to allow users to customize their Home page.


TNG Modules Involved

In TNG V8.1, the following modules are updated:

  • templateconfig.php
  • index.php for templates 4, 5, 6, and 8

Automated Installation

  1. Download the template_settings_fixes_v8.2.0a.zip
  2. After downloading the config file, unzip it into 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 template_settings_fixes.cfg file.

After Installation Actions

Updating Contact Us in TNG 8.1

Note that this mod added new $tmp variables for previously hard-coded English text in the index.php files. One of these was the Contact Us information displayed in the Home page for Templates 4, 5, and 8. This mod split the text used in the Contact Us section to use two different variables. The default text used by TNG is provided in the mod as

$tmp['t4_contactus1'] = "If you have any questions or comments about the information on this site, please ";

$tmp['t4_contactus2'] = "We look forward to hearing from you.";

which is echoed as

<p><img src="<?php echo $cms['tngpath'] . $templatepath; ?>img/email.gif" alt="email image" class="emailimg" />

<?php echo $tmp['t4_contactus1']; ?>

<span class="emphasis"><a href="suggest.php"><?php echo $text['contactus']; ?></a></span>

<?php echo $tmp['t4_contactus2']; ?></p><br />

Note that the above added line wraps in order to display the code in index.php for template 4 as legible text.

Template 5 and 8 use a similar approach where the Contact Us link is between both text fragments, but do not use an email image.

Because different languages structure their sentences differently, you should be able to use the

  • Contact sentence 1: for the first portion of the Contact Us sentence which will be followed by the URL link for the Contact Us
  • Contact sentence 2: for the second portion of the text that follows the Contact Us link

Updating Icon Text in template 6

This mod split the text for the Icon note into 3 text portions to allow updating the text and keep the photo and document icons in the sentence. For example, you could update it to use

  • Icon note text 1: Click the
  • Icon note text 2: to view photos and the (Note that you may need a leading blank in the Icon note text 2)
  • Icon note text 3: to view histories when they are available for an individual. (Note that you may need a leading blank in the Icon note text 3)

Because different languages structure their sentences differently, you should be able to use the

  • Icon note text 1: for the first portion of the icon note sentence that is part of the Family Histories section
  • Icon note text 2: for the second portion of the icon note sentence that is part of the Family Histories section
  • Icon note text 3: for the third portion of the icon note sentence that is part of the Family Histories section

Updating GENDEX section

This mod allows updating the GENDEX link and name to point to either:

  • the TNG Network as provided in the template
  • the FamilyTreeSeeker.com


TNG Network

The values for the TNG Network search are

FamilyTreeSeeker

The values for the FamilyTreeSeeker GENDEX search are:

Updating Pedigree Chart names and links =

This mod also added variables that allows you to update the Pedigree Chart names and links to other values in

  • template 6 from His Side and Her Side
  • template 8 from Mom's Side and Dad's Side

Template 6

This mod added variables for

  • His Side label:
  • Her Side label:

that allow you to use different labels


Template 8

This mod added variables for

  • Mom's Side Heading
  • Dad's Side Heading

that allow you to use different heading labels


Updating section headings

This mod also allows you to change some of the heading names in templates 6 and 8.


Template 6

Since the font used for the graphics header_ images is not known, I tried several fonts in Adobe PhotoShop Elements 7, the one I ended up using as shown in the image below was VAGRounded BT

The following section heading images can be replaced with ones you create in template 6, that allow customizing the Home page so that it displays a different look and feel than what is distributed:
  • Welcome image
  • Featured photo image
  • Family history image
  • His Side label
  • Her Side label
  • Most Wanted image
  • Resources image

as shown in the image on the right

TNG V8.1 template selection fixes tmpl-6.jpg


TNG version: 8.1.2

The Home page (index.php) in TNG V8.1.2 should pass XHTML validation, however there are several items in the Template Settings that will cause problems because of the use of <span> tags:

  • Paragraph tags cannot be entered in the Welcome paragraph for example.
  • The Family History links for his and her side contain ampersands, which generate the HTML code & amp; (note blank inserted since even with nowiki it gets converted to a regular ampersand), the page will validate. However, as soon as you open the Template Settings, the ampersand will have reverted back to a regular ampersand rather than the HTML code, so after you save the Template Settings, the page will present validation errors.
Template6 fix links.jpg

So you will need to fix the ampersands if you want your Home page to validate as XHTML 1.0.

Template 8

The following section heading images can be replaced with ones you create in template 6, that allow customizing the Home page so that it displays a different look and feel than what is distributed:
  • Latest News Heading
  • Mom's Side Heading
  • Dad's Side Heading
  • Features Heading
  • Feature 1 title (defaults to Most Wanted)
  • Feature 1 link
  • Feature 1 paragraph
  • Feature 2 title (defaults to What's New)
  • Feature 2 link
  • Feature 2 paragraph

as shown in the image on the right

TNG V8.1 template selection fixes tmpl-8.jpg


TNG version: 8.1.2

The Home page (index.php) in TNG V8.1.2 should pass XHTML validation.

If the link in the Feature 1 and 2 link text fields contain an ampersand, when you enter it as the HTML code & amp; (note blank inserted since even with nowiki it gets converted to a regular ampersand), the page will validate. However, as soon as you open the Template Settings, the ampersand will have reverted back to a regular ampersand rather than the HTML code, so after you save the Template Settings, the page will present validation errors.

Template8 fix links.jpg

So you will need to fix the ampersands if you want your Home page to validate as XHTML 1.0.

Multi-language

If you are using the Template Settings - Multi-language Mod, then you need to add the translated equivalents to each of the languages you will be creating a language-specific home pages.

Custom Text

The following custom text was added to the languages/English and languages/English-UTF8 cust_text.php files by this mod in TNG V8.1.

// added for Template Selection - Multi-language Mod
$admtext['contactus1'] = "Contact sentence 1";
$admtext['contactus2'] = "Contact sentence 2";
$admtext['hdrwelcomeimg'] = "Welcome image";
$admtext['hdrsearchimg'] = "Search image";
$admtext['srchgendexlink'] = "GENDEX Search link";
$admtext['srchgendextext'] = "GENDEX Search text";
$admtext['hdrfeatphotoimg'] = "Featured photo image";
$admtext['hdrfamhistimg'] = "Family history image";
$admtext['fhicontext1'] = "Icon note text 1";
$admtext['fhicontext2'] = "Icon note text 2";
$admtext['fhicontext3'] = "Icon note text 3";
$admtext['hdrmostwantedimg'] = "Most Wanted image";
$admtext['mwlink'] = "Most Wanted link";
$admtext['mwtext'] = "Most Wanted text";
$admtext['hdrresourcesimg'] = "Resources image";
$admtext['momheading'] = "Mom's Side Heading";
$admtext['dadheading'] = "Dad's Side Heading";
$admtext['latestnewsheading'] = "Latest News Heading";
$text['sitemenu'] = "Site Menu";

Dutch custom text

For example, the following text provided by Cornelis Kuit, can be used for the Dutch and Dutch-UTF8 cust_text.php

// added for Template Selection - Multi-language Mod
$admtext['contactus1'] = "Kontaktlijn 1";
$admtext['contactus2'] = "Kontaktlijn 2";
$admtext['hdrwelcomeimg'] = "Welkom beeld";
$admtext['hdrsearchimg'] = "Zoek beeld";
$admtext['srchgendexlink'] = "GENDEX Zoeken link";
$admtext['srchgendextext'] = "GENDEX Zoeken text";
$admtext['hdrfeatphotoimg'] = "Getoonde foto beeld";
$admtext['hdrfamhistimg'] = "Familie historie beeld";
$admtext['fhicontext1'] = "Ikoon notitie text 1";
$admtext['fhicontext2'] = "Ikoon notitie text 2";
$admtext['fhicontext3'] = "Ikoon notitie text 3";
$admtext['hdrmostwantedimg'] = "Meest gezocht beeld";
$admtext['mwlink'] = "Meest gezocht link";
$admtext['mwtext'] = "Meest gezocht text";
$admtext['hdrresourcesimg'] = "Artikelen beeld";
$admtext['momheading'] = "Moeder's kant aanhef";
$admtext['dadheading'] = "Vader's kant aanhef";
$admtext['latestnewsheading'] = "Laatste nieuws";
$admtext['featureheading'] = "Kenmerk aanhef";
$text['sitemenu'] = "Website Menu";

French custom text

For example, the following can be used for the French and French-UTF8 cust_text.php

// added for Template Selection - Multi-language Mod
$admtext['contactus1'] = "1ère Phrase de contact ";
$admtext['contactus2'] = "2ième phrase de contact ";
$admtext['hdrwelcomeimg'] = "Image de bienvenue";
$admtext['hdrsearchimg'] = "Image de recherche";
$admtext['srchgendexlink'] = "Lien de recherche GENDEX";
$admtext['srchgendextext'] = "Texte de rechercheGENDEX";
$admtext['hdrfeatphotoimg'] = "Titre de photo randomisé";
$admtext['hdrfamhistimg'] = "Image d'antécédents familiaux";
$admtext['fhicontext1'] = "Texte 1 de note d'icône";
$admtext['fhicontext2'] = "Texte 2 de note d'icône";
$admtext['fhicontext3'] = "Texte 3 de note d'icône";
$admtext['hdrmostwantedimg'] = "Image des plus recherché";
$admtext['mwlink'] = "Lien des plus recherchés";
$admtext['mwtext'] = "Texte des plus recherchés";
$admtext['hdrresourcesimg'] = "Image des ressources";
$admtext['momheading'] = "Titre du côté de la mère";
$admtext['dadheading'] = "Titre du côté du père";
$admtext['latestnewsheading'] = "Titre de dernières nouvelles";
$text['sitemenu'] = "Menu du Site";


German custom text

For example, the following text provided by Cornelis Kuit, can be used for the German and German-UTF8 cust_text.php

// added for Template Selection - Multi-language Mod
$admtext['contactus1'] = "Kontaktzeile 1";
$admtext['contactus2'] = "Kontaktzeile 2";
$admtext['hdrwelcomeimg'] = "Willkommens Bild";
$admtext['hdrsearchimg'] = "Absatz suchen Bild";
$admtext['srchgendexlink'] = "GENDEX Suchen Link";
$admtext['srchgendextext'] = "GENDEX Suchen Text";
$admtext['hdrfeatphotoimg'] = "Merkmal Foto Bild";
$admtext['hdrfamhistimg'] = "Familien Historien Bild";
$admtext['fhicontext1'] = "Symbolnotiz Text 1";
$admtext['fhicontext2'] = "Symbolnotiz Text 2";
$admtext['fhicontext3'] = "Symbolnotiz Text 3";
$admtext['hdrmostwantedimg'] = "Am häufigsten gesucht Bild";
$admtext['mwlink'] = "Am häufigsten gesucht Link";
$admtext['mwtext'] = "Am häufigsten gesucht Text";
$admtext['hdrresourcesimg'] = "Ressourcen Bild";
$admtext['momheading'] = "Mutter Seite Kopfzeile";
$admtext['dadheading'] = "Vaters Seite Kopfzeile";
$admtext['latestnewsheading'] = "Letzte Nachrichten Kopfzeile";
$admtext['featureheading'] = "Merkmal Kopfzeile";
$text['sitemenu'] = "Webseite Menü";

To display English only

If you are using the Template Settings - Multi-language Mod to create Home pages in different languages, but want to use only English for your Admin >> Setup >> Template Settings, then you should copy the English custom text entries above to each language cust_text.php file. Furthermore, you will need to copy all the $admintxt in the case "templates" section to your other languages cust_text.php as overrides (lines 762-816)

TNG user sites using this mod

  • Please add TNG sites that you have found that utilize this modification
URL User Note Mod-Version/TNG-Version User-language
Our Acadian, French-Canadian, and Maine Ancestors Ken Roy Mod Developer V8.2.0/TNG 8.1.0 on test system
V8.2.1/TNG 8.1.2 on test system
EN, FR
Kuit's Family History Cornelis Kuit ... V8.2.0/TNG 8.1.0 EN, DE, NL
... ... ... ... ...

Related Links

Setup - Template Settings

Home Pages - Multi-Language - TNG V8.1

Templates - Upgrading TNG 8.1

Template Settings - Multi-language Mod