Wiki Notes: Difference between revisions
More actions
No edit summary |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
Personally I'd recommend using Docker (Docker Compose) to install MediaWiki: https://www.mediawiki.org/wiki/Docker/Docker_Hub | Personally I'd recommend using Docker (Docker Compose) to install MediaWiki: https://www.mediawiki.org/wiki/Docker/Docker_Hub | ||
To import pages, etc, I would need the following permissions: | |||
* sysop (allows editing pages, protect pages, delete pages, etc) | |||
* interface-admin (allows editing css and javascript) | |||
* bureaucrat (Allows granting sysop to other users or other permissions - this one isn't really needed) | |||
To grant these for a user go to the special page Special:UserRights on the wiki installation. | |||
==== Wiki Security ==== | |||
I have added the FlaggedRevs extension to the extension list (with the required configuration along with it) and it lets users with the sysop permission accept changes to then be reflected on the site. But when a sysop edits, those changes aren't required to be reviewed. This will stop vandalism of the wiki. | |||
I would also then protect high-traffic pages such as the templates AND the main page. | |||
= Wiki Templates = | = Wiki Templates = | ||
I can easily import these later on, just the basics need to be set up first. | |||
* Template:MechaButton (and Template:MechaButton/docs) | * Template:MechaButton (and Template:MechaButton/docs) | ||
| Line 15: | Line 30: | ||
= Extensions = | = Extensions = | ||
These extensions are used by the Mecha Wiki and are available from MediaWiki.org. | These extensions are used by the Mecha Wiki and are available from MediaWiki.org. | ||
| Line 96: | Line 107: | ||
Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/HTMLTags | Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/HTMLTags | ||
Documentation: https://www.mediawiki.org/wiki/Extension:HTMLTags | Documentation: https://www.mediawiki.org/wiki/Extension:HTMLTags | ||
=== 16. FlaggedRevs === | |||
Allows wiki maintainers to '''review edits and ensure that no vandalism is taking place'''. | |||
Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/FlaggedRevs | |||
= LocalSettings.php = | = LocalSettings.php = | ||
| Line 119: | Line 135: | ||
wfLoadExtension( 'Interwiki' ); | wfLoadExtension( 'Interwiki' ); | ||
wfLoadExtension( 'HTMLTags' ); | wfLoadExtension( 'HTMLTags' ); | ||
wfLoadExtension( 'FlaggedRevs' ); | |||
# Make Flagged Revisions Require Approvals | |||
$wgFlaggedRevsDraftVersion = true; | |||
$wgFlaggedRevsAutopromote = false; | |||
# Only require approval in main namespace and templates (NOT user pages) | |||
$wgFlaggedRevsNamespaces = [ NS_MAIN ]; | |||
$wgFlaggedRevsNamespaces = [ NS_MAIN, NS_TEMPLATE ]; | |||
# Site Permissions (give users perms to edit, sysops to review them) | |||
$wgGroupPermissions['user']['edit'] = true; | |||
$wgGroupPermissions['sysop']['review'] = true; | |||
$wgGroupPermissions['sysop']['autoreview'] = true; | |||
$wgGroupPermissions['user']['autoreview'] = false; | |||
</pre> | </pre> | ||
3. Add the following variable at the bottom: | 3. Add the following variable at the bottom: | ||
Latest revision as of 19:40, 21 February 2026
This page describes what is on the testing wiki, what will need to be moved over when the official mecha wiki comes online.
I am able to move everything over on the site-side (e.g. home page, css, templates etc). Most settings are applied during the setup script ran in the web browser when installing MediaWiki.
Personally I'd recommend using Docker (Docker Compose) to install MediaWiki: https://www.mediawiki.org/wiki/Docker/Docker_Hub
To import pages, etc, I would need the following permissions:
- sysop (allows editing pages, protect pages, delete pages, etc)
- interface-admin (allows editing css and javascript)
- bureaucrat (Allows granting sysop to other users or other permissions - this one isn't really needed)
To grant these for a user go to the special page Special:UserRights on the wiki installation.
Wiki Security
edit edit sourceI have added the FlaggedRevs extension to the extension list (with the required configuration along with it) and it lets users with the sysop permission accept changes to then be reflected on the site. But when a sysop edits, those changes aren't required to be reviewed. This will stop vandalism of the wiki.
I would also then protect high-traffic pages such as the templates AND the main page.
Wiki Templates
edit edit sourceI can easily import these later on, just the basics need to be set up first.
- Template:MechaButton (and Template:MechaButton/docs)
- Template:MechaButtons (and Template:MechaButtons/docs) ROW OF MechaButton
Theme (aka Skin)
edit edit sourcehttps://www.mediawiki.org/wiki/Skin:Citizen (Download: https://github.com/StarCitizenTools/mediawiki-skins-Citizen/releases/tag/v3.13.0 (Source Code.zip or .tar.gz, then place in the /Skins folder).
Extensions
edit edit sourceThese extensions are used by the Mecha Wiki and are available from MediaWiki.org.
1. TemplateStyles
edit edit sourceUsed for page-scoped CSS and styling templates. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/TemplateStyles Documentation: https://www.mediawiki.org/wiki/Extension:TemplateStyles
2. ParserFunctions
edit edit sourceRequired for parser functions such as , , and other logic used in templates.
Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/ParserFunctions
Documentation: https://www.mediawiki.org/wiki/Extension:ParserFunctions
3. SyntaxHighlight_GeSHi
edit edit sourceProvides syntax highlighting using the <syntaxhighlight> tag for code blocks.
Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/SyntaxHighlight_GeSHi
Documentation: https://www.mediawiki.org/wiki/Extension:SyntaxHighlight
4. Cite
edit edit sourceAdds support for references using <ref> and <references /> tags.
Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Cite
Documentation: https://www.mediawiki.org/wiki/Extension:Cite
5. CodeEditor
edit edit sourceProvides syntax highlighting and improved editing for templates, CSS, and JavaScript pages. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/CodeEditor Documentation: https://www.mediawiki.org/wiki/Extension:CodeEditor
6. Scribunto
edit edit sourceAdds Lua scripting support for advanced templates and modules. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Scribunto Documentation: https://www.mediawiki.org/wiki/Extension:Scribunto
7. TemplateData
edit edit sourceProvides structured documentation support for templates. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/TemplateData Documentation: https://www.mediawiki.org/wiki/Extension:TemplateData
8. WikiEditor
edit edit sourceAdds the enhanced editing toolbar for the source editor. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/WikiEditor Documentation: https://www.mediawiki.org/wiki/Extension:WikiEditor
9. PageImages
edit edit sourceAllows pages to display preview images and thumbnails. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/PageImages Documentation: https://www.mediawiki.org/wiki/Extension:PageImages
10. TextExtracts
edit edit sourceProvides page summaries used in previews and search results. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/TextExtracts Documentation: https://www.mediawiki.org/wiki/Extension:TextExtracts
11. InputBox
edit edit sourceAllows creation of input forms such as search boxes and page creation forms. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/InputBox Documentation: https://www.mediawiki.org/wiki/Extension:InputBox
12. CategoryTree
edit edit sourceAdds expandable category browsing. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/CategoryTree Documentation: https://www.mediawiki.org/wiki/Extension:CategoryTree
13. ConfirmEdit
edit edit sourceProvides CAPTCHA protection against spam. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/ConfirmEdit Documentation: https://www.mediawiki.org/wiki/Extension:ConfirmEdit
14. Interwiki
edit edit sourceAllows linking between multiple MediaWiki sites. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Interwiki Documentation: https://www.mediawiki.org/wiki/Extension:Interwiki
15. HTMLTags
edit edit sourceAllows safe use of custom HTML tags such as <html> in pages and templates.
Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/HTMLTags
Documentation: https://www.mediawiki.org/wiki/Extension:HTMLTags
16. FlaggedRevs
edit edit sourceAllows wiki maintainers to review edits and ensure that no vandalism is taking place.
Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/FlaggedRevs
LocalSettings.php
edit edit sourceThis is a very important part of the wiki. It's where the config for the wiki goes.
1. Remove all wfLoadSkin and add this one: wfLoadSkin( 'Citizen' );
2. Set wgDefaultSkin to "Citizen"
3. Add the following load extensions for the wiki:
wfLoadExtension( 'TemplateStyles' ); wfLoadExtension( 'ParserFunctions' ); wfLoadExtension( 'SyntaxHighlight_GeSHi' ); wfLoadExtension( 'Cite' ); wfLoadExtension( 'CodeEditor' ); wfLoadExtension( 'Scribunto' ); wfLoadExtension( 'TemplateData' ); wfLoadExtension( 'WikiEditor' ); wfLoadExtension( 'PageImages' ); wfLoadExtension( 'TextExtracts' ); wfLoadExtension( 'InputBox' ); wfLoadExtension( 'CategoryTree' ); wfLoadExtension( 'ConfirmEdit' ); wfLoadExtension( 'Interwiki' ); wfLoadExtension( 'HTMLTags' ); wfLoadExtension( 'FlaggedRevs' ); # Make Flagged Revisions Require Approvals $wgFlaggedRevsDraftVersion = true; $wgFlaggedRevsAutopromote = false; # Only require approval in main namespace and templates (NOT user pages) $wgFlaggedRevsNamespaces = [ NS_MAIN ]; $wgFlaggedRevsNamespaces = [ NS_MAIN, NS_TEMPLATE ]; # Site Permissions (give users perms to edit, sysops to review them) $wgGroupPermissions['user']['edit'] = true; $wgGroupPermissions['sysop']['review'] = true; $wgGroupPermissions['sysop']['autoreview'] = true; $wgGroupPermissions['user']['autoreview'] = false;
3. Add the following variable at the bottom:
# Allow SVG MIME type $wgTrustedMediaFormats[] = 'image/svg+xml'; $wgAllowExternalImages = true;
4. Update $wgLogos to be the following
$wgLogos = [ '1x' => "https://mecha.so/favicon/favicon.ico", 'icon' => "https://mecha.so/favicon/favicon.ico", ];