Difference between revisions of "NearDark Template"

From TNG_Wiki
Jump to navigation Jump to search
 
(124 intermediate revisions by 4 users not shown)
Line 4: Line 4:
  
 
== Purpose ==
 
== Purpose ==
Soon after I started using TNG to host [http://wherndon.net/genealogy Lindell-Herndon Genealogy], I created a pair of templates derived from Template 8 called ''NearDark'' and ''[[NearDawn Template|NearDawn]]''. Since then I've been contacted by a number of TNG users who have asked if they can use my templatesUnfortunately, not having the time to really do all the necessary CSS updates, my templates depended on 5 TNG mods to achieve the effects I wanted, and this made them impractical for most users.  Now I've finished the CSS work, and my templates depend on only a single mod, [[Icon Gravity]].  So I've decided to publish them for anyone to use.
+
NearDark is a 'drop-in' alternative to Template 8 that has a brighter, higher contrast, color palette, more legible fonts, conserves space better, and comes with a number of useful features that support customization without changing any PHP code.  Mom and Dad Side links from Template 8, surname clouds from Template 12, and scrollable content sections can all be customized in template settings or turned off entirelyThe template is internationalized and supports Danish, Dutch, English, French, German, Italian, Norwegian, Portuguese, Spanish, and Swedish out-of-the-box.  
  
== Developer ==
+
A new installation mod, [[NearD_Support|NearD Support]], can be used to make all the required changes to templateconfig.php and the language support files without editing.  Left-side icon/link clustering, which used to be supported by the [[Icon_Gravity|Icon Gravity]] Mod, is included as part of the installation.
 +
 
 +
The designer's own genealogy site, [http://lindell-herndon.org Lindell-Herndon Genealogy], uses a variant of NearDark that incorporates ad banners and his own custom footers.
 +
 
 +
== Designer ==
 
[[User:wrherndon|Bill Herndon]]
 
[[User:wrherndon|Bill Herndon]]
  
== Requirements ==
+
== Download ==
* A working TNG installation (10.0.2 - 10.1.1)
+
[https://lindell-herndon.org/templates/tmplt-near-dark-v12.0.0.3a.zip v12.0.0.3a] for TNG 12.0 through TNG 13.0.<br/>
 +
[https://lindell-herndon.org/templates/tmplt-near-dark-v10.1.0.3a.zip v10.1.0.3a] for TNG 10.1.0 through 11.1.2.
 +
 
 +
An incompatibility exists between the NearDark and NearDawn templates and TNG versions after 13.0 (i.e., 13.0.2 and 13.0.3). Named, rather than numbered, templates that use the pre-TNG 12 naming style for their root directory, are no longer loaded by page admin_templateconfig.php. Consequently, those templates cannot have their parameter values changed, and cannot be activated. Please page down to the [[NearDark Template#Compatibility|Compatibility]] section for a temporary fix.
  
 
== Installation ==
 
== Installation ==
* Download the .zip file to your template directory and unpack it.   
+
=== Installing in TNG 12 ===
* Edit your templateconfig.php file adding the code in the box below. (These variables are really just placeholders for the parameters you can set in Template => Setup):
+
TNG 12 makes a change to how template configuration parameters are storedRather than using a file, parameters are stored in the TNG database.  Consequently, a method of loading template data into the database is needed. The [[Template Manager]] mod is used for this purpose.  [[NearDark Template|NearDark]] for TNG 12 also requires an appropriate version of the [[NearD Support]] mod.  To install [[NearDark Template|NearDark]] in TNG 12 follow these steps:
<pre>
+
# Download and unzip [[NearD Support]] v12.0.0.3 (or later) and install it using the the [[Mod Manager]].
$tmp['tNearDark_headtitle1'] = "NearDark";
+
# Download and and unzip the [[Template Manager]] and install it using the [[Mod Manager]].
$tmp['tNearDark_headtitle2'] = "Template";
+
# Download the NearDark .zip file (v12.0.0.3a or later) and unzip the template to your TNG ''templates'' folder.
$tmp['tNearDark_headtitle3'] = "";
+
# Using the administration screen ''Setup => Templates'' to choose NearDark in ''Templates Available'' and click ''Load''.
$tmp['tNearDark_headsubtitle'] = "Mom's family, Dad's family, and a whole bunch o' other families.";
+
# Choose NearDark and activate it.
$tmp['tNearDark_headimg'] = "img/titletop.jpg";
+
 
$tmp['tNearDark_momside'] = "Mom's Side";
+
=== Upgrading to TNG 12 ===
$tmp['tNearDark_momsidenames'] = "Smith/Jones";
+
TNG users upgrading to TNG 12 from previous releases can continue to use [[NearDark Template|NearDark]] and [[NearDawn Template|NearDawn]] by following this procedure:
$tmp['tNearDark_momperson'] = "I1";
+
# Copy your templateconfig.php to a location outside of the TNG directory prior to the upgrade.
$tmp['tNearDark_momtree'] = "mytreeid";
+
# Uninstall the [[NearD Support]] mod.  (This may require a 'cleanup', but since you'll be restoring the templateconfig.php file momentarily, it doesn't matter.
$tmp['tNearDark_dadside'] = "Dad's Side";
+
# Copy the templateconfig.php file you saved in step 1 back to the TNG directory.
$tmp['tNearDark_dadsidenames'] = "Johnson/Williams";
+
# Continue with a normal TNG 12 upgrade. (The TNG upgrade will read the templateconfig.php file as part of the upgrade and install all of the template parameters, including parameters from NearDawn and NearDark.)
$tmp['tNearDark_dadperson'] = "I2";
+
# Install [[NearD Support]] v12.0.0.3 (or later).  This version of the support mod will add the appropriate template functionality without making changes to the templateconfig.php file.
$tmp['tNearDark_dadtree'] = "mytreeid";
+
 
$tmp['tNearDark_mainpara'] = "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam pharetra, tellus sit amet congue vulputate, nisi erat iaculis nibh,
+
=== Installing in TNG 10.1.0 through 11.1.2 ===
vitae feugiat sapien ante eget mauris. Pellentesque ac felis tellus. Aenean sollicitudin imperdiet arcu, vitae dignissim est posuere id.
+
The support mod [[NearD Support]] makes all the required changes to templateconfig.php and the language support files without editing. Left-side icon/link clustering, which used to be supported by the [[Icon Gravity]] mod, is included as part of [[NearD Support]]. Follow these installation steps:
Duis placerat justo eu nunc interdum ultrices. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam pharetra, tellus sit amet
+
# Download the NearDark .zip file and unzip the template to your TNG ''templates''folder.
congue vulputate, nisi erat iaculis nibh, vitae feugiat sapien ante eget mauris. Pellentesque ac felis tellus. Aenean sollicitudin
+
# Download and unzip [[NearD Support]] v10.1.0.3 and install it using the [[Mod Manager]].
imperdiet arcu, vitae dignissim est posuere id. Duis placerat justo eu nunc interdum ultrices.</p>";
+
# Using the administration screen ''Setup => Templates'' to choose NearDark and activate it.
$tmp['tNearDark_latestnews'] = "<p><b>Today</b> - You switch to the most stupendous template every designed for TNG.</p>
+
 
<p><b>25 Dec 2008</b> - Years and years of family research result in a compilation without equal.</p>
+
== Features ==
<p><b>1 Jan 2003</b> - Darrin invents TNG, the be-all and end-all of genealogy software.</p>
+
=== Mom's Side / Dad's Side Links ===
<p><b>5 May 1821</b> - Napolean dies in exile on St. Helena.</p>
+
This is same feature supported by Template 8 but with the ability to turn it on and off from template settings. The heading for each can also be set in template settings.
<p><b>19 Oct 1781</b> - Blaming, \"...that burrito I had last night,\" Lord Cornwallis sends an aide to surrender his sword after Yorktown.</p>
 
<p><b>1013</b> - Sweyn Forkbeard invades England and Aethelred II \"The Unready\" flees to Normandy.</p>
 
<p><b>21 Apr 612</b> - Sir Robin bravely runs away.</p>
 
<p><b>15 Mar 44 BCE</b> - Julius Caesar murdered.</p>";
 
</pre>
 
  
== Compatibility ==
+
=== Surname Cloud ===
This template should also work for TNG r9, but I have not tested it, and since it was updated to incorporate the most recent updates to Template 8, the template should also be mobile compatibleHowever, if you find any issues, especially on mobile devices, please let me know.
+
This is the same feature supported by Template 12.  The number of surnames displayed can be set in template settings, and the feature can also be turned on or off.  When turned off, the template will recalculate distances so that the home page maintains the same approximate sizeThe default number of surnames is 40, and the template is sized to handle up to 50 surnames when scrollable content (see below) is turned on.
  
Add any other compatibility issues here.
+
=== Scrollable Content ===
 +
By default, this feature is turned on and causes the index page's three main content sections to scroll their content while maintaining a maximum size.  Turning the feature off in template settings will cause the page height to accommodate all content without scrolling.
  
== Notes and Caveats ==
+
=== Three-part Headers ===
None
+
Three-part headers from Template 8 are supported.
  
== Features ==
+
=== Internationalization ===
The template is designed to be a cleaner version of Template 8 that conserves space somewhat better.  Use of the [[Icon Gravity]] Mod isn't required but produces a more pleasing, less cluttered, appearanceThe template supports the ''Moms Side'' and ''Dads Side'' links, news, main paragraph, and 3-part header features from Template 8.
+
NearDark is fully localized for Danish, Dutch, English, French, German, Italian, Norwegian, Portuguese, Spanish, and Swedish out-of-the-box, and many page items can be changed by the userFor example the 'Site Menu' has default settings for each of the supported languages, but these can be changed by the user in template settings.
  
Almost all effects, with the exception of icon clustering, are achieved through the use of CSS.  So you have a fair amount of freedom to tinker with the presentation.  For an alternate color palette, but one that has the same features, check out [[NearDawn Template|NearDawn]].
+
=== NearDawn Palette ===
 +
For an alternate color palette, but one that has all the same features, check out [[NearDawn Template|NearDawn]].
  
 
== Preview ==
 
== Preview ==
  
[[File:NearDark-preview1.jpg]]&nbsp;&nbsp;&nbsp;[[File:NearDark-preview2.jpg]]
+
=== NearDark ===
 +
[[File:NearDark-home.jpg|300px]]&nbsp;&nbsp;&nbsp;[[File:NearDark-indi.jpg|300px]]
 +
 
 +
(Click for full size views.)
 +
 
 +
=== Template 8 ===
 +
[[File:template8-1.jpg]]&nbsp;&nbsp;&nbsp;[[File:template8-2.jpg]]
 +
 
 +
== Requirements ==
 +
* A working TNG installation (10.1.0 - 12.0).
 +
* The support mod [[NearD Support]] for functions supporting icon clustering and internationalization (TNG 10.1.0 - 12.0)
 +
* The mod [[Template Manager]] for installing the template's parameters in the TNG database (TNG 12.0).
 +
 
 +
== Compatibility ==
 +
 
 +
=== TNG v9.0 and Earlier ===
 +
 
 +
Unlike the previous version, this version of [[NearDark]] probably won't work with TNG r9.  The template should, however, be mobile compatible, but if you find any issues, especially on mobile devices, please let me know.
 +
 
 +
=== TNG v13.0.2 and v13.0.3 ===
 +
 
 +
A short term fix for the compatibility issue between the NearDark and NearDawn templates and TNG versions after 13.0 is to modify line 27 of file admin_templateconfig.php from:
 +
<pre>
 +
if( is_dir($cms['tngpath'] . "templates/template" . $row['template']) ) {
 +
</pre>
 +
... to:
 +
<pre>
 +
        if( is_dir($cms['tngpath'] . "templates/template" . $row['template'])
 +
            || is_dir($cms['tngpath'] . "templates/" . $row['template'])) {
 +
</pre>
 +
A more permanent fix may be available in a future TNG release.
 +
 
 +
== Notes and Caveats ==
 +
(None)
  
 
== Revision History ==
 
== Revision History ==
Line 68: Line 105:
 
! Comments
 
! Comments
 
|- valign="top"
 
|- valign="top"
| [http://wherndon.net/genealogy/templates/tmplt-near-dark-v10.1.0.0.zip v10.1.0.0]
+
| [http://lindell-herndon.org/templates/tmplt-near-dark-v12.0.0.3a.zip v12.0.0.3a]
 +
| 19 May 2018
 +
| Incorporates mobile site enhancements introduced in TNG 11 and adds the local template configuration file for use with the [[Template Manager]] mod.  Users installing NearDark for the first time with TNG 12 must use this version of the mod.
 +
|- valign="top"
 +
| [http://lindell-herndon.org/templates/tmplt-near-dark-v10.1.0.3a.zip v10.1.0.3a]
 +
| 26 Mar 2018
 +
| Corrects a global variable issue in footer.php that can cause a memory leak when TNG is run on PHP 7.0+.
 +
|- valign="top"
 +
| [http://lindell-herndon.org/templates/tmplt-near-dark-v10.1.0.3.zip v10.1.0.3]
 +
| 20 Jun 2017
 +
| Added language support for Dutch, Danish, French, Italian, Norwegian, Portuguese, and Swedish.  Also updated default values for configurable page titles and menus (all languages) and tested with TNG release 11.1.1.
 +
|- valign="top"
 +
| [http://lindell-herndon.org/templates/tmplt-near-dark-v10.1.0.2.zip v10.1.0.2]
 +
| 30 Oct 2016
 +
| Makes some minor changes to the index page to align menus and photographs.  Adds built-in support for Spanish and German.  Now supports turning off scrollable content in template configuration, and has been tested to work with the new installation mod, [[NearD_Support|NearD Support]].
 +
|- valign="top"
 +
| [http://lindell-herndon.org/templates/tmplt-near-dark-v10.1.0.1.zip v10.1.0.1]
 +
| 27 Feb 2016
 +
| This update brightens the color palette, adds the ability to turn the ''Mom's Side'' and ''Dad's Side'' on or off from the template settings, and adds the ''Surname Cloud'' feature from Template 12.  The default font has been changed to Tahoma for readability, and most emboldened titles have been removed.
 +
|- valign="top"
 +
| v10.1.0.0
 
| 17 Jul 2015
 
| 17 Jul 2015
 
| Initial release
 
| Initial release
Line 82: Line 139:
 
! Template Version
 
! Template Version
 
! TNG Version
 
! TNG Version
 +
! Language(s)
 
|-
 
|-
| [http://wherndon.net/genealogy Lindell-Herndon Genealogy]
+
| [http://8smithkids.com/ Schmidt - Herbert Genealogy]
| [[User:wrherndon|Bill Herndon]]
+
| Mike (?)
| Template designer
+
| Private site
| 10.1.0.0
+
| 12.0.0.3a
| 10.1.1
+
| 12.0.1
 +
| EN
 +
|-
 +
| [http://genealogy.ravensbeak.com/ Mueller Diefenbach Heritage Pages]
 +
| Bob Mueller
 +
| Public site
 +
| 12.0.0.3a
 +
| 12.0.3
 +
| DE, EN
 +
|-
 +
|}
  
|}
+
[[Category:Mods for TNG v10]]
 +
[[Category:Mods for TNG v11]]
 +
[[Category:Mods for TNG v12]]
 +
[[Category:Mods for TNG v13]]
  
 +
[[Category:Themes]]
 
[[Category:Templates]]
 
[[Category:Templates]]
 +
 +
[[Category:Cust text.php English mods]]
 +
[[Category:Cust text.php Danish mods]]
 +
[[Category:Cust text.php Norwegian mods]]
 +
[[Category:Cust text.php French mods]]
 +
[[Category:Cust text.php Czech mods]]
 +
[[Category:Cust text.php German mods]]
 +
[[Category:Cust text.php Spanish mods]]
 +
[[Category:Cust text.php Dutch mods]]
 +
[[Category:Cust text.php Italian mods]]
 +
[[Category:Cust text.php Portuguese mods]]
 +
[[Category:Cust text.php Swedish mods]]

Latest revision as of 14:21, 17 June 2023

Purpose

NearDark is a 'drop-in' alternative to Template 8 that has a brighter, higher contrast, color palette, more legible fonts, conserves space better, and comes with a number of useful features that support customization without changing any PHP code. Mom and Dad Side links from Template 8, surname clouds from Template 12, and scrollable content sections can all be customized in template settings or turned off entirely. The template is internationalized and supports Danish, Dutch, English, French, German, Italian, Norwegian, Portuguese, Spanish, and Swedish out-of-the-box.

A new installation mod, NearD Support, can be used to make all the required changes to templateconfig.php and the language support files without editing. Left-side icon/link clustering, which used to be supported by the Icon Gravity Mod, is included as part of the installation.

The designer's own genealogy site, Lindell-Herndon Genealogy, uses a variant of NearDark that incorporates ad banners and his own custom footers.

Designer

Bill Herndon

Download

v12.0.0.3a for TNG 12.0 through TNG 13.0.
v10.1.0.3a for TNG 10.1.0 through 11.1.2.

An incompatibility exists between the NearDark and NearDawn templates and TNG versions after 13.0 (i.e., 13.0.2 and 13.0.3). Named, rather than numbered, templates that use the pre-TNG 12 naming style for their root directory, are no longer loaded by page admin_templateconfig.php. Consequently, those templates cannot have their parameter values changed, and cannot be activated. Please page down to the Compatibility section for a temporary fix.

Installation

Installing in TNG 12

TNG 12 makes a change to how template configuration parameters are stored. Rather than using a file, parameters are stored in the TNG database. Consequently, a method of loading template data into the database is needed. The Template Manager mod is used for this purpose. NearDark for TNG 12 also requires an appropriate version of the NearD Support mod. To install NearDark in TNG 12 follow these steps:

  1. Download and unzip NearD Support v12.0.0.3 (or later) and install it using the the Mod Manager.
  2. Download and and unzip the Template Manager and install it using the Mod Manager.
  3. Download the NearDark .zip file (v12.0.0.3a or later) and unzip the template to your TNG templates folder.
  4. Using the administration screen Setup => Templates to choose NearDark in Templates Available and click Load.
  5. Choose NearDark and activate it.

Upgrading to TNG 12

TNG users upgrading to TNG 12 from previous releases can continue to use NearDark and NearDawn by following this procedure:

  1. Copy your templateconfig.php to a location outside of the TNG directory prior to the upgrade.
  2. Uninstall the NearD Support mod. (This may require a 'cleanup', but since you'll be restoring the templateconfig.php file momentarily, it doesn't matter.
  3. Copy the templateconfig.php file you saved in step 1 back to the TNG directory.
  4. Continue with a normal TNG 12 upgrade. (The TNG upgrade will read the templateconfig.php file as part of the upgrade and install all of the template parameters, including parameters from NearDawn and NearDark.)
  5. Install NearD Support v12.0.0.3 (or later). This version of the support mod will add the appropriate template functionality without making changes to the templateconfig.php file.

Installing in TNG 10.1.0 through 11.1.2

The support mod NearD Support makes all the required changes to templateconfig.php and the language support files without editing. Left-side icon/link clustering, which used to be supported by the Icon Gravity mod, is included as part of NearD Support. Follow these installation steps:

  1. Download the NearDark .zip file and unzip the template to your TNG templatesfolder.
  2. Download and unzip NearD Support v10.1.0.3 and install it using the Mod Manager.
  3. Using the administration screen Setup => Templates to choose NearDark and activate it.

Features

Mom's Side / Dad's Side Links

This is same feature supported by Template 8 but with the ability to turn it on and off from template settings. The heading for each can also be set in template settings.

Surname Cloud

This is the same feature supported by Template 12. The number of surnames displayed can be set in template settings, and the feature can also be turned on or off. When turned off, the template will recalculate distances so that the home page maintains the same approximate size. The default number of surnames is 40, and the template is sized to handle up to 50 surnames when scrollable content (see below) is turned on.

Scrollable Content

By default, this feature is turned on and causes the index page's three main content sections to scroll their content while maintaining a maximum size. Turning the feature off in template settings will cause the page height to accommodate all content without scrolling.

Three-part Headers

Three-part headers from Template 8 are supported.

Internationalization

NearDark is fully localized for Danish, Dutch, English, French, German, Italian, Norwegian, Portuguese, Spanish, and Swedish out-of-the-box, and many page items can be changed by the user. For example the 'Site Menu' has default settings for each of the supported languages, but these can be changed by the user in template settings.

NearDawn Palette

For an alternate color palette, but one that has all the same features, check out NearDawn.

Preview

NearDark

NearDark-home.jpg   NearDark-indi.jpg

(Click for full size views.)

Template 8

Template8-1.jpg   Template8-2.jpg

Requirements

  • A working TNG installation (10.1.0 - 12.0).
  • The support mod NearD Support for functions supporting icon clustering and internationalization (TNG 10.1.0 - 12.0)
  • The mod Template Manager for installing the template's parameters in the TNG database (TNG 12.0).

Compatibility

TNG v9.0 and Earlier

Unlike the previous version, this version of NearDark probably won't work with TNG r9. The template should, however, be mobile compatible, but if you find any issues, especially on mobile devices, please let me know.

TNG v13.0.2 and v13.0.3

A short term fix for the compatibility issue between the NearDark and NearDawn templates and TNG versions after 13.0 is to modify line 27 of file admin_templateconfig.php from:

	if( is_dir($cms['tngpath'] . "templates/template" . $row['template']) ) {

... to:

        if( is_dir($cms['tngpath'] . "templates/template" . $row['template'])
            || is_dir($cms['tngpath'] . "templates/" . $row['template'])) {

A more permanent fix may be available in a future TNG release.

Notes and Caveats

(None)

Revision History

Version Release Date Comments
v12.0.0.3a 19 May 2018 Incorporates mobile site enhancements introduced in TNG 11 and adds the local template configuration file for use with the Template Manager mod. Users installing NearDark for the first time with TNG 12 must use this version of the mod.
v10.1.0.3a 26 Mar 2018 Corrects a global variable issue in footer.php that can cause a memory leak when TNG is run on PHP 7.0+.
v10.1.0.3 20 Jun 2017 Added language support for Dutch, Danish, French, Italian, Norwegian, Portuguese, and Swedish. Also updated default values for configurable page titles and menus (all languages) and tested with TNG release 11.1.1.
v10.1.0.2 30 Oct 2016 Makes some minor changes to the index page to align menus and photographs. Adds built-in support for Spanish and German. Now supports turning off scrollable content in template configuration, and has been tested to work with the new installation mod, NearD Support.
v10.1.0.1 27 Feb 2016 This update brightens the color palette, adds the ability to turn the Mom's Side and Dad's Side on or off from the template settings, and adds the Surname Cloud feature from Template 12. The default font has been changed to Tahoma for readability, and most emboldened titles have been removed.
v10.1.0.0 17 Jul 2015 Initial release

Sites Using NearDark

If you download and install this template, please add your TNG site to the table below.

URL User Note Template Version TNG Version Language(s)
Schmidt - Herbert Genealogy Mike (?) Private site 12.0.0.3a 12.0.1 EN
Mueller Diefenbach Heritage Pages Bob Mueller Public site 12.0.0.3a 12.0.3 DE, EN