MediaWiki Tips

From MediaWiki-1.39
Revision as of 20:52, 21 January 2026 by Admin (talk | contribs) (→‎See also)
Jump to navigation Jump to search

MediaWiki Tips

This page collects useful formatting techniques, admin tricks, and style conventions used across the Sh1re Commons and related wikis (e.g. Eckfordc). Contributions welcome.

Naming, Linking, and Underscores

MediaWiki converts spaces to underscores (`MediaWiki_Tips` → `MediaWiki Tips`).

You can also use internal links like this:

[[MediaWiki Tips]]

If the page doesn’t exist, it shows up as a red link — clicking it lets you create the page directly.

Template Styling

===

Note: {{{1}}}

===

Note: Use this template to show helpful callouts like this one.


Create or edit the template here: Template:Note

Paste this code:

<div style="border-left: 4px solid #36c; background: #eef; padding: 0.8em; margin: 1em 0;">
<strong>Note:</strong> {{{1}}}
</div>

===

⚠️

Warning: {{{1}}}





===
⚠️

Warning: Use this template to flag risky actions, like editing core DB tables.






Create/edit Template:Warning with this:

<div style="border-left: 4px solid #c00; background: #fee; padding: 0.8em; margin: 1em 0;">
<strong>Warning:</strong> {{{1}}}
</div>

Zero-JS Enhancements

This wiki stack is hardened for legacy environments — no JavaScript required. Where others use JS libraries, we prefer:

  • **Pure HTML/CSS** navigation boxes and style blocks
  • **Table of contents** via headings (e.g. `== Section ==`)
  • **No collapsibles or toggles** (unless emulated with `<details>` in supported browsers)
  • Minimal inline CSS for color blocks, tooltips, and alerts

Recommended Conventions

  • Use `` for inline paths and scripts: php maintenance/update.php
  • Use `
    ` or `<syntaxhighlight lang="bash">` for CLI blocks
* All admin helper pages should be tagged like this: <pre> [[Category:Documentation]]

See also