v50 Steam/Premium information for editors
- v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
- Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.
Difference between revisions of "Template:Token"
Jump to navigation
Jump to search
(Use {{token/guess type}}) |
(allow overriding the link with "link" parameter) |
||
Line 1: | Line 1: | ||
− | <code>{{#if:{{{3|}}}|[<nowiki/>}}[[{{#switch:{{lc:{{#rreplace:{{{2|c}}}|\s|}}}} | + | <code>{{#if:{{{3|}}}|[<nowiki/>}}[[{{{link|{{#switch:{{lc:{{#rreplace:{{{2|c}}}|\s|}}}} |
|ar|armor=Armor | |ar|armor=Armor | ||
|am|ammo=Ammo | |am|ammo=Ammo | ||
Line 13: | Line 13: | ||
|et|eth|ethic|ethics=Ethics | |et|eth|ethic|ethics=Ethics | ||
|#default={{token/guess type|{{{1|}}}}} | |#default={{token/guess type|{{{1|}}}}} | ||
− | }} token#{{{1|}}}|{{#if:{{{3|}}}||[}}{{{1}}}{{#if:{{{3|}}}|]]:{{{3}}}]|]]]}}</code><noinclude> | + | }} token#{{{1|}}}}}}|{{#if:{{{3|}}}||[}}{{{1}}}{{#if:{{{3|}}}|]]:{{{3}}}]|]]]}}</code><noinclude> |
==To do== | ==To do== | ||
* Add codes for all pages in [[:Category:DF2012:Tokens]] (that have a list of tokens) | * Add codes for all pages in [[:Category:DF2012:Tokens]] (that have a list of tokens) |
Revision as of 19:37, 11 July 2014
To do
- Add codes for all pages in Category:DF2012:Tokens (that have a list of tokens)
- Add {{text anchor}} to token tables (JS):
$('#wpTextbox1').val($('#wpTextbox1').val().replace(/\|-\s*\n\|\s*([A-Z_]+)\s*\n/g, function(m, a){return '|-\n| {{text anchor|'+a+'}}\n'}));
- To check for missed rows:
$('#wikiPreview tr').has('.text-anchor').hide()
Examples
[ATTACK]
(ammo)[ARMORLEVEL]
(armor)[SPEED]
(creature)[NAME:cat:cats:cat]