Template:Trophycount: Difference between revisions
Jump to navigation
Jump to search
(Added an optional argument to display the combined total of trophies.) |
m (Fixed an expression error that would occur if the total was displayed but the "platinum" field was omitted.) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><big>'''{{#if: {{{platinum|{{{p|}}}}}} | [[File:Platinum_trophy.svg|22px|top|Platinum trophy]] {{{platinum|{{{p}}}}}} {{!}} | }} [[File:Gold_trophy.svg|22px|top|Gold trophy]] {{{gold|{{{g}}}}}} | [[File:Silver_trophy.svg|22px|top|Silver trophy]] {{{silver|{{{s}}}}}} | [[File:Bronze_trophy.svg|22px|top|Bronze trophy]] {{{bronze|{{{b}}}}}} '''</big> | <includeonly><big>'''{{#if: {{{platinum|{{{p|}}}}}} | [[File:Platinum_trophy.svg|22px|top|Platinum trophy]] {{{platinum|{{{p}}}}}} {{!}} | }} [[File:Gold_trophy.svg|22px|top|Gold trophy]] {{{gold|{{{g}}}}}} | [[File:Silver_trophy.svg|22px|top|Silver trophy]] {{{silver|{{{s}}}}}} | [[File:Bronze_trophy.svg|22px|top|Bronze trophy]] {{{bronze|{{{b}}}}}} '''</big>{{#if: {{{total|}}} | : ''Total: '''{{#expr: {{#if:{{{platinum|{{{p|}}}}}} | {{{platinum|{{{p}}}}}} + | }} {{{gold|{{{g}}}}}} + {{{silver|{{{s}}}}}} + {{{bronze|{{{b}}}}}} }}''' trophies'' | }}</includeonly><noinclude> | ||
{{#if: {{{total|}}} | : ''Total: '''{{#expr: {{{platinum|{{{p}}}}}} + {{{gold|{{{g}}}}}} + {{{silver|{{{s}}}}}} + {{{bronze|{{{b}}}}}} }}''' trophies'' | }} | |||
</includeonly><noinclude> | |||
{{Trophycount|p=1|g=2|s=3|b=4|total=y}} | {{Trophycount|p=1|g=2|s=3|b=4|total=y}} | ||
Very simple time saving template for quickly displaying trophy totals for titles that support them. Mainly used on [[Trophies|trophy]] pages to display the total number of trophies included in a game or level kit. | Very simple time saving template for quickly displaying trophy totals for titles that support them. Mainly used on [[Trophies|trophy]] pages to display the total number of trophies included in a game or level kit. |
Latest revision as of 09:17, 14 June 2021
- Total: 10 trophies
Very simple time saving template for quickly displaying trophy totals for titles that support them. Mainly used on trophy pages to display the total number of trophies included in a game or level kit.
Usage
{{Trophycount|platinum= |gold= |silver= |bronze= }}
or {{Trophycount|p= |g= |s= |b= }}
Enter a number into each of the fields to indicate how many trophies of a given tier can be earned. If the platinum field is omitted or left empty, the platinum trophy icon will not be displayed. To display the combined total, use {{Trophycount|total=y}}