Jump to content

User:Willscrlt/UBX/Musicbox/How it works

From Wikipedia, the free encyclopedia
This is one of several templates and pages that work together to support and document the {{User:Willscrlt/UBX/Musicbox}} template. The main Musicbox documenation explains how to add a Musicbox to your user page, and the Musicbox catalog contains examples of every standard Genre Musicbox.


The following highly technical information explains how the Musicbox templates work for those that are interested. For everyone else, you may safely ignore this page. The main Musicbox documenation explains how to add a Musicbox to your user page, and the Musicbox catalog contains examples of every standard Genre Musicbox.


Example of a generic Musicbox:
This user enjoys

Musicbox template files

[edit]


In symbolic form this would be represented as
User:Willscrlt/UBX/Musicbox → Musicbox →
→ Basic for Unique Musicboxes
→ Genre → Basic for most Genre Musicboxes
→ Genre → Jazz → Basic for Jazz Genre Musicboxes
→ Genre → Rock-Pop → Basic for Rock or Pop Genre Musicboxes
→ Special → Basic for other standard Musicboxes (Artist, etc.)

Everything could all be handled inside a single, enourmous template, but 1) it would be a nightmare to maintain, 2) it would discourage contributions from people wanting to add new Styles and sub-Types of music or updating wikilinks, 3) the performance would probably be slower and a bigger impact on the servers.

Musicbox categories

[edit]

The categories populated by Musicbox's standard 20 Genres are located under Wikipedians by music genre:

#0 is used only if the supplied attributes are unrecognized. #18 is used for artists, albums, and song titles, not for genres.

Additionally, Styles of music and sub-Types are categorized under the most specific category available if they pre-exist. In other words, if you select "big band" as a Style of Jazz you like, and if Category:Wikipedians who listen to big band music already exists (which it did at the time this documenation was written), then you will be added to that category instead of the more generic Category:Wikipedians who listen to jazz. However, to avoid categorizing users in deleted categories, this subcategorizing only is done where a category already exists and the category name matches Musicbox's terminology. An example that would not work is a sub-Type of "reggae music" when the category is named Category:Wikipedians who listen to reggae (the word "music" is not part of the category name, but is in Musicbox; therefore, they do not match and you would not be added to the reggae category but would be added to the generic world music category instead).

This automatic category matching for Styles and sub-Types can be tweaked within the template to fix a category mismatch like the one in the reggae example. It involves editing the appropriate Musicbox parser template and adding a category override attribute (|usecat=Category name goes here).

Musicbox documenation files

[edit]

See also

[edit]