Setup of a MediaWiki: Difference between revisions
No edit summary |
|||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Each done for: | Each done for: | ||
* [ | * [https://bnw.bnwiki.org bnw.bnwiki.org] | ||
* [ | * [https://de.bnwiki.org de.bnwiki.org] | ||
* [ | * [https://en.bnwiki.org en.bnwiki.org] | ||
* [ | * [https://data.bnwiki.org data.bnwiki.org] | ||
* [ | * [https://sandbox.bnwiki.org sandbox.bnwiki.org] | ||
And before that: | And before that: | ||
* [ | * [https://www.bnwiki.de bnwiki.de] | ||
* [ | * [https://bnw.bnwiki.de bnw.bnwiki.de] | ||
* [ | * [https://data.bnwiki.de data.bnwiki.de] | ||
== First steps == | == First steps == | ||
Line 40: | Line 39: | ||
== Changes to LocalSettings.php == | == Changes to LocalSettings.php == | ||
* Change data properties of LocalSettings.php from 444 to 644 | |||
==== Logo ==== | ==== Logo ==== | ||
## The URL paths to the logo. Make sure you change this from the default, | ## The URL paths to the logo. Make sure you change this from the default, | ||
Line 57: | Line 56: | ||
## To enable image uploads, make sure the 'images' directory | ## To enable image uploads, make sure the 'images' directory | ||
## is writable, then set this to true: | ## is writable, then set this to true: | ||
{{strikethrough|1 = $wgEnableUploads = | {{strikethrough|1 = $wgEnableUploads = false;}} | ||
$wgEnableUploads = | $wgEnableUploads = true; | ||
* Allow the usage of images: Set file attributes for the 'images' directory from '750' to '755'. Use FTP, potentially [[FileZilla]], to access the files. | * Allow the usage of images: Set file attributes for the 'images' directory from '750' to '755'. Use FTP, potentially [[FileZilla]], to access the files. | ||
==== Language ==== | ==== Language ==== | ||
# Site language code, should be one of the list in ./includes/languages/data/Names.php | ## Site language code, should be one of the list in ./includes/languages/data/Names.php | ||
{{strikethrough|1 = $wgLanguageCode = "de";}} | {{strikethrough|1 = $wgLanguageCode = "de";}} | ||
$wgLanguageCode = "en"; | $wgLanguageCode = "en"; | ||
== | == Additions to LocalSettings.php == | ||
# Add more configuration options below. | |||
### Settings ### | |||
# Enable subpages in the main namespace | |||
$wgNamespacesWithSubpages[NS_MAIN] = true; | $wgNamespacesWithSubpages[NS_MAIN] = true; | ||
### Extensions ### | |||
## enhances the wikitext parser with helpful functions, mostly related to logic and string-handling | |||
wfLoadExtension( 'ParserFunctions' ); | wfLoadExtension( 'ParserFunctions' ); | ||
$wgPFEnableStringFunctions = true; | $wgPFEnableStringFunctions = true; | ||
## allows for embedding scripting languages in MediaWiki using the #invoke parser function | |||
wfLoadExtension( 'Scribunto' ); | |||
$wgScribuntoDefaultEngine = 'luastandalone'; | |||
### Permissions ### | |||
## Disable anonymous editing | |||
$wgGroupPermissions['*']['edit'] = false; | |||
## Disable anonymous api writing (automatically disabled if edit permission is removed) | |||
$wgGroupPermissions['*']['writeapi'] = false; | |||
## Disable anonymous page creation | |||
$wgGroupPermissions['*']['createpage'] = false; | |||
$wgGroupPermissions['user']['edit'] = false; | |||
$wgGroupPermissions['user']['createpage'] = false; | |||
$wgGroupPermissions['sysop']['edit'] = true; | |||
$wgGroupPermissions['sysop']['createpage'] = true; | |||
$wgGroupPermissions['sysop']['deletelogentry'] = true; | |||
$wgGroupPermissions['sysop']['deleterevision'] = true; | |||
$wgGroupPermissions['bureaucrats']['edit'] = true; | |||
$wgGroupPermissions['bureaucrats']['createpage'] = true; | |||
==== Subpages ==== | |||
## Enable subpages in the main namespace | |||
$wgNamespacesWithSubpages[NS_MAIN] = true; | |||
=== Extensions === | |||
* [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions ParserFunctions] (needs to be installed, but this is allready done by the MediaWiki installer) | |||
* [https://www.mediawiki.org/wiki/Extension:Scribunto Scribunto] | |||
## enhances the wikitext parser with helpful functions, mostly related to logic and string-handling | |||
wfLoadExtension( 'ParserFunctions' ); | |||
$wgPFEnableStringFunctions = true; | |||
## allows for embedding scripting languages in MediaWiki using the #invoke parser function | |||
wfLoadExtension( 'Scribunto' ); | wfLoadExtension( 'Scribunto' ); | ||
$wgScribuntoDefaultEngine = 'luastandalone'; | $wgScribuntoDefaultEngine = 'luastandalone'; | ||
not used: | |||
* [https://www.mediawiki.org/wiki/Extension:TemplateStyles TemplateStyles] | |||
## introduces a <templatestyles> tag to specify that a stylesheet should be loaded from a wiki page | |||
# wfLoadExtension( 'TemplateStyles' ); | # wfLoadExtension( 'TemplateStyles' ); | ||
Line 109: | Line 147: | ||
==== * (all users, including anonymous) ==== | ==== * (all users, including anonymous) ==== | ||
# Disable anonymous editing | ## Disable anonymous editing | ||
$wgGroupPermissions['*']['edit'] = false; | $wgGroupPermissions['*']['edit'] = false; | ||
# Disable anonymous | ## Disable anonymous api writing (automatically disabled if edit permission is removed) | ||
$wgGroupPermissions['*']['writeapi'] = false; | |||
## Disable anonymous page creation | |||
$wgGroupPermissions['*']['createpage'] = false; | $wgGroupPermissions['*']['createpage'] = false; | ||
Not used: | Not used: | ||
# Disable reading by anonymous users | ## Disable reading by anonymous users | ||
# $wgGroupPermissions['*']['read'] = false; | # $wgGroupPermissions['*']['read'] = false; | ||
# Prevent new user registrations except by sysops | ## Prevent new user registrations except by sysops | ||
# $wgGroupPermissions['*']['createaccount'] = false; | # $wgGroupPermissions['*']['createaccount'] = false; | ||
==== user (registered accounts) ==== | ==== user (registered accounts) ==== | ||
$wgGroupPermissions['user']['edit'] = false; | $wgGroupPermissions['user']['edit'] = false; | ||
Line 133: | Line 171: | ||
==== sysop (content and community admins) ==== | ==== sysop (content and community admins) ==== | ||
$wgGroupPermissions['sysop']['edit'] = true; | $wgGroupPermissions['sysop']['edit'] = true; | ||
$wgGroupPermissions['sysop']['createpage'] = true; | |||
$wgGroupPermissions['sysop']['deletelogentry'] = true; | $wgGroupPermissions['sysop']['deletelogentry'] = true; | ||
$wgGroupPermissions['sysop']['deleterevision'] = true; | $wgGroupPermissions['sysop']['deleterevision'] = true; | ||
Line 144: | Line 183: | ||
==== suppress (?) ==== | ==== suppress (?) ==== | ||
== WIP == | |||
projectmembers | |||
* add new user groups | |||
Special:UserRights | |||
* grant users rights |
Latest revision as of 17:07, 1 June 2024
Each done for:
And before that:
First steps
MediaWiki wurde installiert.
Hilfe zur Verwendung und Konfiguration der Wiki-Software findest du im Benutzerhandbuch.
- Liste der Konfigurationsparameter
- Häufige Fragen zu MediaWiki
- Mailingliste zu neuen Versionen von MediaWiki
- Übersetze MediaWiki für deine Sprache
- Erfahre, wie du Spam auf deinem Wiki bekämpfen kannst
Templates
Templates need to be copied from Wikipedia.
https://en.wikipedia.org/wiki/Category:Wikipedia_templates_by_task
Documentation
https://en.wikipedia.org/wiki/Template:Documentation
Not quite working.
Strikethrough
- https://en.wikipedia.org/wiki/Template:Strikethrough
- https://en.wikipedia.org/w/index.php?title=Template:Strikethrough/doc
Changes to LocalSettings.php
- Change data properties of LocalSettings.php from 444 to 644
Logo
## The URL paths to the logo. Make sure you change this from the default, ## or else you'll overwrite your logo when you upgrade! $wgLogos = ['1x' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",'1x' => "$wgResourceBasePath/resources/assets/WikiLogo.png",'icon' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",'icon' => "$wgResourceBasePath/resources/assets/WikiLogo.png", ];
- Upload under /resources/assets/WikiLogo.png for each Wiki
- Idea: Can all of them link to the same file?
- This changed from an svg to a png - might be worth getting a WikiLogo.png Not quite working.
Images
## To enable image uploads, make sure the 'images' directory ## is writable, then set this to true:$wgEnableUploads = false;$wgEnableUploads = true;
- Allow the usage of images: Set file attributes for the 'images' directory from '750' to '755'. Use FTP, potentially FileZilla, to access the files.
Language
## Site language code, should be one of the list in ./includes/languages/data/Names.php$wgLanguageCode = "de";$wgLanguageCode = "en";
Additions to LocalSettings.php
# Add more configuration options below. ### Settings ### # Enable subpages in the main namespace $wgNamespacesWithSubpages[NS_MAIN] = true; ### Extensions ### ## enhances the wikitext parser with helpful functions, mostly related to logic and string-handling wfLoadExtension( 'ParserFunctions' ); $wgPFEnableStringFunctions = true; ## allows for embedding scripting languages in MediaWiki using the #invoke parser function wfLoadExtension( 'Scribunto' ); $wgScribuntoDefaultEngine = 'luastandalone'; ### Permissions ### ## Disable anonymous editing $wgGroupPermissions['*']['edit'] = false; ## Disable anonymous api writing (automatically disabled if edit permission is removed) $wgGroupPermissions['*']['writeapi'] = false; ## Disable anonymous page creation $wgGroupPermissions['*']['createpage'] = false; $wgGroupPermissions['user']['edit'] = false; $wgGroupPermissions['user']['createpage'] = false; $wgGroupPermissions['sysop']['edit'] = true; $wgGroupPermissions['sysop']['createpage'] = true; $wgGroupPermissions['sysop']['deletelogentry'] = true; $wgGroupPermissions['sysop']['deleterevision'] = true; $wgGroupPermissions['bureaucrats']['edit'] = true; $wgGroupPermissions['bureaucrats']['createpage'] = true;
Subpages
## Enable subpages in the main namespace $wgNamespacesWithSubpages[NS_MAIN] = true;
Extensions
- ParserFunctions (needs to be installed, but this is allready done by the MediaWiki installer)
- Scribunto
## enhances the wikitext parser with helpful functions, mostly related to logic and string-handling wfLoadExtension( 'ParserFunctions' ); $wgPFEnableStringFunctions = true; ## allows for embedding scripting languages in MediaWiki using the #invoke parser function wfLoadExtension( 'Scribunto' ); $wgScribuntoDefaultEngine = 'luastandalone';
not used:
## introduces a <templatestyles> tag to specify that a stylesheet should be loaded from a wiki page # wfLoadExtension( 'TemplateStyles' );
Permissions
If a user is member of different groups, then the user will get a right if it is granted to at least one of these groups even if it is not granted to their other groups.
In other words:
If one of the user's groups has a right, then it is not possible to take the right away using $wgGroupPermissions
.[1]
Instead use RevokePermissions to revoke permissions.
Group | Description | Default right |
---|---|---|
* | all users (including anonymous) | createaccount, createpage, createtalk, edit, editmyoptions, editmyprivateinfo, editmywatchlist, read, viewmyprivateinfo, viewmywatchlist, writeapi |
user | registered accounts | applychangetags, changetags, createpage, createtalk, edit, editcontentmodel, editmyusercss, editmyuserjs, editmyuserjson, minoredit, move, move-categorypages, move-rootuserpages, move-subpages, movefile, purge, read, reupload, reupload-shared, sendemail, upload, writeapi |
autoconfirmed | registered accounts at least as old as $wgAutoConfirmAge and having at least as many edits as $wgAutoConfirmCount | autoconfirmed, editsemiprotected |
bot | accounts with the bot right (intended for automated scripts) | autoconfirmed, autopatrol, apihighlimits, bot, editsemiprotected, nominornewtalk, suppressredirect, writeapi |
sysop | users who by default can delete and restore pages, block and unblock users, et cetera | apihighlimits, autoconfirmed, autopatrol, bigdelete, block, blockemail, browsearchive, createaccount, delete, deletedhistory, deletedtext, editinterface, editprotected, editsemiprotected, editsitejson, edituserjson, import, importupload, ipblock-exempt, managechangetags, markbotedits, mergehistory, move, move-categorypages, move-rootuserpages, move-subpages, movefile, noratelimit, patrol, protect, reupload, reupload-shared, rollback, suppressredirect, unblockself, undelete, unwatchedpages, upload |
interface-admin | users who can edit sitewide CSS/JS | editinterface, editsitecss, editsitejs, editsitejson, editusercss, edituserjs, edituserjson |
bureaucrat | users who by default can change other users' rights | noratelimit, userrights |
suppress | deletelogentry, deleterevision, hideuser, suppressionlog, suppressrevision, viewsuppressed |
* (all users, including anonymous)
## Disable anonymous editing $wgGroupPermissions['*']['edit'] = false; ## Disable anonymous api writing (automatically disabled if edit permission is removed) $wgGroupPermissions['*']['writeapi'] = false; ## Disable anonymous page creation $wgGroupPermissions['*']['createpage'] = false;
Not used:
## Disable reading by anonymous users # $wgGroupPermissions['*']['read'] = false; ## Prevent new user registrations except by sysops # $wgGroupPermissions['*']['createaccount'] = false;
user (registered accounts)
$wgGroupPermissions['user']['edit'] = false; $wgGroupPermissions['user']['createpage'] = false;
autoconfirmed (earned by users)
registered accounts at least as old as $wgAutoConfirmAge and having at least as many edits as $wgAutoConfirmCount
bot (automated scripts)
sysop (content and community admins)
$wgGroupPermissions['sysop']['edit'] = true; $wgGroupPermissions['sysop']['createpage'] = true; $wgGroupPermissions['sysop']['deletelogentry'] = true; $wgGroupPermissions['sysop']['deleterevision'] = true;
interface-admin (users who can edit sitewide CSS/JS)
bureaucrat (user right guardians)
$wgGroupPermissions['bureaucrats']['edit'] = true; $wgGroupPermissions['bureaucrats']['createpage'] = true;
suppress (?)
WIP
projectmembers
- add new user groups
Special:UserRights
- grant users rights
- ↑ GroupPermissions https://www.mediawiki.org/wiki/Manual:$wgGroupPermissions
- ↑ List of groups https://www.mediawiki.org/wiki/Manual:User_rights#List_of_groups