Setup of a MediaWiki: Difference between revisions
(→Logo) |
|||
Line 66: | Line 66: | ||
{{strikethrough|1 = $wgLanguageCode = "de";}} | {{strikethrough|1 = $wgLanguageCode = "de";}} | ||
$wgLanguageCode = "en"; | $wgLanguageCode = "en"; | ||
=== Extensions === | |||
wfLoadExtension( 'ParserFunctions' ); | |||
$wgNamespacesWithSubpages[NS_MAIN] = true; | |||
wfLoadExtension( 'ParserFunctions' ); | |||
$wgPFEnableStringFunctions = true; | |||
wfLoadExtension( 'Scribunto' ); | |||
$wgScribuntoDefaultEngine = 'luastandalone'; | |||
# 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 <code>$wgGroupPermissions</code>.<ref>GroupPermissions https://www.mediawiki.org/wiki/Manual:$wgGroupPermissions</ref> | |||
Instead use [https://www.mediawiki.org/wiki/Manual:$wgRevokePermissions RevokePermissions] to revoke permissions. | |||
{| class="wikitable" | |||
|+ List of groups<ref>List of groups https://www.mediawiki.org/wiki/Manual:User_rights#List_of_groups</ref> | |||
|- | |||
! 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['*']['edit'] = false; | |||
# Disable anonymous editing | |||
$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']['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 (?) ==== |
Revision as of 13:56, 29 January 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
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 = true;$wgEnableUploads = false;
- 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";
Extensions
wfLoadExtension( 'ParserFunctions' ); $wgNamespacesWithSubpages[NS_MAIN] = true; wfLoadExtension( 'ParserFunctions' ); $wgPFEnableStringFunctions = true; wfLoadExtension( 'Scribunto' ); $wgScribuntoDefaultEngine = 'luastandalone'; # 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['*']['edit'] = false; # Disable anonymous editing $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']['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 (?)
- ↑ GroupPermissions https://www.mediawiki.org/wiki/Manual:$wgGroupPermissions
- ↑ List of groups https://www.mediawiki.org/wiki/Manual:User_rights#List_of_groups