Template:GlobalFlag: Difference between revisions

From Ephinea PSO Wiki
(Added "Global flag" to infobox so its purpose is more clear; Added attributes for "Collection" type; Added example; Examples reorganization)
(Added optional template transclusion syntax for global flag articles)
Line 54: Line 54:
==Usage and Examples==
==Usage and Examples==
There is a side effect where an expanded hexadecimal value revealing its decimal conversion will reveal the relevant conversion for all global flag infoboxes on a page, however at that point it is likely the user will want to make use of the decimal conversions within them as well, so there is no practical reason to fix this currently.
There is a side effect where an expanded hexadecimal value revealing its decimal conversion will reveal the relevant conversion for all global flag infoboxes on a page, however at that point it is likely the user will want to make use of the decimal conversions within them as well, so there is no practical reason to fix this currently.
If using <code><nowiki>{{subst:onlyinclude|id=infobox| ... }}</nowiki></code> for a global flag article, use <code><nowiki>{{:article|infobox}}</nowiki></code> to transclude the infobox, in case other parts of the article are also marked for transclusion.
{{GlobalFlag
{{GlobalFlag
|title = Lucky Coins
|title = Lucky Coins
Line 64: Line 66:
}}
}}
<pre>
<pre>
{{subst:onlyinclude|id=infobox| // optional, used for global flag article transclusion
{{GlobalFlag
{{GlobalFlag
|title = Lucky Coins
|title = Lucky Coins
Line 73: Line 76:
|bmdec = 508      // optional, will be hidden until hexadecimal value is clicked/tapped
|bmdec = 508      // optional, will be hidden until hexadecimal value is clicked/tapped
}}
}}
}}                // use if transcluding with above onlyinclude substitution template
</pre>
</pre>
{{GlobalFlag
{{GlobalFlag

Revision as of 14:30, 24 December 2021

Global flag
GlobalFlag

Usage and Examples

There is a side effect where an expanded hexadecimal value revealing its decimal conversion will reveal the relevant conversion for all global flag infoboxes on a page, however at that point it is likely the user will want to make use of the decimal conversions within them as well, so there is no practical reason to fix this currently.

If using {{subst:onlyinclude|id=infobox| ... }} for a global flag article, use {{:article|infobox}} to transclude the infobox, in case other parts of the article are also marked for transclusion.

Global flag
Lucky Coins
Type
:
Currency
Max Amount
:
100
Flag (Hex)
:
B
Flag (Dec)
:
11
Bitmask (Hex)
:
00001FC
Bitmask (Dec)
:
508
{{subst:onlyinclude|id=infobox| // optional, used for global flag article transclusion
{{GlobalFlag
|title = Lucky Coins
|type = Currency
|max = 100         // used with Currency type
|fhex = B
|fdec = 11         // optional, will be hidden until hexadecimal value is clicked/tapped
|bmhex = 00001FC
|bmdec = 508       // optional, will be hidden until hexadecimal value is clicked/tapped
}}
}}                 // use if transcluding with above onlyinclude substitution template
Global flag
Wrapping Papers
Type
:
Collection
Complete (Hex)
:
1FF
Complete (Dec)
:
511
Flag (Hex)
:
B
Flag (Dec)
:
11
Bitmask (Hex)
:
1FF00000
Bitmask (Dec)
:
535822336
{{GlobalFlag
|title = Wrapping Papers
|type = Collection
|chex = 1FF        // used with Collection type
|cdec = 511        // optional, will be hidden until hexadecimal value is clicked/tapped
|fhex = B
|fdec = 11         // optional, will be hidden until hexadecimal value is clicked/tapped
|bmhex = 1FF00000
|bmdec = 535822336 // optional, will be hidden until hexadecimal value is clicked/tapped
}}