Template:Event banners

Revision as of 09:34, 9 August 2021 by Aesulus (talk | contribs) (Adding documentation)


Hololive Fan Wiki:Event Banners is an Infobox-based template designed to supplant the conventional Infobox in displaying event banners on the Hololive Fan Wiki's Main Page. It offers several advantages over the traditional Infobox, such as making adding/removing events easier, automatically hiding/showing events as time passes, and offering a customizable limit to the number events that can be displayed at once.

Usage

Hololive Fan Wiki:Event Banners Events are added in sets of 3 unnamed parameters that follow this strict order:

  1. The expiration date/time. Any date/time object accepted by MediaWiki's time function. Omitting the time will result in that event expiring at 00:00 that day.
  2. The image (or any content, really) you want to display.
  3. The description of the event.

Example

{{Hololive Fan Wiki:Event Banners
| August 8, 2021 21:00
| [[File:Towa Birthday Live 2021 Banner.png|400px]]
| [[Towa]]'s Birthday 2021 Live
}}

WARNING:

Make sure you add events in chronological order. Though this template automatically hides/shows events as time passes, it is NOT smart enough to sort events by time. If you add events out of order, they will not display when you want them to.

Optional Parameters

These parameters may be omitted, and if done so, will assume the following default values:

Default values
| maxevents   = 3
| above       = EVENT BANNERS
| header1     = Upcoming Events
| headerstyle = background:#CCF;
| labelstyle  = width:100px;background:#DDF;

Description:

  • maxevents: The maximum number of events that can be displayed at any given time. Must be a whole number from 1 to 10.
  • above: The text to display at the top of the Infobox
  • header1: The text to display in this Infobox's only header
  • headerstyle: Styling for this Infobox's header
  • labelstyle: Styling for this Infobox's labels

Overrides

Hololive Fan Wiki:Event Banners

If you know the name of the parameter you want to override, you can override it by defining it as a named parameter like so:

{{Hololive Fan Wiki:Event Banners
| August 15, 2021 23:59:59
| [[File:Aqua UmiAni Banner.jpg|400px]]
| [https://umiani.net/ Yokosuka Umi no Anime Carnival]
| label2=July 22 — <br>August 15
}}

Warning

Named parameters always point to fixed positions. If you remove an event from this template, be sure check and update the named parameters of any overrides that might be affected.

Considerations

Because the MediaWiki software uses extensive caching, your scheduled content will not update immediately upon reaching the scheduled time. If you're impatient, use Special:Purge on the target page to flush the server's cache and force the page to update.