Setup of a MediaWiki: Difference between revisions
(Die Seite wurde neu angelegt: „Each done for: * bnw.bnwiki.org * de.bnwiki.org * en.bnwiki.org * data.bnwiki.org * sandbox.bnwiki.org And before that: * bnwiki.de * bnw.bnwiki.de * de.bnwiki.de * data.bnwiki.de === Functionality === * Allow the usage of images: Set file attributes for the 'images' directory from '750' to '755'.“) |
No edit summary |
||
(17 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 == | ||
* Allow the usage of images: Set file attributes for the 'images' directory from '750' to '755'. | <strong>MediaWiki wurde installiert.</strong> | ||
Hilfe zur Verwendung und Konfiguration der Wiki-Software findest du im [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents Benutzerhandbuch]. | |||
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Liste der Konfigurationsparameter] | |||
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Häufige Fragen zu MediaWiki] | |||
* [https://lists.wikimedia.org/postorius/lists/mediawiki-announce.lists.wikimedia.org/ Mailingliste zu neuen Versionen von MediaWiki] | |||
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Übersetze MediaWiki für deine Sprache] | |||
* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam 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.[[Category:ToDo (Should)]] | |||
=== 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 = [ | |||
{{strikethrough|1 = '1x' => "$wgResourceBasePath/resources/assets/change-your-logo.svg",}} | |||
'1x' => "$wgResourceBasePath/resources/assets/WikiLogo.png", | |||
{{strikethrough|1 = '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.[[Category:ToDo (Could)]] | |||
==== Images ==== | |||
## To enable image uploads, make sure the 'images' directory | |||
## is writable, then set this to true: | |||
{{strikethrough|1 = $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 | |||
{{strikethrough|1 = $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 === | |||
* [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' ); | |||
$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' ); | |||
=== 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['*']['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 |
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