TNG V12 Change Impacts
reCaptcha v2 Included
- History of captcha in TNG is as follows:
- In TNG v6, Brian McFadyen convinced Darrin to add the hooks for a TNG captcha in the Register for User Account and in the Contact Us and Suggest modules. TNG did not provide any of the code to make the captcha work. It only provided the hooks.
- Several different captcha mods were over the years added. First Brian's mod, then Roger Moffat's reCaptcha v1 mod, and then several others. They all use the TNG_captcha.php module which is what the TNG hook calls.
- Each mod distributes their own version of the TNG_captcha.php file. Maybe enough users have complained about getting spam that Darrin finally decided to install a captcha module. In order for the captcha installed in TNG to work, one still needs to request the reCaptcha v2 keys.
- Any other captcha mods can be installed, except Roger's reCaptcha v1 mod since it no longer works, but in order to do so the distributed TNG_captcha.php should probably be renamed to TNG_captcha_v12.php rather than doing a Clean Up in the captcha mod one wants to install (see exception for Image_Captcha v12 below.)
- If you want to use the TNG_captcha.php included with TNG v12, you need to request the reCaptch v2 keys
- If you want to use a different Captcha Mods, with the exception of Image_Captcha v12, you will need to rename the distributed TNG_captcha.php
- Image Captcha v12 modifies the distributed TNG_captcha.php and will restore it upon removal of the mod
Template Settings Table
TNG moved the Template Settings from the templateconfig.php file to a new Templates table in the TNG database - tng_templates
- Several mods that added or modified entries in the templateconfig.php no longer work unless a TNG 12.x version is installed.
- Templates NearDark and NearDawn can be used with installations that have upgraded to TNG 12 (instructions on the Wiki pages). The template support mod NearD Support has been updated to v188.8.131.52-rc1.
To minimize the impact of the Template Settings move to the TNG database, the following steps are recommended as part of the upgrade:
- Copy your templateconfig.php file to a backup location before you do anything else with the upgrade
- Backup your configuration, template files, and TNG database tables
- Uninstall all your TNG Installed mods and Clean Up all Partially Installed mods
- Follow instructions in upgrade readme Step 2 through 5
- Before Step 6 in the upgrade readme, copy the templateconfig.php file you saved in step 1 above back to your config file location
- which could be your TNG root folder or you Config Path folder
- Perform your DB Upgrade
- your templateconfig.php changes should have been copied to the new Template (tng_templates) table
- IMPORTANT. If you want the TNG 11.0 version of Scrollbox mod to work on TNG v12, you need to have followed the above steps. It is recommended to install the TNG 12.0 or TNG 12.01 version of the Mod after completing the upgrade. Also, the Template Manager mod is intended to minimize future issues with mods which alter template settings.
Impact on User Created Pages
If you created user pages years ago from the historytemplate.php file in use at the time, prior to TNG v11, you will be severely impacted by the template settings moved to the tng_templates table because the template variables are not created in the begin.php file like they were previously but rather in the tng_begin.php file where the tng_templates table is now processed.
The old historytemplate.php used
include("begin.php"); include($cms[tngpath] . "genlib.php"); include($cms[tngpath] . "getlang.php"); include($cms[tngpath] . "$mylanguage/text.php"); include($cms[tngpath] . "checklogin.php"); include($cms['tngpath'] . "log.php" );
You need to update all your user created pages to now include the tng_begin.php instead of the begin.php. You will also need to remove the includes that are done in the tng_begin.php file to prevent fatal errors, such as
Fatal error: Cannot redeclare writelog() (previously declared in D:\wamp\www\tng\log.php:2) in D:\wamp\www\tng\log.php on line 143
The new historytemplate.php uses
$cms['tngpath'] = "../"; include( "../tng_begin.php");
Not only do you need to replace the include ("../begin.php"), you need to remove the includes that are now part of tng_begin.php
* //include($cms[tngpath] . "genlib.php"); * //include($cms[tngpath] . "getlang.php"); * //include($cms[tngpath] . "$mylanguage/text.php"); * //include($cms[tngpath] . "checklogin.php"); * //include($cms['tngpath'] . "log.php" );
If you previously commented out the checklogin.php page to allow visitors to view a user created page on a site that requires user login, you can accomplish that in TNG v12 by setting the new $nologin flag to 1 before the include of tng_begin.php as shown in the new historytemplate.php file
//1a: If you want to skip the login check when displaying this page, remote the comment marks from this line: //$nologin = 1;
Update User Records
TNG v12 changed the Edit Profile privilege to correctly reflect that the privilege also controls the user's ability to request a password change. The message now shows Allow to edit user profile and change password
- 72. Users: It was not obvious that a user's ability to edit their profile also controlled the user's ability to request a password change. Text on the Admin/Users pages has now been changed to reflect this.
If you previously did not grant the Edit Profile privilege to your users, you will need to update your User records to check the box in front of Allow to edit user profile and change password if you want your users to be able to request password changes.
jQuery Library Updates
33. Miscellaneous: The jQuery and jQueryUI libraries have been upgraded to versions 3.3.1 and 1.12.1 respectively.
If you use jQuery in some of your personal mods, they may no longer work
The following sites might provide helpful information in upgrading your personal jQuery scripts: