User:ChifuyuDownTheLine/resources
Tools
- Special:SpecialPages
- Category:Aesthetic templates - list
- Template:Categorybar - add another category bar
- Template:Categorybar/wrapper - easier but less direct
- User:Pseudosphere#Templates shoutout for doing all the real work
- Template:Calendar2
- Special:ExpandTemplates
- Template:ReLogo
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
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
- Magic words: Help:Magic words - MediaWiki
- Parser functions (overview): Parser functions - MediaWiki
- A list of available extension tags and function hooks can be found at Special:Version
- ParserFunctions (extension): Help:Extension:ParserFunctions - MediaWiki
Modules
Modules are Lua scripts, enabled by the Scribunto extension.
- Scribunto: Extension:Scribunto - MediaWiki
- Lua manual: Extension:Scribunto/Lua reference manual - Mediawiki
- Lua.org manual: Lua 5.1 Reference Manual
- Example: Module:Calendar2
- List of modules: All pages with prefix (Module namespace)
Parsoid
Bi-directional wikitext parser that can convert between HTML and wikitext. Not used on TWC2
- Parsoid: Parsoid - MediaWiki
- Parser unification: Parsoid/Parser Unification - MediaWiki
- ParserMigration: Extension:ParserMigration - MediaWiki
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.