Making Changes to TNG

From TNG_Wiki
Jump to navigation Jump to search

When making changes to TNG you should keep in mind the following:

  • any change you make to TNG code files might be regressed with a TNG upgrade and will be regressed with a new release
  • any change you make to the following files might also be regressed, if you decide to do a full install rather than an upgrade next time:
    • configuration files
    • style sheets
    • custom text

Before making changes

Read the help screens on the Admin side to see what is already configurable and the Category:Setup on the TNG Wiki to see what can be controlled by changing the options with TNG itself.

Read the articles on the TNG Wiki in the Category:Getting_Started, Category:Templates, and Category:How TNG Works to understand how TNG generates its pages and how you might influence what gets generated.

If you are messing around changing files, always:

  • work on a copy of the file so that you can restore a known good one when something goes wrong
  • document the changes you make so that you can recreate your changes if they get regressed by a TNG upgrade or new release
  • test your changes, consider using a local computer web server environment, such as
    • WampServer or XAMPP on Windows platform, or
    • the built-in capability or MAMP on Macintosh platform
or use the copy and rename files capability of your cPanel or FTP Client

You should use an ASCII text editor to make your changes:

Using TNG Overrides

TNG provides some documented capabilities for tailoring style sheet definitions and language text displayed that will survive TNG upgrades and new releases. See the following TNG Wiki articles on

Use the TNG override capabilities to make and document your changes:

  • mytngstyle.css to override style sheet definitions
  • cust_text.php to override $text variables
  • Mod Manager to override code snippet changes

mytngstyle.css

If you're changing styles on things, this should be done in the file mytngstyle.css by copying the block you want to modify from genstyle.css and pasting it into mytngstyle.css and making the changes there. This prevents you losing the changes when there is an upgrade to TNG

The style definitions in templatestyle.css override those provided in genstyle.css for the specific template you select to use.

The style definitions in mytngstyle.css override those provided in

  • genstyle.css,
  • templatestyle.css, and
  • tngtabs1.css or tngtabs2.css

cust_text.php

Likewise, the $text changes made in your cust_text.php file to the $admtext and $text variables override those found in the files

  • admintext.php,
  • alltext.php,
  • text.php

in each language folder.

Documenting your changes

You should always document any and all changes you make to TNG. You can use:

Related Links

See also:

Troubleshooting Changes and the Category:Troubleshooting

Reporting Problems

Templates - Explained and the Category:Templates

Templates - Overriding

Setup - Site Design and the Category:Setup