Template:Event banners

Revision as of 01:40, 24 September 2021 by Aesulus (talk | contribs) (rearrange sections)


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. This template currently holds up to 10 events, but this can be expanded if needed.

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

Advanced usage

These following "features" may require advanced knowledge of how Infoboxes and how this template works to be used properly. Explaining these goes beyond the scope of this documentation, and so only minimum documentation is provided – only intended to show that these features exist.

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.

Intentionally putting an event out of order

If you want to intentionally put one event out of order, for whatever reason, and scheduling is enabled, you can safely do so provided that there are no more than maxevents - 1 events in between the out-of-order event and its expiration date. This trick works by exploiting the template's logic and there's a high potential for messing this up, so don't do this unless you know what you're doing.

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.