< User:Stux(Difference between revisions)
|
|
| (includes 8 intermediate revisions) |
| Line 1: |
Line 1: |
| - | {{#switch:{{{2|total}}}<!-- /* Begin Switch */
| + | <noinclude>PLACEHOLDER</noinclude> |
| - | -->|total|#default={{format seconds|{{#expr: {{#count:{{{1}}}_tally|0}} + {{{offset_seconds|0}}} }}}}<!-- /* Total in hh:mm:ss */
| + | |
| - | -->|seconds={{#expr: {{#count:{{{1}}}_tally|0}} + {{{offset_seconds|0}}} }}<!-- /* Total in seconds */
| + | |
| - | -->|average={{format seconds|{{#ifexpr:(({{#count:{{{1}}}_count|0}} + {{{offset_count|0}}}) round 0) > 0|{{#expr: ( ({{#count:{{{1}}}_tally|0}} + {{{offset_seconds|0}}}) / ({{#count:{{{1}}}_count|0}} + {{{offset_count|0}}}) ) round 0}}|0}}}} <!-- /* Average in hh:mm:ss */
| + | |
| - | -->|average_seconds={{#ifexpr:(({{#count:{{{1}}}_count|0}} + {{{offset_count|0}}}) round 0) > 0|{{#expr: ( ({{#count:{{{1}}}_tally|0}} + {{{offset_seconds|0}}}) / ({{#count:{{{1}}}_count|0}} + {{{offset_count|0}}}) ) round 0}}|0}} <!-- /* Average in hh:mm:ss */
| + | |
| - | -->|count={{#expr: {{#count:{{{1}}}_count|0}} + {{{offset_count|0}}} }} <!-- /* Total Number of entries */
| + | |
| - | -->}}<!-- /* End Switch */
| + | |
| - | --><noinclude>
| + | |
| - | This template is used for displaying tally totals in a group of toons.
| + | |
| - | | + | |
| - | '''Usage:'''
| + | |
| - | :<code><nowiki>{{ </nowiki> display time | ''countername'' [| ''display_type''] [| offset_seconds = ''seconds''] [| offset_count = ''count'']}}</code>
| + | |
| - | * where ''countername'' is the name of the counter being used. '''''This parameter is required.'''''
| + | |
| - | * and ''display_type'' is the type of information to be displayed. Optional. Valid values are:
| + | |
| - | ** <code>total</code> {{--}} Default. Displays the total number of tallied seconds in ''hh:mm:ss'' format.
| + | |
| - | ** <code>seconds</code> {{--}} Displays the total number of tallied seconds.
| + | |
| - | ** <code>average</code> {{--}} Displays the average time per toon in ''hh:mm:ss'' format.
| + | |
| - | ** <code>average_seconds</code> {{--}} Displays the average time per toon in seconds.
| + | |
| - | ** <code>count</code> {{--}} Displays the total number of entries.
| + | |
| - | * The (Optional) parameter <code>offset_seconds =</code> temporarily offsets the total number of seconds by the ''seconds'' value passed to this parameter. The total itself remains unaffected; only the calculated display values are affected. This value defaults to zero(0) when the parameter is not defined.
| + | |
| - | * The (Optional) parameter <code>offset_count =</code> temporarily offsets the total count of toons by the ''count'' value passed to this parameter. The total itself remains unaffected; only the calculated display values are affected. This value defaults to zero(0) when the parameter is not defined.
| + | |
| - | | + | |
| - | | + | |
| - | * See {{t|tally time}} for usage examples.
| + | |
| - | | + | |
| - | [[Category:Counter Formatting Templates|{{PAGENAME}}]]
| + | |
| - | </noinclude> | + | |