MediaWiki Syntax
This is the collection of MediaWiki info that the wiki contributors have collected and used throughout the CHW Wiki. Special thanks to khag,
iSpeakNerd, and
Anakura for figuring out different parts of MediaWiki for everyone.
Contents
Rules and Conventions
To keep things consistent, we try to keep to the following conventions any time we upload a file, create a new page, or make edits.
Uploading Files and Images
When you upload a file or image to the wiki, you should make sure its name follows these conventions:
Image Name
1. File names for images should be <GeneralType>-<SpecificType>.png
e.g.: Canada-Ontario-Toronto
2. All images should have the extension .png
- if you have a .jpg
image, you will need to first convert it to a .png
image. You can use an online tool like convertio.co.
Image Contents
1. Transparent Background: Most images should have a transparent background, especially cubie and blueprint icons. If the background is not transparent, you can use an online tool like remove.bg.
2. Trimmed Margins: Blueprint images should not have any extra whitespace margin. This is called trimming. You can use an online tool like trimmy.io to easily trim an image.
I've been working with anakura and ZiggyG on reorganizing the Blueprints list. In doing so, I'm templatizing a lot of it. In order for this to work, we need to standardize some of our file naming.
MediaWiki has built in support for renaming files but still maintaining redirects. For example, if we have a file called "ResinPuck.png" and I want to rename it to "Resource-Resin.png" I can do that and ResinPuck.png will still work
Since MediaWiki handles this, nothing will break if I start renaming files. Because of that I plan to move forward with renaming a lot of our media files.
Below is my tentative naming scheme. Most of the items in this list would be used for shortcode images and so they should be square and have a transparent background.
Cubie-Cubie_Name.png - this will be the cubie image
CubieBP-Cubie_Name_Blueprint.png - this will be the blueprint for the cubie. Since the in game name has "Blueprint" at the end, so will these images. I think that's better for SEO anyway.
Animation-Cubie_Name.mp4 - this will be the leaderboard animation for the cubie. These won't ever be used for shortcode images.
Resource-Resource_Name.png - this will be for resource images. I'm thinking of also putting keys here as Resource-Blue_Key.png
HQSkinBP-Name.png - this will be for HQ Skin Blueprint images
ConstructionBP-Name.png - this will be for Construction BP images
NFTBP-Name.png - this will be for NFT Blueprint images (the in game resource icon, not the actual NFT jpeg from opensea)
NFTImage-Name.jpg - this will be the NFT image from opensea at a maximum size of 3000 x 3000 (mediawiki wont handle crops for files over 3k by 3k). These won't ever be used for shortcode images.
NFTImage-Name-FullRes.jpg - this will be the NFT image from opensea at the full original resolution. We can link to it for users to view or download, but we can't include it for display on any wiki page or mediawiki will throw an error. These won't ever be used for shortcode images.
Icon-Name.png - this will be used for icons for things like Shop, Auction House, Leaderboard, Blueprint, Mail Box, Uservault. Basically any UI icons used in the game that we want to make use of.
Structure-Name.png - Christmas trees, monoliths, cauldrons, vaults, print shop, headquarters (the house displayed in the game, not the HQ icon)
CryptoIcon-Name.png - we have a icon for all in game cryptos
UserAvatar-Name.png - player avatars.. we're pretty much on track with this one actually
SiteAsset-Name.png - this will be for things used on the site but not necessarily included using standard mediawiki syntax. For example, I use this for the background image on the Quest Visualizer template or for the little tiger head poking up from the bottom of the screen. These won't ever be used for shortcode images.
There are other images we use a decent amount of, mainly screenshots from the game. I don't have any proposed naming structure for those nor do I really need to pressure us to do that since they are used sporadically throughout the wiki and will likely never be called by any templates. The list above is items which will be called from templates and so we need to commit to a naming structure so the templates are calling the right images.
Also, when templatizing this, spaces get replaced with underscores so hyphens will represent the separation between a category and a name, and the spaces in the name will have underscores. So we'll have Cubie-Tiger_Lily_Cat_Cubie.png or NFTImage-Pat_Morita_Event_NFT_3.png (actually I'm not sure if thats the real name of the NFT but if it is, that's what the file would be called). The point I'm trying to make is that I have no control on the filename after the hyphen, it will just match whatever the related in game item is named but with underscores instead of spaces.
Creating New Pages
Pages cannot be easily deleted from the internet after Google finds them. If we were to delete the Cubie page, for example, Google would not know it was deleted, and it would still show up when users search Google for Coin Hunt World Cubies. But when someone clicks on that link from Google, the page no longer exists. That's bad! So be very intentional about which pages you create.
- In general, new page names should use the Singular, not the Plural ("Blue Key" instead of "Blue Keys")
- All words in the page name should begin with a capital letter ("Blue Key" instead of "Blue key")
- Page names for Players should begin with a capital letter, even if the player name does not ("Khag" not "khag")
You will notice that the wiki page for Khag is named "Khag" with a capital K, but if you open it up and look at it, you will see it written with a lowercase k. That is because the CoinHuntWorldWiki runs post processing javascript to make the names appear with a lowercase, even though the page name is (and should continue to be) with a capital K. You can achieve this same effect on any player page by inserting the
{{lowercase}}
template anywhere on the page.Page Headers
Headers divide wiki pages into sections. You create a header by wrapping the section title in equal signs. There are different levels of header:
- h1:
=Very Big Title (Don't ever use this)=
- h2:
==Big Title==
- h3:
===Medium Title===
- h4:
====Small Title====
- h5:
=====Very Small Title=====
All wiki pages should begin with a short introduction to the article. The reader should be able to get the main ideas contained in the entire page just from reading the introduction. After the introduction, you can place level 2 headers to divide the wiki page into sections. Inside each section, you can further use level 3 headers to further subdivide the sections. Rinse and repeat!
Basic Text Formatting
Main MediaWiki Documentation https://www.mediawiki.org/wiki/MediaWiki
Links
Internal Links
- Internal links https://www.mediawiki.org/wiki/Help:Links#Internal_links
[[Internal page | display text]]
Subsection Links
[[Page Name#Subsection_name | display text]]
External Links
- External links https://www.mediawiki.org/wiki/Help:Links#External_links
[http://www.ExternalLink.com display text]
Images + Media
[[File:CubieVampire.png |300px|thumb|none|Vampire Cubie.]]
Gifs
- Use "frame" not "thumb" for Gifs
[[File:VampireAnimation.gif |300px|frame|none|Vampire Animation.]]
YouTube Video
Embedding a single video (get the video ID from the URL):
<youtube width="400" height="240">xUjNcVyPYuo</youtube>
Embedding a playlist:
{{YouTubePlaylist|UU02wFKBpF7Xg7qVZi8VwLDw}}
Note: On player pages, if you want to show a player's YouTube channel, you can embed their entire upload history (newest showing first) by using their youtube channel name or ID # from their URL.
Twitch Video
Embedding a Twitch VOD:
<embedvideo dimensions=400 service=twitchvod>1170561473</embedvideo>
(get the video ID from the URL: https://www.twitch.tv/videos/1170561473)
Embedding a Twitch Stream:
<embedvideo dimensions=400 service="twitch">raynstorm83</embedvideo>
(get the username from the URL https://www.twitch.tv/raynstorm83)
Text Formatting
MediaWiki Markup
- MediaWiki text formatting makes use of repeated
'
https://www.mediawiki.org/wiki/Help:Formatting#Text_formatting_markup
''italic'' '''bold''' '''''bold & italic'''''
HTML
- HTML markup formatting https://www.mediawiki.org/wiki/Help:Formatting#HTML_tags
Comments
- Use HTML tags for commenting https://www.mediawiki.org/wiki/Help:Formatting#HTML_tags
<!--This is a comment-->
Embeddable Content and Templates
Coin Hunt Map
On a yellow vault or cubiecrane page you can include this (no coordinates necessary):
==Map== {{CHMapAutoEmbed}}
And if you want to include a map to specific coordinates, (for example if you wanted to show the location of a purple vault on an event page) you can put this on any page (use the correct lat/lon):
{{CHMapEmbed|39.94966:-75.15039}}
And this is what the map embed looks like:
Progress Bars
Here is an example of how to use progress bars:
<table style="width: 100%; max-width: 500px; padding: 10px; box-sizing: border-box;"> <tr><td style="width: 30px; zoom: 1.2;">{{Resin|icononly}} </td><td>{{ProgressBar|100| 100|k|30px}}</td></tr> <tr><td style="width: 30px; zoom: 1.2;">{{Beach Cocktail|icononly}}</td><td>{{ProgressBar| 37| 100| |30px}}</td></tr> <tr><td style="width: 30px; zoom: 1.2;">{{Dragon Scales|icononly}} </td><td>{{ProgressBar| 50|1000| |30px}}</td></tr> <tr><td style="width: 30px; zoom: 1.2;">{{Red Ribbons|icononly}} </td><td>{{ProgressBar| 0|1000| |30px}}</td></tr> </table>
![]() | 100 k / 100 k |
![]() | 37 / 100 |
![]() | 50 / 1000 |
![]() | 0 / 1000 |
Player Avatar
Add following text to the top of the player page:
{{PlayerAvatar}}
Save and then click on the link it creates on the page and upload the players avatar image. Please use the naming format: "PlayerAvatar_Playername.png"
Embeds
Embedding One Page into another page
You can embed a section or an entire page into another page for convenience. For example if you were writing a page about Ethereum and wanted to include information about Gwei you could embed the entire Gwei page inside the Ethereum page with this tag:
{{:Gwei}}
Note the colon before the page title is important, it tells the parser to embed the PAGE called Gwei not the Template called Gwei (if one existed).
Embedding One Page Section into another page
We have an extension enabled to allow embedding of specific sections. If you wanted to embed not an entire page but just a particular section, you can do so by defining both the page name and the section name. If you were writing a page about Canada Day Event and you wanted to pull some information from the Canada Cubie page, you could do so like this:
{{#lsth:pagename|sectionX}} {{#lsth: Canada Cubie | First printed Canada Cubie }}
For further documentation of the Labeled Section Transclusion extension, see here: extension link
Embedding a Spreadsheet
Before you can embed a google document or spreadsheet, the owner of the file must "Publish to the web" by clicking "File" then near the bottom of the file menu clicking "Publish to the web" and then in the popup box clicking the blue "Publish" button.
Use <googlespreadsheet> html tag as shown below to embed a doc in the wiki:
<googlespreadsheet width="500" height="300" style="width: 100%"> Google_Doc_key_goes_here </googlespreadsheet>
Google_Doc_key is the text string in the share link see example embed at the UV Route Planning Tool
More details at the extension page: https://www.mediawiki.org/wiki/Extension:GoogleDocs4MW
Embedding a Google Document or a Google Spreadsheet
Before you can embed a google document or spreadsheet, the owner of the file must "Publish to the web" by clicking "File" then near the bottom of the file menu clicking "Publish to the web" and then in the popup box clicking the blue "Publish" button.
Use {{GoogleDoc}} template tag as shown below to embed either a google sheet or a google doc in the wiki:
{{GoogleDoc | doc | theReallyLongGoogleDocIdGoesHere }}
{{GoogleDoc | sheet | theReallyLongGoogleDocIdGoesHere }}
Or if you want to include custom height and width, in pixels (but don't include "px"):
{{GoogleDoc | sheet | theReallyLongGoogleDocIdGoesHere | 800px | 800px }}
Country Shortcodes
You can display a country's flag icon followed by its name using the "Country" template. This is generally only used to create other templates, for example the United States template just contains the text
{{Country|US}}
{{USA}}
renders {{Country|US}}
which displays as United States
{{Canada}}
renders {{Country|CA}}
which displays as United States
... and so on.
So when a new country comes out, we need to create a template for that country. For example, if India comes to CHW, we need to create a template called "India" and the contents of the template should be {{Country|IN}}
Shortcodes
Some pages on this wiki have "shortcode" templates which provide a link to a page as well as an icon that represents the page. For example, players with custom avatars, cubies, resources, etc all have shortcode templates. Instead of linking to the page directly, you will link to the shortcode. Here is an example:
[[Cubiecrane]] shows as Cubiecrane
{{Cubiecrane}} shows as Cubiecrane
If you wanted to display just the icon for some reason without the text, you can use {{Cubiecrane|icononly}} which displays
And if you don't know if a shortcode exists but want to try to use one just in case it does, you can do {{ifTE|Cubiecrane}} which will try to use a shortcode but will fall back to a regular link if no shortcode exists. We prefer {{ifTE|Link name}} instead of [[Link Name]] because you never know what shortcodes may exist in the future. Better to set it up in a future-proof way. ifTE stands for "If Template Exists"
Leaderboard Data
Creating a Podium Graphic
Podium graphics can be created using the {{LBPodium}}
template. We add a new graphic each month to the Leaderboard Results page. The tag takes 15 parameters. The first 3 parameters are for the first place finisher, the next 3 parameters are for the second place finisher, and so on, for the top 5 finishers. Below is an example.
{{LBPodium |Jrnightingale | CA | Fire Cubie |BlocBoi | US | Fire Cubie |Khag | US | Green Cubie |Trugoy | US | Fire Dragon Cubie |Lionlocks | CA | Doge Cubie }}
Embedding a Podium Graphic
Podium graphics are stored on the Leaderboard Results page as an individual section (one podium graphic per section). You can embed that section elsewhere using the lsth tag, then page name, then section name:
{{#lsth: Leaderboard Results | Top 5 Global September 2021 }}
Linking to LB Results
Below are two examples of linking to LB results using the {{LBLink}}
template. You need to provide Year, Month, LB Type, and LB Name.
{{LBLink|2021|9|Country|USA}}
: USA Country Leaderboard Results September 2021
{{LBLink|2021|9|Global|Global}}
: Global Leaderboard Results September 2021
Or if you want to send a link to someone outside of mediawiki, you can use the link format below which uses the same parameters as the above template tag:
Embedding LB Results
If you wish to display a LB table you can do so using template tags. You can display player-specific leaderboard results, or you can display a monthly LB table.
Below is an example of showing a single players all time results using the {{LBPlayerAchievementTable}}
template.
This will be the most useful of all these templates, as you can just put {{LBPlayerAchievementTable}}
on every player's page and it will automatically show all their LB results (no need to provide player name if the page using the template is a player's page).
{{LBPlayerAchievementTable|BlocBoi}}
:
Month | Type | Region | See Full LB | Place | Prize |
---|---|---|---|---|---|
1 September 2023 | ![]() |
California (US) | π | 35th | 5 ![]() |
1 August 2023 | ![]() |
California (US) | π | 45th | 5 ![]() |
1 June 2023 | ![]() |
Country US | π | 46th | 1 ![]() |
1 June 2023 | ![]() |
California (US) | π | 12th | 5 ![]() |
1 May 2023 | ![]() |
Country US | π | 35th | 2 ![]() |
1 May 2023 | ![]() |
California (US) | π | 9th | 5 ![]() |
1 April 2023 | ![]() |
Arizona (US) | π | 14th | 5 ![]() |
1 April 2023 | ![]() |
California (US) | π | 30th | 5 ![]() |
1 March 2023 | ![]() |
Arizona (US) | π | 36th | 5 ![]() |
1 March 2023 | ![]() |
California (US) | π | 17th | 5 ![]() |
1 March 2023 | ![]() |
Michigan (US) | π | 49th | 5 ![]() |
1 March 2023 | ![]() |
Nevada (US) | π | 48th | 5 ![]() |
1 February 2023 | ![]() |
Country US | π | 11th | 4 ![]() |
1 February 2023 | ![]() |
Global | π | 21st | |
1 February 2023 | ![]() |
California (US) | π | 4th | 20 ![]() |
1 January 2023 | ![]() |
California (US) | π | 26th | 5 ![]() |
1 December 2022 | ![]() |
California (US) | π | 49th | 5 ![]() |
1 November 2022 | ![]() |
California (US) | π | 16th | 5 ![]() |
1 October 2022 | ![]() |
Country US | π | 44th | 1 ![]() |
1 October 2022 | ![]() |
California (US) | π | 10th | 5 ![]() |
1 September 2022 | ![]() |
Country US | π | 43rd | 1 ![]() |
1 September 2022 | ![]() |
California (US) | π | 8th | 5 ![]() |
1 August 2022 | ![]() |
California (US) | π | 20th | 5 ![]() |
1 July 2022 | ![]() |
Country US | π | 39th | 2 ![]() |
1 July 2022 | ![]() |
California (US) | π | 7th | 5 ![]() |
1 June 2022 | ![]() |
California (US) | π | 24th | 5 ![]() |
1 May 2022 | ![]() |
California (US) | π | 15th | 5 ![]() |
1 April 2022 | ![]() |
Country US | π | 23rd | 3 ![]() |
1 April 2022 | ![]() |
California (US) | π | 4th | 20 ![]() |
1 March 2022 | ![]() |
Country US | π | 32nd | 2 ![]() |
1 March 2022 | ![]() |
California (US) | π | 10th | 5 ![]() |
1 February 2022 | ![]() |
Country US | π | 24th | 3 ![]() |
1 February 2022 | ![]() |
Global | π | 36th | |
1 February 2022 | ![]() |
California (US) | π | 7th | 5 ![]() |
1 January 2022 | ![]() |
Country US | π | 22nd | 3 ![]() |
1 January 2022 | ![]() |
Global | π | 36th | |
1 January 2022 | ![]() |
California (US) | π | 10th | 5 ![]() |
1 January 2022 | ![]() |
Michigan (US) | π | 22nd | 5 ![]() |
1 December 2021 | ![]() |
Country US | π | π₯1st | 1 ![]() |
1 December 2021 | ![]() |
Global | π | π₯2nd | 4 ![]() |
1 December 2021 | ![]() |
California (US) | π | π₯1st | 50 ![]() |
1 November 2021 | ![]() |
Country US | π | 7th | 1 ![]() |
1 November 2021 | ![]() |
Global | π | 12th | |
1 November 2021 | ![]() |
California (US) | π | π₯3rd | 30 ![]() |
1 October 2021 | ![]() |
Country UK | π | π₯1st | 1 ![]() |
1 October 2021 | ![]() |
Country US | π | π₯3rd | 4 ![]() |
1 October 2021 | ![]() |
Global | π | π₯1st | 5 ![]() |
1 October 2021 | ![]() |
California (US) | π | π₯1st | 50 ![]() |
1 October 2021 | ![]() |
England (UK) | π | π₯1st | 50 ![]() |
1 September 2021 | ![]() |
Country US | π | π₯1st | 1 ![]() |
1 September 2021 | ![]() |
Global | π | π₯2nd | 4 ![]() |
1 August 2021 | ![]() |
Country US | π | π₯1st | 1 ![]() |
1 August 2021 | ![]() |
Global | π | π₯2nd | 4 ![]() |
1 July 2021 | ![]() |
Country US | π | π₯3rd | 4 ![]() |
1 July 2021 | ![]() |
Global | π | π₯3rd | 3 ![]() |
1 June 2021 | ![]() |
Country US | π | π₯1st | 1 ![]() |
1 June 2021 | ![]() |
Global | π | 5th | 1 ![]() |
1 May 2021 | ![]() |
Country US | π | π₯2nd | 5 ![]() |
1 May 2021 | ![]() |
Global | π | π₯2nd | 4 ![]() |
1 April 2021 | ![]() |
Country US | π | π₯1st | 1 ![]() |
1 April 2021 | ![]() |
Global | π | π₯3rd | 3 ![]() |
1 March 2021 | ![]() |
Country US | π | π₯1st | 1 ![]() |
1 March 2021 | ![]() |
Global | π | π₯1st | 5 ![]() |
1 February 2021 | ![]() |
Country US | π | 6th | 1 ![]() |
1 January 2021 | ![]() |
Global | π | 4th | 3 ![]() |
1 December 2020 | ![]() |
Global | π | π₯1st | 1 ![]() |
1 November 2020 | ![]() |
Global | π | π₯2nd | 5 ![]() |
Below is an example of displaying a set of leaderboard results for a specific region in a specific month using the {{LBMonthlyAchievementTable}}
template.
The table below shows Canada's country LB from June 2021
{{LBMonthlyAchievementTable|2021|06|Country|Canada}}
Place | Player | Prize |
---|
Trivia Tables
This template displays a table showing trivia questions and answers.
To use this template within a wiki page, do {{Trivia|Blue|Sports}}
to show all Blue Vault Sports trivia as a table.
Or instead, to show all Blue Vault trivia, do {{Trivia|Blue}}
Or to show all Sports trivia, do {{Trivia||Sports}}
Or to show all trivia for all categories and colors, do {{Trivia}}
And finally, an example of {{Trivia|Red|Lifestyle}}
:
Study Mode: Hide Trivia Answers
ID | Vault Tier | Category | Question | Answer |
---|---|---|---|---|
9951 | Red | Lifestyle | What year were the Salem Witch Trials | 1692 |
9952 | Red | Lifestyle | What's the minimum amount of letters for an acceptable word in Boggle? | 3 |
9953 | Red | Lifestyle | When auctioning a painting in Masterpiece the bidding must start no less than which amount? | 1000000 |
Other Functions
Medal Icon
If you wish to display a "medal" emoji (π₯π₯π₯) next to a number, you can use the template {{Medal|number}}
and change number to the correct number (1 for gold, 2 for silver, 3 for bronze). If you provide a number other than 1, 2, or 3, nothing displays for this template. This is useful in other templates (like leaderboard tables) to add a medal icon next to the place name.
Numerical Ordinals
If you want to change "1" to "1st" or "95" to "95th" you can use the {{Ordinal|number}}
template.
For example, {{Ordinal|5}}
becomes 5th
Month Names
If you want to change a month number to a month name, for example "3" becomes "March" you can use the template {{MonthName|monthnumber}}
For example, {{MonthName|3}}
becomes March