Template Settings uses database table
TNG V12 converts the Template Settings from using the templateconfig.php configuration file to using a Templates table (tng_templates)
- 67. Templates: A new table has been added to store template settings (they will no longer be kept in the templateconfig.php file).
- This should make it harder for bad code and other "accidents" to destroy the current settings.
Impact of this change
Converting the Template Settings from a configuration file to a database table causes major impact to users who used the Mod Manager to maintain and manage their Template Settings. The Mod Manage can no longer make the necessary changes to templateconfig.php and have them displayed in Template Settings.
Moving the Template Settings to a database table means that
- Several mods that added or modified entries in the templateconfig.php no longer work
- the $tmp variables moved from the begin.php to the tng_begin.php file
- The $tmp variable move was to eliminate the need for help screen, and ajax dialogs having to access the database
- unfortunately this means that user-created pages over the last 12 years that use begin.php and other includes instead of tng_begin.php no longer have access to the $temp variables
Minimizing the impact
To minimize the impact of this change, you should
- Save a copy of your templateconfig.php file prior to removing any mods that made changes to this file
- backup your configuration files and database
- Remove all your TNG Mods
- copy your TNG files to your host for doing the upgrade
- copy the saved copy of the templateconfig.php back to the location where you maintain your TNG configuration files prior to running the DB Upgrade script in the upgrade readme file that creates the new Templates (tng_templates) table.
Doing the above will maintain your current changes that you have made to your template Template Settings during the tng_templates table creation. It will not help you with any future changes.
Template Master mod
- Bill Herndon has provided a Template Manager that can be used to unload or save the tng_templates table entry for a template to a temporary _templateconfig.php file, which can then be edited and loaded back to the TNG Template table in the database.
If you used the Scrollbox Mod the above procedure should help you preserve your template settings for that mod. It will not help you add the templates settings necessary to use the Scrollbox Mod with the 3 new templates.
- Erik Hoppe has revised his Scrollbox Mod to add the appropriate template entries to the new Template table
- Note that if you initially included the Scrollbox Mod template parameters in your templateconfig.php for the database update in TNG v12 you will have some clean up to do since the mod for TNG v12 uses different field names
- The Template Manager mod might help you migrate to the new field names
Reverst $temp variables mod
The Revert $tmp variables to TNG v11 mod was created to eliminate the need to immediately update all your user-created pages by putting the $tmp variables back in the begin.php file.
- This mod should be a temporary solution only to allow you time to convert your user-created pages since the mod results in unnecessary database access in TNG Admin scripts and also in warning errors when accessing Help screen.
New Templates Added
- 65. Templates: Three new templates have been added (16, 17 and 18).
Other Template Changes
- 66. Templates: Template lists and dropdowns have been reversed so that the newer templates are listed first.
- 68. Templates: Extra top-row links have been added to templates 11, 13, 14 and 15. These links do not show if no label exists.
- 69. Templates: Templates 1, 2 and 3 now have intro (or "welcome") paragraphs.
- 70. Templates: The links at the bottoms of the home pages for templates 11, 13 and 14 now flow evenly across all columns.
- 71. Templates: Template 15 now has a search form in the top right.