Difference between revisions of "Template:Elemental Rumble"

From Dungeon Defenders 2 Wiki
Jump to: navigation, search
(Testing and formatting rotating weekly element)
Line 12: Line 12:
 
* Then loops back to Week 1
 
* Then loops back to Week 1
  
</noinclude>
 
<includeonly>
 
<!-- Weekly Image Rotator (changes every 7 days based on ISO week number) -->
 
{{#switch: {{#expr: {{#time:W}} mod 4 }}
 
| 0 = [[File:Water Week.gif|300px]]
 
| 1 = [[File:Storm Week.gif|300px]]
 
| 2 = [[File:Earth Week.gif|300px]]
 
| 3 = [[File:Fire Week.gif|300px]]
 
}}
 
</includeonly>
 
 
<noinclude>
 
 
== Example ==
 
== Example ==
  
Line 35: Line 23:
  
 
</noinclude>
 
</noinclude>
 +
<includeonly>
 +
<!-- Weekly Image Rotator (changes every 7 days based on ISO week number) -->
 +
{{#switch: {{#expr: {{#time:W}} mod 4 }}
 +
| 0 = [[File:Water Week.gif|300px]]
 +
| 1 = [[File:Storm Week.gif|300px]]
 +
| 2 = [[File:Earth Week.gif|300px]]
 +
| 3 = [[File:Fire Week.gif|300px]]
 +
| #default = [[File:Water Week.gif|300px]]
 +
}}
 +
</includeonly>

Revision as of 15:11, 2 April 2025

This template displays a different image each week, rotating through 4 images based on the current ISO week number (168-hour cycles). To use it, simply type:

{{WeeklyImageRotation}}

The rotation order is:

  • Week 1 → Water Week.gif
  • Week 2 → Storm Week.gif
  • Week 3 → Earth Week.gif
  • Week 4 → Fire Week.gif
  • Then loops back to Week 1

Example

Wiki Text Result
{{WeeklyImageRotation}} Template:WeeklyImageRotation