Trainz/Templates
This page is part of Wikibooks Trainz Wikibook Administration. |
Preface
edit- This page is in the Category:Trainz Admin 'where all tools and special guidelines for Trainz will now be found! Questions: Post to: FrankB
- If you don't know how to do something... Ask! (Skype is frank.a.bartus for ease of speed and clear communications.) I've got 60-70,000 edits on nine WikiMedia projects like this and am a fair template coder.
- more suited to our Trainz needs and a comprehensive category system is mostly now in place!
The first section of this page contains in-line templates, the second special box display templates, most of which make a box with data within.
- 2014-0918 Wikibooks...
- List of templates recently worked on (Latest Revision)
- space tagging templates
- utility and auto-categorizing mix
- Template:Trainz-stub
- Template:TRS-style
- Template:TRS-SubSubPg
- Template:TRS-sectstub
- Template:Trainz-stub
- Template:FAB-todo
- Template:R from Trainz
- Template:Trainz-sect-stub
- Template:Trainz-admin
- Template:Trainz-ref-page
- Template:Trainz-ref
- Template:Trainz-Admin
- Template:Trainz-page - (Fabartus moved page Template:Trainz-ref-page to Template:Trainz-page: reusing title for another admin template, this makes both more 'useable' and intuitive') (current) [rollback more than 10 edits]
- Template:Tre
Page header and footer templates
edit- The most useful templates for general editing are in the next section following. Administration templates have been now listed last. This first group should have one representative on each page top and bottom respectively, and the header templates will shortly have the capability to thread page to page passing a convenient linking template (next section) with pretty-print code for each pass parameter.
- Note this list mostly matches templates in use on the TrainzOnline pages
- The 'FUN' one's marked depreciated aren't used here
- Template:AM&C-top + Template:AM&C-bot - This is the workhorse for intermediate materials pages, such as Error Fixing, Windows application's HowTo, general theory and background (e.g. containers) and other introductory to intermediate knowledge topics.
- Template:FUN-top + Template:FUN-bot - This is the workhorse for introductory material, use AM&C templates for intermediate materials pages, and CC pages templates for advanced tutorials on Content Creation.
- Template:FUN-beg + Template:FUN-end - both depreciated
- Template:ORP-top + Template:ORP-bot - This is the workhorse for TrainzOnline enhanced materials and examples pages. Asset modification pages should be in AM&C or CC divisions; all pages in the references TOC should be technical references, not HowTo pages.
- The template pair is also used to tag Appendix pages, appropriate switches being passed.
Template:TRScc-top + Template:TRScc-bot - This is the workhorse for Advanced material, use AM&C templates for intermediate materials pages. HowTo use Blender or Gmax basics belong in AM&C, other more refined instructionals in the CC pages.
- last there is: Template:TRS-page - depreciated; but one way to thread pages, Prev= '1', Next= '2', Thread Start (center link)= '3'(Main page is default, '4' =Main TOC, default is Trainz, or {{BASEPAGENAME}}, the Wikibook division TOC. The latter two can instead be used to fork navigation* TRS-page's logic and function have been worked into the header templates, which box the top of page links, while they looked unsightly floating above the header template.
Be advised this new Trainz Wikibooks topic page is rough and incomplete. It was last edited on 3 August 2021, and is still under heavy construction. This Page UNDERCONSTRUCTION: Content here is likely to be changed significantly in a short amount of time. All Trainzer's and Wikibookians with knowledge in this subject are welcome to help out. You can remove this tag and replace it with {{Trainz-stub}} or with section stub templates ({{Trainz-sect-stub}}) on unfinished sections when the 'page' has become more mature. |
Internal Link Templates
editThe two biggest time savers in this group link to the [[Trainz/refs/Notations#{{{1}}}|{{{1}}}]] and [[Trainz/Glossary#{{{1}}}|{{{1}}}]] pages.
- Template:TL
- Template:TA
- Template:Col
- Template:TR
- Template:Kp
- Template:TG
- Template:TOL
- Template:Center
- Template:N3V
- Template:Larger
- Template:Wp
Editorial Aid Templates
edit- Aka, typing-aid templates
These templates are used in-line to create links and display effects. They use mnemonic names, a standardized syntax necessary to simplify evaluation of the message on a page, on the one hand (Very short names and short, but consistent command parameter names or orders) and obviate the need for hiding subpage paths or displaying full paths for such pages on the other.
- They also support sub-subpages, and a uniform pipetrick ability if an pretty-text override is in order to satisfy prose composition.
- These features have been built-in to the several external link templates as much as possible as well
- but Unicode and underscores in navigation must usually require a direct pretty-print override where the url has Unicode characters.
- Several external link templates use syntax that allows directly linking to TrainzOnline Wiki pages, while a more general template allows pretty links to other (3rd party tutorials, for example) websites.
Simple internal links
edit
- general rule
External Linking templates that include whitespace in the link forming parameter (the first part separated by '|' characters after the template name itself need to have UNDERSCORE characters instead of spaces.
- Make sure to test such links, especially external links before thinking your job is done.
- If you external link to another wiki such as Wikipedia or TrainzOnline, and the link uses a redirected page name, formulate the call to the proper full article name so it doesn't get disconnected if the redirected page title gets changed.
- The exception to this is the N3V Wiki pages using double-quotes in their titles. In such a case, use the page title without the quotes, and if necessary, create a redirect page on that wiki.
- {{N3V}} — the workhorse of external linking to the N3V Wiki.
- 1st argument is the page after 'url'
{{N3V|trainz-build|trainz-build tag version}}
will appear as trainz-build tag version
- and symbolically link externally as longform:
{{plainlinks | {{{1}}} | {{{2}}} }}
so is the same as the longer wikimarkup external link:
- and symbolically link externally as longform:
<span class="plainlinks"
>[http://online.ts2009.com/mediaWiki/index.php/Trainz-build {{{2}}}]
</span>- and literally form the link
{{plain link|Trainz-build|Trainz-build tag version}}
.
- and literally form the link
- Internal simple links
-
{{TL|Content Manager|Content Manager}}
will appear as Content Manager- and symbolically link to a subpage as longform:
[[Trainz/{{{1}}} | {{{2}}} ]]
- and literally form the link
[[Trainz/ContentManager|Content Manager]]
forming a link to a direct sub-page of the Trainz Main Page.
- and symbolically link to a subpage as longform:
Similarly, {{TA}} forms a link to a sub-page off Trainz/AM&C AND {{TC}} forms a link to a sub-page off Trainz/Content Creation. But {{TR}} (references) and {{TG}} (glossary link) use an intermediate argument/pass parameter to modify the parsing.
Not-so simple links
editIn organizing to group pages, simple linking templates were contraindicated once pages needed several sub-page levels and breaking the project into volumes only eliminated at most one such level. This spawned a new breed of template, which has some 'filtering smarts' or complimnetary coding to generate the desired links.
{{TG|Ca_to_Ez|Content Manager Plus}}
(links to major section title in the Trainz Glossary) will appear as Content Manager Plus- and symbolically link as longform:
[[Trainz#{{{1}}} | {{{2}}} ]]
- so is the same as the longer: [[Trainz/Glossary#Ca_to_Ez|Content Manager Plus]]
- and symbolically link as longform:
{{TR|R|Content Manager}}
will appear and link as Content Manager Plus- and symbolically link to a subpage as longform:
[[Trainz_references/{{{1}}} | {{{2}}} ]]
- so is the same as the longer: [[Trainz_references/{{{1}}} | {{{2}}} ]]
- and symbolically link to a subpage as longform:
- void hidden text follows
The next lines Are obsolescent...
- so not current planning, error fixing will be in Trainz AM&C volume. Error fixing will likely be Trainz AM&C/Trainz_Error_Fixing.
{{Tre|The Tag|is not permitted}}
will appear as Template:Tre... other text hidden pending reworking schema
- void ends
{{Tws|Notepad++ in Trainz}}
(Trainz Windows Application skills section title) will appear as Template:Tws- and symbolically link to a 'Notepad++ in Trainz' section of the reference page Trainz references/Windows_skills as longform:
[[Trainz references/Windows_skills#{{{1}}} | {{{2}}} ]]
- and symbolically link to a 'Notepad++ in Trainz' section of the reference page Trainz references/Windows_skills as longform:
{{wp|Trainz|Trainz Article}}
will appear as Trainz Article and symbolically link as longform:
[[w:Trainz|Trainz Article]]
to a Wikipedia article.
plain link
edit{{plain link|full url of link|Pretty text}}
'Plain link' forms a full external link for use in-line with a 'pretty print' text replacement.
An example:
The Trainz asset technology level is found in each assets' config.txt file and is called a "Trainz-build" tag number or sometimes the 'version number' which is strongly related to but different (it's directly dependent—since trainz-build tag value is defined by the code build of CCP when the asset is created. Both your actual software installed version (see titlebar of Post TS09-SP0 for this version number) and the asset's trainz-build are usually different) from the 'code build number or code version', which identifies the specific mix of software modules uniquely, also called the 'software build number' that is listed on each launcher screen.
|
|
Notes about external links
edit
|
Editing, temp section
editLINKS CONTAINING THESE WILL NOT FORM A PROPER LINK as ASCII
' " '
characters in Wikimedia software parsing. The field breaks when one is encountered. Hoover your mouse tooltip over and compare:
- Proper full link: script-include-table_container
- and is the literal:
<span class="plain links">[http://online.ts2009.com/mediaWiki/index.php/%22script-include- able%22_container script-include-table_container]</span>
(Full manual essence plain link would form)
- Hoover and Compare: "script-include-table"_container script-include-table_container which fails to form when {{Plain link}} is given literally:
{{Plain link|http://online.ts2009.com/mediaWiki/index.php/"script-include-table"_container|script-include-table_container}}
- While plain link with the escaped UNICODES returns: script-include-table_container showing four extra ASCII bytes makes a big difference.
- huh
- but is the literal:
{{Plain link|http://online.ts2009.com/mediaWiki/index.php/"script-include-table"_container|script-include-table_container}}
- A BAD Link with quotes: "script-include-table"_container script-include-table_container.
- Literally: {{Plain link|http://online.ts2009.com/mediaWiki/index.php/"script-include-table"_container|script-include-table_container}}
- GOOD Link with CODES: script-include-table_container
- Literally: {{Plain link|http://online.ts2009.com/mediaWiki/index.php/%22script-include-table%22_container|script-include-table_container}}
...
- Q.E.D., as described, those four extra characters in the link make a difference. Further, this advisory does not just apply to web links containing '"', but to other characters as well used in the international conventions (likely Unicode) of the World Wide Web. It has not been evaluated whether quote leading pagenames herein will even link properly, since this site uses Common.css and Common.js files and processes, whereas the N3V TrainzOnline Wiki does not.
TrainzLinkNeeded
edit{{TrainzLinkNeeded|Dead or missing url needing researched|Pretty text}}
- 'TrainzLinkNeeded' is meant to be replaced by 'Plain link' when a valid url is found. It can also be inserted as
{{TrainzLinkNeededZ||Pretty Text}}
where the double pipe fills in the url of the message page{{Trainz Link Needed}}
, as an aid to both writers and readers. The template automatically categorizes pages to the maintenance tracking category Category:Trainz Links Fixups needed.
TrainzTip
edit- This template makes a tip box like this:
- Example code:
{{TrainzTip|...Some description of the lack or needs or just to flag where work}}
|
- The below templates are standard MetaWiki general purpose templates ported into Wikibooks. FrankB 17
- 55, 21 June 2013 (UTC) says I'll likely workup a customized version of some for Trainz so if you want something soon, drop me a note. For now, use the in-page template
{{FAB-todo|Some description of the lack or needs or just to flag where work is needed— so perhaps someone else can pick it up before you can return!}}
Wikibooks Standard Templates
editWhile use of these templates is not discouraged, they assume you will be back later to edit again and continue the work since they do not place pages into a Trainz Maintenance sub-cat.
TODO
edit{{TODO|Text of task}}
Flag pages or sections that need some work with: {{TODO|Some text describing the task.}}
Use with some caution as it adds a link to the page in the Wikibooks-wide TODO category.
Info
edit{{Info|Some interesting information}}
Provide some supplemental information set off with: {{info|Some interesting information}}
Some interesting information. |
Warning
edit{{Warning|Something to worry about or be careful of}}
Warn the reader of something they might do wrong with dire consequences with: {{warning|Text of the warning.}}
Text of the warning. |
Danger
edit{{Danger}}
Warn the reader of something they might do that could have catastrophic results with: {{mbox|type=warning|msg=This action may cause irreparable harm to your installation!}}
Example
edit{{example}}
Visually set off an example with {{example|Text with markup for the example}}
Example:
This is a sample example
Code
editSet off sections of code, particularly for scripts. Wikibooks has an extensive set of enhanced templates for code markup with documentation. If the example is short, preface each line with a space to achieve a fast page wide emphasizing presentation
- .XML Example
like this line
Incomplete
edit{{Incomplete module}}
Flag a page as a work in progress with: {{Incomplete module}}
This module's main body of content is not yet complete. Radical changes and increases in text are therefore expected. This template should be only in temporary application, and should be removed following inactivity. |
Page to page linking
edit- For now...
- Use the standard Wikibooks template {{chapter navigation}} template so with Previous page= 'Installation Under Microsoft Windows' and next page= 'Installing Service Packs' the template, which goes on the page bottom above the page category and will look like:
and
{{chapter navigation|Installation Under Microsoft Windows|Installing Service Packs}}
and display both top and bottom (Look here in those two places)
{{navigation|Installation Under Microsoft Windows|Installing Service Packs}}
Administration templates
edit- Placing
{{Trainz-Admin}}
on a page top makes it part of the auto-category Category:Trainz Admin and displays the message box notice above. This has more general use than might be summarized here. With this and all templates, familiarize yourself with their usage—normally a lot of thought goes into writing such usage for lay-editors.
- Placing
{{Trainz-page|Previous|Next}}
will link Trainz pages page to page (threading them like {{Chapter navigation}} but not making it's own links, instead...) using the category:Trainz linking templates passed with full pipetricked links. See the glossary page to see how it manifests as a footer and a nav-link above the page title box—with links in both places.
- The general header template {{TRS-hdrbox}} will take such pass parameters from the Trainz divisions page header templates soon, with an option to link both up and down as well, including off-site.
- Placing
{{Trainz-ref}}
will auto-categorize a page to sub-category Category:Trainz appendixes and (??) Category:Trainz reference pages such pages should also be incorporated into Trainz references TOC lists, the rules about which and TOC decisions are evolving 2014-0902.
- Placing
{{Trainz-stub|date}}
or{{TRS-sectstub|date}}
on a page auto-categorizes it to Category:Trainz pages needing attention (stubs) and displays a message box warning readers the page is unfinished. ALL STUB auto-categorizing (maintenance) templates should have a date defined in yyyy-mmdd form, AND can take another parameter suggesting what needs done. (this need not display, some do, some don't, some do either. If they don't, the text you outline as the TO-DO List disappears into the bit bucket — until someone edits the section, then the list is there to read.
- Placing
{{Trainz-sect-stub|date}}
in a section displays a similar section stub messagebox and auto-categorizes it to the Sub-category Category:Trainz section stubs. Later this template was aliased by the {{TRS-sect-stub}} template.
- Place {{TRS-SubSubPg}} at page bottom when breaking a topic into multiple pages, the parent (sub-)page then should reference the sub-sub-page. In Wikibooks terms, the set parents and children are a Module. This auto-categorizes the page into a comprehensive list category:Trainz Sub-Sub-pages.
Redirect pages templates
edit- Place {{R from Trainz}} on redirect pages to other Trainz Division pages, including when moving a page (edit in after the move) to auto-categorize and list Trainz redirected pages or aliases (e.g. CM and CMP both redirect to the Content Manager page, Layout to Route, so useful to use redirects at times.) The template must be placed immediately after the page redirect instruction link and on the same line as in:
#redirect [[Trainz/Content Manager]] {{R from Trainz}} as for CM and CMP are formulated
- Other redirect templates are used similarly, though most are formatted to {{R to TRS-Book Division}}.
- Template:R to TRS-CC - Pages relocated to category:Trainz Content Creation division pages.
- Template:R to TRS-ref - Pages relocated to Category:redirects to Trainz reference pages division pages.
- Similar: {{R to TRS-sect}} - for when the redirect is a searchable title, but topic coverage is in the section of a page.
- Similar: {{R from Trainz}} - initial R template, general purpose, adds pages to Trainz redirects as a catchall category.
- Similar: {{R from Trainz alternative name}} - for pages which have been given 'better' (more searchable) names or aliased for easing searching. This takes the 'bad' title from the main category.
This page is a redirect from a Wikibooks Trainz page which either has been moved, or renamed as part of the Trainz Asset Management and Creation (AM&C) division of the Trainz Wikibook.
Category tagging templates
editSuggest not creating a category without consultation, it is likely the group you suggest has already been covered.
- Place
{{Trainz-cat|Purpose of the category page in some detail}}
— use only on categories to demarcate and auto-categorize them as Trainz pages. The category will auto-default to trainz maintenance unless given a value in the control parameter 'noMaint' like:| noMaint= 1
.
Preliminary category tree
edit- outline of category tree (temp here)
- temp
- whilst working out something started now missing.
See also these Categories:
- category:Trainz categories - Organizational the root of the tree, admin/maintenance one branch, articles via Category:Book:Trainz on the other
- category:All Trainz pages
- Volume parents
- category:Trainz AM&C - All pages classed as intermediate skills, especially asset management (CM and examples), simple cloning and config editing through reskinning and repairs.
- category:Trainz content creation - and oops! category:Trainz Content Creation , declared obsolete unless their is a matching Trainz Wiki category. Then the other we'll change the templates to auto-categorize the other way!
- category:Trainz references
- category:Trainz reference pages - reluctantly keeping both of these. May utilize the one solely for appendix pages, since matching TOC references is going that way. The other for N3V co-coveraged pages... which ever matches their {{ORP-bot}} autocategorization.
- category:Config tags - or under Trainz?
- Admin pages
- category:Trainz Sub-Sub-pages -- lists all sub-sub pages regardless of volumes above
- category:Trainz Sub-subpages - spelling consistency is not my strong suite! These are meant for third level down pages, typically examples pages in the schema, though some technical sub-subpages will find their way in.
- category:Trainz Templates