User:ChifuyuDownTheLine/resources

From The Wiki Camp 2
Jump to navigation Jump to search

Tools

Page background

Background images for pages is done with TemplateStyles, on "Sanitised CSS" pages, transcluded with <templatestyles src="pagename.css" />. This reads any given name from the template namespace.

Template subpages ending with .css, (e.g.: named like Template:Foo/bar.css) will have the "Sanitised CSS" page type by default. For other names, use Special:ChangeContentModel to create the page with a namespace.

Prior art, and good examples:

This specific method is likely best practice for this use case, with TemplateStyles at the start, Full size background image, then a div with the class or id.

Sign edits after the fact

For more info, see wikipedia:WP:UNSIGNED.

Template:Unsigned provides a means to label unsigned edits, on a talk page or such.

I was gonna write more description but no just read the template usage guide over there stop listening to me

Notes

  • TemplateWizard doesn't read TemplateData from /doc pages.
  • Transclusion, per mediawikiwiki:Transclusion:
    • noinclude "is visible exclusively on the source page and cannot be transcluded onto another page."
    • includeonly "will be hidden on the source page and visible only when transcluded onto a different page."
    • onlyinclude shows on the original page, but only transcludes tagged sections to other pages.
    • Help:Transclusion provides a more direct explanation.
  • Wiki emphasis mainly bolds the first case of whatever links to the page. Not to be confused with LLM emphasis which just throws it wherever.
    • This can be done in a way that works better with transclusion, by just linking the page to itself. It'll be bold on the original cause you're already there, but be a link anywhere else.

MediaWiki functions

Syntax

Functions and magic words

Modules

Modules are Lua scripts, enabled by the Scribunto extension.

Parsoid

Bi-directional wikitext parser that can convert between HTML and wikitext. Not used on TWC2

Running MediaWiki

MediaWiki needs PHP and a whole load of shit. The easiest way to spin up a copy is just with containers, which has its own issues, but doesn't add a whole bunch of mess that's hard to clear away or manage.

MediaWiki-Docker

MediaWiki-Docker is the most official way to containerise it, but doesn't include any extensions by default, lacking even a default skin. It's simply a fool's errand to try to bring it up to working condition from nothing. However, it is the most directly visible way. A way around this could be downloading a stable release, grabbing/copy-pasting a few files (listed below), and making a weird combination of the two. Note that this method is still only intended for local use.

Docker-relevant files:

Docker can be swapped for Podman with slight alterations.

Other (likely more sensible)

See mediawikiwiki:Comparison of distribution options