Toggle menu
2
2
238
MechaWiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Wiki Notes: Difference between revisions

From MechaWiki
No edit summary
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 :)
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 98: Line 111:
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 121: Line 139:
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:

Revision as of 19:33, 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

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

I 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)

https://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

These extensions are used by the Mecha Wiki and are available from MediaWiki.org.

Extensions

These extensions are used by the Mecha Wiki and are available from MediaWiki.org.

1. TemplateStyles

Used 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

Required 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

Provides 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

Adds 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

Provides 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

Adds 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

Provides structured documentation support for templates. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/TemplateData Documentation: https://www.mediawiki.org/wiki/Extension:TemplateData

8. WikiEditor

Adds 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

Allows 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

Provides 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

Allows 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

Adds expandable category browsing. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/CategoryTree Documentation: https://www.mediawiki.org/wiki/Extension:CategoryTree

13. ConfirmEdit

Provides CAPTCHA protection against spam. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/ConfirmEdit Documentation: https://www.mediawiki.org/wiki/Extension:ConfirmEdit

14. Interwiki

Allows linking between multiple MediaWiki sites. Download: https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Interwiki Documentation: https://www.mediawiki.org/wiki/Extension:Interwiki

15. HTMLTags

Allows 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

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

This 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",
];