Template:Dot

From Shadow of the Throne Wiki
Jump to: navigation, search


Usage

This version of the Dot template can produce all common forms of Dots or Boxes. Please note that for backwards compatibility with the old template, some default values may not be the most commonly-used values (e.g., the total number of dots).


Simple 5-dot Version

{{Dot|3|5}}


{{#iferror:{{#expr:1*3}}|3|{{#ifexpr:{{#if:|1|0}} and ((3>5) or (5>5)) |  |{{#{{}}}}


Simple 10-dot Version

{{Dot|7}}


{{#iferror:{{#expr:1*7}}|7|{{#ifexpr:{{#if:|1|0}} and ((7>5) or (10>5)) |  |{{#if:|{{#}}}}


Spaced 10-dot Version

{{Dot|7|separator=1}}


{{#iferror:{{#expr:1*7}}|7|{{#ifexpr:{{#if:1|1|0}} and ((7>5) or (10>5)) |  |{{#if:|{{#}}}}


Simple 10-box Version

{{Dot|7|boxes=1}}


{{#iferror:{{#expr:1*7}}|7|{{#ifexpr:{{#if:|1|0}} and ((7>5) or (10>5)) |  |{{#if:1{{#}}}}


No Trailing Hollow Characters

{{Dot|3|0}} (preferred) or {{Dot|3|5|hollowchar=}}


{{#iferror:{{#expr:1*3}}|3|{{#ifexpr:{{#if:|1|0}} and ((3>5) or (0>5)) |  |{{#}}}}


{{#iferror:{{#expr:1*3}}|3|{{#ifexpr:{{#if:|1|0}} and ((3>5) or (5>5)) |  |{{#}}}}


Please note that the first style is much easier for the wiki to produce, especially when producing 5 dots or less, and is therefore the preferred method. The second method will also work, however, and may be preferable in some situations such as a template that needs to be flexible about what parameters it's passing.


Full Parameter List

{{Dot |number of filled dots (defaults to 0) |number of total dots (defaults to 10) |separator=specify any value to include a separator (defaults to no separator) |fontsize=changes size of dots using CSS standards such as 12pt, small, or 150% (defaults to CSS "larger") |boxes=specify any value to use boxes instead of dots (defaults to dots) |fillchar=character to use as a filled dot (must be a single character with no formatting, overrides boxes setting) (defaults to ●) |hollowchar=character to use as a hollow dot (must be a single character with no formatting, overrides boxes setting) (defaults to ○) }}  ;Example
{{Dot|3|10|fontsize=20pt|separator=1|fillchar=x|hollowchar=o}}
{{#iferror:{{#expr:1*3}}|3|{{#ifexpr:{{#if:1|1|0}} and ((3>5) or (10>5)) |  |xxxooooooo}}}}