This is a documentation for Board Game Arena: play board games online !

Wiki formatting: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
(add deflist)
(alphabetical order)
Line 41: Line 41:
* A {{whiteDie|=1}} is known as a "Paco".
* A {{whiteDie|=1}} is known as a "Paco".


==Numbered lists==
==Headings==
 
A level two heading ("==") will appear with a box around it on the BGA view. A level three heading ("===") will not.
 
==Images==


Like bullet points, a numbered list in wiki markup (with a "#" before each line) doesn't display correctly. Workarounds are to write out the numbers by hand, with either paragraph breaks or <nowiki><br/></nowiki> tags between them:
Attempting to specify an image size in image markup (eg. <code><nowiki>[[File:Marrakech example.jpg|300px]]</nowiki></code>) will work in the wiki view, but will cause the image to appear blank in the BGA view (as it tries to display a resized image which does not exist in the directory it's referencing).


<pre>
A solution is to display images at the default size (meaning that they must also be uploaded at the size you want them to appear), eg:
1. Draw


2. Play
<pre>[[File:Marrakech example.jpg]]</pre>


3. Discard
It's also possible to add rollover text if desired:
</pre>


<pre>
<pre>[[File:Marrakech example.jpg|Example move]]</pre>
1. Draw<br/>
2. Play<br/>
3. Discard
</pre>


==Headings==
Also, external links will also work within BGA if you want the image to link to a URL:


A level two heading ("==") will appear with a box around it on the BGA view. A level three heading ("===") will not.
<pre>[[File:Versions.png|link=https://lumberjacks-studio.com/en/project/trek-12_en/]]</pre>


==Infoboxes==
==Infoboxes==
Line 71: Line 69:
Click through to the templates above for usage instructions.
Click through to the templates above for usage instructions.


==Images==
==In-article links==


Attempting to specify an image size in image markup (eg. <code><nowiki>[[File:Marrakech example.jpg|300px]]</nowiki></code>) will work in the wiki view, but will cause the image to appear blank in the BGA view (as it tries to display a resized image which does not exist in the directory it's referencing).
Linking to a section within a rules page (eg. <code><nowiki>[[#endgame|the Endgame phase]]</nowiki></code>) will work within the rules on a live game, but not on the gamepanel page (eg. https://boardgamearena.com/gamepanel?game=hanabi#Black_Powder). If the user clicks on such a link on a gamepanel page, the page will simply reload without taking them to that section.


A solution is to display images at the default size (meaning that they must also be uploaded at the size you want them to appear), eg:
==Numbered lists==


<pre>[[File:Marrakech example.jpg]]</pre>
Like bullet points, a numbered list in wiki markup (with a "#" before each line) doesn't display correctly. Workarounds are to write out the numbers by hand, with either paragraph breaks or <nowiki><br/></nowiki> tags between them:


It's also possible to add rollover text if desired:
<pre>
1. Draw


<pre>[[File:Marrakech example.jpg|Example move]]</pre>
2. Play


Also, external links will also work within BGA if you want the image to link to a URL:
3. Discard
</pre>


<pre>[[File:Versions.png|link=https://lumberjacks-studio.com/en/project/trek-12_en/]]</pre>
<pre>
 
1. Draw<br/>
==In-article links==
2. Play<br/>
 
3. Discard
Linking to a section within a rules page (eg. <code><nowiki>[[#endgame|the Endgame phase]]</nowiki></code>) will work within the rules on a live game, but not on the gamepanel page (eg. https://boardgamearena.com/gamepanel?game=hanabi#Black_Powder). If the user clicks on such a link on a gamepanel page, the page will simply reload without taking them to that section.
</pre>


==Tables==
==Tables==

Revision as of 15:58, 9 April 2022

These are some tips on how to make wiki rules pages display in a readable way on the BGA site beneath a game, with some notes on elements which do not work as expected, and useful elements which don't appear to be documented anywhere. Many tags and methods of formatting are completely stripped out by the BGA website when displaying wiki ruleset, but there are some workarounds.

Feel free to add additional issues and advice.

(This page was created following this forum thread.)

Bullet points

The BGA rules display strips all bullet points, if the regular wiki bullet markup of asterisks is used.

A common solution seems to be to add bullet-point unicode symbols. This also requires lines to be separated by paragraph breaks or <br/> tags, otherwise they all appear on the same line.

• Draw

• Play

• Discard
• Draw<br/>
• Play<br/>
• Discard

Definition list

";Term: Definition" wiki markup lists don't bold the terms or indent the definitions in the BGA view, making them much harder to read. A workaround is to manually bold each term, eg:

'''Term''': Definition

Dice

Six-sided dice can be displayed during a line of text using the {{whiteDie|=6}}.

It looks like they have line breaks around them unless they are part of a bullet or numbered list element, in which case the text flows before and after the die. For example:

  • A white die is known as a "Paco".

Headings

A level two heading ("==") will appear with a box around it on the BGA view. A level three heading ("===") will not.

Images

Attempting to specify an image size in image markup (eg. [[File:Marrakech example.jpg|300px]]) will work in the wiki view, but will cause the image to appear blank in the BGA view (as it tries to display a resized image which does not exist in the directory it's referencing).

A solution is to display images at the default size (meaning that they must also be uploaded at the size you want them to appear), eg:

[[File:Marrakech example.jpg]]

It's also possible to add rollover text if desired:

[[File:Marrakech example.jpg|Example move]]

Also, external links will also work within BGA if you want the image to link to a URL:

[[File:Versions.png|link=https://lumberjacks-studio.com/en/project/trek-12_en/]]

Infoboxes

These are only used by a few game pages, but Template:InfoBox, Template:InfoBoxes and Template:InfoBoxes3 allow game information to be displayed in one, two or three coloured boxes, in a way that also works in the BGA view. They look like this:

Example
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Click through to the templates above for usage instructions.

In-article links

Linking to a section within a rules page (eg. [[#endgame|the Endgame phase]]) will work within the rules on a live game, but not on the gamepanel page (eg. https://boardgamearena.com/gamepanel?game=hanabi#Black_Powder). If the user clicks on such a link on a gamepanel page, the page will simply reload without taking them to that section.

Numbered lists

Like bullet points, a numbered list in wiki markup (with a "#" before each line) doesn't display correctly. Workarounds are to write out the numbers by hand, with either paragraph breaks or <br/> tags between them:

1. Draw

2. Play

3. Discard
1. Draw<br/>
2. Play<br/>
3. Discard

Tables

Table borders are stripped by the BGA display. They can be added back by adding a fixed width border= to the image markup, eg:

{| class="wikitable" border="2"
|-
!0-90
|⭐
|-
!91-110
|⭐⭐
|-
!111-125
|⭐⭐⭐
|}

will display as:

0-90
91-110 ⭐⭐
111-125 ⭐⭐⭐