Jump to content

Welcome to King Warz Charts Wiki! Please note that the site is still under construction as I work on creating past chart week pages, as well as templates and pages for artists, songs, and albums. Because of this, you may see a lot of red links throughout the site.

Module:SongCertifications/doc

From King Warz Charts

This is the documentation page for Module:SongCertifications

This module is used by the {{Infobox song}} template to format the |certification= parameter and assign categories based on the certification level of a song.

Usage

The module is invoked within the {{Infobox song}} template as follows:

{{#invoke:SongCertifications|getCertification|certification={{{certification|}}}}}

The module processes the |certification= parameter and formats the output while adding appropriate categories:

  • Gold (case-insensitive): Displays Gold and adds [[Category:Gold Songs]].
  • A number from 1 to 9: Displays Nx Platinum (e.g., 3x Platinum for 3) and adds [[Category:Platinum Songs]].
  • A number 10 or higher: Displays Nx Diamond (e.g., 24x Diamond for 24) and adds [[Category:Diamond Songs]].
  • Invalid inputs (e.g., non-numeric values other than Gold, or numbers less than 1): Displays the input as-is and adds [[Category:Songs with Invalid Certifications]].

Example

In an article using the {{Infobox song}} template:

{{Infobox song
| name = Example Song
| type = Major Hit Song
| artist = Example Artist
| album = Example Album
| released = January 1, 2020
| genre = Pop
| certification = 24
| rating = 4
}}

This will display the certification as 24x Diamond and add the article to [[Category:Diamond Songs]].

Notes

  • The module is case-insensitive for Gold (e.g., gold, GOLD are accepted).
  • Invalid inputs, such as 23x Diamond or non-numeric values other than Gold, are displayed as entered and categorized in [[Category:Songs with Invalid Certifications]] for manual review.
  • Ensure the categories ([[Category:Gold Songs]], [[Category:Platinum Songs]], [[Category:Diamond Songs]], [[Category:Songs with Invalid Certifications]]) exist on the wiki to avoid redlinks.

See also