Difference between revisions of "Mod Guidelines - Prior to TNG 10.0.3"

From TNG_Wiki
Jump to navigation Jump to search
(New page: {{Languages}} {|align=right |__TOC__ |} With the Mod Manager now being part of TNG V8, the following Mod Manager Guidelines are proposed for TNG V8 and above: * file name * version * des...)
 
Line 100: Line 100:
 
* languages/English-UTF8  
 
* languages/English-UTF8  
  
so both should be used when constructing a .cfg file since you don't know whether a mod user will be running as ISO-8859-1 or UTF-8
+
You should use '''both''' English and English-UTF8 when constructing a .cfg file since you don't know whether a mod user will be installing your mod on a system running as ISO-8859-1 (English) or UTF-8 (English-UTF8).
 
+
 
=== Containing Foreign Accents ===
 
=== Containing Foreign Accents ===
  

Revision as of 20:52, 19 August 2010

With the Mod Manager now being part of TNG V8, the following Mod Manager Guidelines are proposed for TNG V8 and above:

  • file name
  • version
  • description
  • custom text

Mod File Names

Starting with TNG V8, it is proposed that file names use v8.y.z for the file version number, where

  • v8 is the TNG version
  • y indicates the mod version for this version of TNG, starting with 1.
  • z indicates the mod revision number used when having to make changes to the mod between versions, starting with 0.

For example, living_flag_backup_v8.1.0.cfg since it's the first version of the Backup / Restore Living Flag mod that is compatible with TNG 8. When minor changes are made it would become living_flag_backup_v8.1.1.cfg and for TNG 9 would become living_flag_backup_v9.1.0.cfg.

File names should also use all lower cases since it affects the sort in the Linux hosting environment. While the z portion of the file name was initially indicated as optional, since it affects the collating (or file sort) sequence on Windows where _v8.1.1.cfg would sort before _v8.1.cfg, it was decided to use _v8.1.0.cfg.

Related Mods

Configuration files for related mods can also be named so they sort together rather than by the TNG Wiki article name, for example:

Description File Name TNG Wiki Article
Living Flag Backup / Restore living_flag_backup_v8.1.0.cfg Backup / Restore Living Flag
Living Flag Display living_flag_display_v8.1.0.cfg Living Flag Mod


Related Mods with Install Sequence

and if an install sequence on related mods needs to be designated, it could be entered as media-2 through media-4 as shown as illustrated below (media-1 is not shown since it is obsolete with TNG V8 where Bret Rumsey's Image Viewer is now part of TNG.

Description File Name TNG Wiki Article
Media - Show Table media-2_show_table_v8.1.0.cfg ShowTable Mod
Media - Body Text for Translation media-3_body_text_V8.1.0.cfg Body Text for Translation
Media - Tooltip media-4_tooltip_v8.1.0.cfg Tooltip Mod
Media - Image Map Message media-5_image_map_msg_v8.1.0.cfg Image Map Message Mod

Note that TNG Wiki article redirects can also be created as was done for the above media mods.

Subfolder for additional files

If a mod contains more than one file that needs to be copied from the mods folder during the Mod Manager install, it is recommended that a subfolder with the same name as used on the .cfg file but excluding the version number be used to contain the files that are copied so they will group together in the mods folder. So for example

  • gmaps_add_4_placelevels
  • gmaps_add_4_placelevels_V8.1.0.cfg

for the folder containing the extra files and the .cfg file so that both sort together in the "mods" folder. Not having the version number in the sub-folder name will make it easier to keep the mod updated and prevent cluttering with folders all similarly named when only 1 is needed.

Version number

%version: V8.y.z% should be used for new config files to identify that the mod applies to TNG V8 where y is the mod version and z is the mod revision. The first version of a mod should be identified by %version: V8.1.0%

Note that if you include %newfile you should also update the version numbers in those new files being added.

Description

The %Description: statement should be kept as brief as possible.

If there are actions that must be taken after installation of the mod, these should be documented in the TNG Wiki article, such as shown in After Installation Actions for the Template Settings - Multi-language Mod

Custom Text

Both English folders

If your mod provides custom text, you must provide the $text variables for both

  • languages/English/cust_text.php
  • languages/English-UTF8/cust_text.php

Note that the cust_text.php is no longer in the English directory, but is now in the

  • languages/English
  • languages/English-UTF8

You should use both English and English-UTF8 when constructing a .cfg file since you don't know whether a mod user will be installing your mod on a system running as ISO-8859-1 (English) or UTF-8 (English-UTF8).

Containing Foreign Accents

While this is not a TNG V8 change, but was discovered during testing, if you create custom text that includes foreign accented characters, you should use the HTML special character so that the change can be installed in both the French and French-UTF8 cust_text.php for example and display correctly whether you are using ISO-8859-1 or UTF-8 for your TNG charset.

The issue is that if you create the mod as ANSI encoded, the accented characters will be mangled when installing on a UTF-8 TNG site and vice versa if you encode the mod as UTF-8 without BOM it will get mangled on an ISO-8859-1 TNG site. Using the HTML special characters avoids the mangling if an ANSI encoded file is installed on a UTF-8 environment.

The alternative is creating both an ANSI and UTF-8 file, which is probably a valid alternative for installing cust_text.php changes for your own site languages that you are not publishing.