Wiki style guide

Discussions about BGA (all languages)
Forum rules
Warning: challenging a moderation in Forum = 10 days ban
More info & details about how to challenge a moderation: viewtopic.php?p=119756
User avatar
SimplicatusGames
Posts: 141
Joined: 10 May 2021, 10:30
Contact:

Re: Wiki style guide

Post by SimplicatusGames »

SimplicatusGames wrote: 06 May 2025, 01:10 And now for my question - I could swear that it used to be possible to use different font colours (which is very useful when explaining about differently coloured game objects), but now I cannot see that option at all in the formatting menu in the 👁️ Visual editing view. Can anybody help me with some info? :?:

PS: I just had the idea of copying the markup code for font colours from here and see if I can add it in the [[]] Source editing view.
Aaaand... writing this:

Code: Select all

[color=#FF0000][/color]
did NOT work, but I found a nice workaround using the code provided here: https://en.doc.boardgamearena.com/Wiki_ ... nTemplates

So I used this:

Code: Select all

{{redCylinder|>}}
to emulate the 51st State connection tokens (given that getting markups from the BGA dev for the game is more work) developer. That's all for now.
Our games make you think! https://Simplicatus.Games is an independent publisher and distributor of indie tabletop games.
User avatar
Sammy McSam
Posts: 83
Joined: 07 April 2021, 20:02

Re: Wiki style guide

Post by Sammy McSam »

SimplicatusGames wrote: 06 May 2025, 01:22
SimplicatusGames wrote: 06 May 2025, 01:10 And now for my question - I could swear that it used to be possible to use different font colours (which is very useful when explaining about differently coloured game objects), but now I cannot see that option at all in the formatting menu in the 👁️ Visual editing view. Can anybody help me with some info? :?:

PS: I just had the idea of copying the markup code for font colours from here and see if I can add it in the [[]] Source editing view.
Aaaand... writing this:

Code: Select all

[color=#FF0000][/color]
did NOT work, but I found a nice workaround using the code provided here: https://en.doc.boardgamearena.com/Wiki_ ... nTemplates

So I used this:

Code: Select all

{{redCylinder|>}}
to emulate the 51st State connection tokens (given that getting markups from the BGA dev for the game is more work) developer. That's all for now.
If you want coloured text, you can use this in the wiki page

Code: Select all

<span style="color:red;">YourText</span>
You can also make your own wiki icons (no need for a dev) in 3 steps: https://en.doc.boardgamearena.com/Wiki_ ... _own_icons
I think this is the image you wanted: https://x.boardgamearena.net/data/theme ... ources.png
Some previous examples: https://en.doc.boardgamearena.com/Templ ... n#Examples
User avatar
SimplicatusGames
Posts: 141
Joined: 10 May 2021, 10:30
Contact:

Re: Wiki style guide

Post by SimplicatusGames »

Sammy McSam wrote: 09 May 2025, 18:51
SimplicatusGames wrote: 06 May 2025, 01:22
SimplicatusGames wrote: 06 May 2025, 01:10 And now for my question - I could swear that it used to be possible to use different font colours (which is very useful when explaining about differently coloured game objects), but now I cannot see that option at all in the formatting menu in the 👁️ Visual editing view. Can anybody help me with some info? :?:
https://en.doc.boardgamearena.com/Wiki_ ... nTemplates

So I used this:

Code: Select all

{{redCylinder|>}}
to emulate the 51st State connection tokens (given that getting markups from the BGA dev for the game is more work) developer. That's all for now.
If you want coloured text, you can use this in the wiki page

Code: Select all

<span style="color:red;">YourText</span>
You can also make your own wiki icons (no need for a dev) in 3 steps: https://en.doc.boardgamearena.com/Wiki_ ... _own_icons
I think this is the image you wanted: https://x.boardgamearena.net/data/theme ... ources.png
Some previous examples: https://en.doc.boardgamearena.com/Templ ... n#Examples
Awesome, thank you so much!

That span style code is most probably how I used to make coloured text, and then forgot. It really should be added to the Wiki formatting page, for the next time I forget and also forget that I asked here 😂😂😂

Making custom icons is a super power, that definitely needs to go into the Wiki formatting help as well 😉😁
Our games make you think! https://Simplicatus.Games is an independent publisher and distributor of indie tabletop games.
User avatar
Sammy McSam
Posts: 83
Joined: 07 April 2021, 20:02

Re: Wiki style guide

Post by Sammy McSam »

I've added some new text templates:
Template:Text is the parent, which has a load of custom variables.
Template:Pill is a preset of {{Text}} with automatic white/black text calculated from the background color variable* (which you can also override).
Template:Code is a simple preset of {{Text}} in a code block.

Full list of all useful(?) templates, split into categories: Wiki_formatting#Templates
SimplicatusGames wrote: 19 May 2025, 22:38 It really should be added to the Wiki formatting page, for the next time I forget and also forget that I asked here 😂😂😂
in addition to:

Code: Select all

<span style="color:red;">YourText</span>
you can now also use:

Code: Select all

{{text|c=red|YourText}}

*text color calculation uses relative color syntax available in all major browsers since 9 Jul 2024 https://caniuse.com/css-relative-colors
User avatar
kevan
Posts: 35
Joined: 18 January 2014, 16:41

Re: Wiki style guide

Post by kevan »

Would it be a good idea to make a warning template to put at the top of rules pages which use formatting that doesn't display correctly on the BGA view, to spare the poor reader from trying to follow a dense set of rules where they aren't aware that it's missing all of the numbers and bullets and formatting?

It could also include a maintenance category so that users who want to fix these things can find the rulesets that need fixing.

I usually take a few minutes to fix the rule formatting, if I find myself reading a broken set of game rules, but don't always have time when playing something live.
User avatar
Sammy McSam
Posts: 83
Joined: 07 April 2021, 20:02

Re: Wiki style guide

Post by Sammy McSam »

I disagree with changing semantic HTML lists into unstructured static lists but I sympathise that waiting for a simple fix that may never happen is frustrating.

I've made some Note Templates.
If you do decide to use one for your purpose, I suggest using {{info}} rather than {{warn}}.

Each template page has a list of pages that use that template, so you could use those lists for tracking purposes.
Or you could create your own list with something like {{Special:WhatLinksHere/Template:Info}}.
User avatar
kevan
Posts: 35
Joined: 18 January 2014, 16:41

Re: Wiki style guide

Post by kevan »

Sammy McSam wrote: 29 July 2025, 02:17 I've made some Note Templates.
If you do decide to use one for your purpose, I suggest using {{info}} rather than {{warn}}.
Thanks for those! I've made a template at https://en.doc.boardgamearena.com/Template:Broken_lists that uses your {{warn}} template, specifically calling out the list issue.

I think the exclamation point warning sign is more appropriate than a lightbulb info reminder; I'd only be adding the template to pages where the rules had been badly affected by stripping out the list markup. It's not just a handy hint for how the reader should approach reading the rules, it's a warning that the text has formatting errors that make it very hard or completely impossible to follow.

Can you think of a way to hide the template when it's viewed on the wiki page, so that the message only appears on the BGA view?
User avatar
Sammy McSam
Posts: 83
Joined: 07 April 2021, 20:02

Re: Wiki style guide

Post by Sammy McSam »

I think there is some value to having it visible in the wiki view for continuity and to prompt those reading to help improve it.

I've added a state variable `s` so now you can write {{Broken lists|s=c}} to render it with the text collapsed and the icon as a toggle.

Or you could wrap your template in a <div> with `mw-collapsible` classes:

Code: Select all

<div class="mw-collapsible mw-collapsed">{{warn}}</div>
Optionally also use `data-*text` attributes to display custom show/hide links:

Code: Select all

<div class="mw-collapsible mw-collapsed" data-collapsetext="Hide warning" data-expandtext="Show warning">{{warn}}</div>
MediaWiki classes handle ARIA labels for accessibility which is nice.

Note that collapsible elements will not be collapsible on boardgamearena.com, which is the functionality you're looking for anyway.
Post Reply

Return to “Discussions”