User:Stux/template-sandbox2

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(testing changes for Template:display time)
(fixed?)
Line 2: Line 2:
-->|total|#default={{format seconds|{{#expr: {{#count:{{{1}}}_tally|0}} + {{{offset_seconds|0}}} }}}}<!-- /* Total in hh:mm:ss */  
-->|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 */  
-->|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={{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 */  
+
-->|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 */  
-->|count={{#expr: {{#count:{{{1}}}_count|0}} + {{{offset_count|0}}} }} <!-- /* Total Number of entries */  
-->}}<!-- /* End Switch */  
-->}}<!-- /* End Switch */  

Revision as of 14:31, 19 April 2025

0:00 This template is used for displaying tally totals in a group of toons.

Usage:

{{ display time | countername [| display_type] [| offset_seconds = seconds] [| offset_count = count]}}
  • 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:
    • total — Default. Displays the total number of tallied seconds in hh:mm:ss format.
    • seconds — Displays the total number of tallied seconds.
    • average — Displays the average time per toon in hh:mm:ss format.
    • average_seconds — Displays the average time per toon in seconds.
    • count — Displays the total number of entries.
  • The (Optional) parameter offset_seconds = 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 offset_count = 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.


Personal tools