Erweiterung:Approved Revs

From mediawiki.org
This page is a translated version of the page Extension:Approved Revs and the translation is 47% complete.
Outdated translations are marked like this.
MediaWiki-Erweiterungen
Approved Revs
Freigabestatus: stabil
Einbindung Hook
Beschreibung Erlaubt Administratoren bestimmte Revisionen einer Seite als "approved", also bestätigt, zu markieren
Autor(en) Yaron Koren <yaron57@gmail.com> and others
Letzte Version 2.0 (Februar 2024)
Kompatibilitätspolitik Der Master behält die Abwärtskompatibilität bei.
MediaWiki 1.37+
Datenbankänderungen Ja
Composer mediawiki/approved-revs
Tabellen approved_revs
approved_revs_files
Lizenz GNU General Public License 2.0 oder neuer
Herunterladen
  • $egApprovedRevsBlankIfUnapproved
  • $egApprovedRevsEnabledNamespaces
  • $egApprovedRevsAutomaticApprovals
  • $egApprovedRevsFileAutomaticApprovals
  • $egApprovedRevsShowNotApprovedMessage
  • $egApprovedRevsBlankFileIfUnapproved
  • $egApprovedRevsSelfOwnedNamespaces
  • $egApprovedRevsShowApproveLatest

  • viewlinktolatest
  • approverevisions
  • viewapprover
Übersetze die Approved Revs-Erweiterung, wenn sie auf translatewiki.net verfügbar ist
Probleme Offene Aufgaben · Einen Fehler melden

Approved Revs ist eine Erweiterung die Administratoren bestimmte Revisionsstände einer Seiten als "bestätigt" markieren lassen kann. Die bestätigte Revision ist die einzige angezeigte, wenn Benutzer die Seite über den Haupt-URL ansehen.

Auch wenn eine Revision bestätigt wurde, werden die meisten Erweiterungen den Seiteninhalt der letzten Revision anzeigen und nicht die bestätigte (wenn sich beide unterscheiden). Erweiterungen die die Spezifikation data von der Seite erhalten, wie z.B. Cargo , Semantic MediaWiki und DynamicPageList , werden leider als korrekte (z.B. bestätigte) Daten angezeigt.

Herunterladen

Man kann den Approved Revs Code als ZIP unter https://github.com/wikimedia/mediawiki-extensions-ApprovedRevs/archive/2.0.zip herunterladen.

Du kannst auch den Code direkt mit Git vom MediaWiki-Quellcode-Repositorium herunterladen. In der Kommandozeile gibt man folgendes ein:

git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ApprovedRevs.git

Um den Code online inklusive Versionsverlauf für jede Datei zu sehen, geht man zu phab:diffusion/EARE/browse/master/.

Installation

Um diese Erweiterung zu installieren, erstelle das Verzeichnis ApprovedRevs (entweder beim Entpacken oder downloaden über Git) und setze das Verzeichnis in das Hauptverzeichnis extensions von MediaWiki. Schreibe dann folgendes in die Datei LocalSettings.php:

wfLoadExtension( 'ApprovedRevs' );

Man muss dann noch zwei Datenbanktabellen für die Erweiterungen approved_revs und approved_revs_files installieren. Man kann dies auf eine von zwei Möglichkeiten tun: Entweder startet man das Skript update.php im MediaWiki-Verzeichnis /maintenance oder man ruft SQL direkt in seiner Datenbank auf - man findet es in den Dateien ApprovedRevs.sql und ApprovedFiles.sql, beide im Verzeichnis /sql der Erweiterung.

Schlussendlich finden sich folgende Special:MyLanguage/Manual:User rights definiert für Approved Revs:

  • 'approverevisions' - Die Erlaubnis Revisionen für Seiten zu bestätigen bzw. wieder zu entziehen. Grundsätzlich sind diese den Mitglieder der Gruppe 'sysop" erteilt.
  • 'viewlinktolatest' - Die Erlaubnis/Befähigung Notizen oben auf der Seite zu sehen, dass diese eine Revision hat. Diese Notiz besagt, dass die angezeigte Version nicht die unbedingt die letzte Version sein muss. Als Grundeinstellung für jeden erteilt (z.B. '*').
  • 'viewapprover' - Die Erlaubnis Notizen anderer oben auf der Seite zu sehen, das die Revision bestätigt wurde und wer dies freigegeben hatte. Grundeinstellung ist allen Mitgliedern der Gruppe 'sysop' gegeben.

Du kannst einstellen welche Benutzer diese Rechte haben sollen. Um zum Beispiel das Recht "Letzte Revision sehen" zeigt der Link nur für Administrotoren, könntes Du folgendes unterhalb der Einbindung von Approved Revs hinzufügen:

$wgGroupPermissions['*']['viewlinktolatest'] = false;
$wgGroupPermissions['sysop']['viewlinktolatest'] = true;

Autoren

Approved Reves wurde von Yaron Koren geschrieben. Wichtige Code-Beiträge waren von Raimond Spekking, Siebrand Mazeland, Jeroen De Dauw, Eli Handel, Andrew Engelbrecht, hashar, Anomie, Mark Hershberger, Flo, Addshore, James Montalvo, Fodagus, Kris Field und anderen.

Verwendung

Eine Seite mit Histrienangaben mit "Bestätigungs" Links mit einem Stern und einem "unbestätigen" Link für bestätigte Revisionen.

Wenn die Erweiterung installiert, kann jeder mit der approverevisions Befähgigung einen Link sehen, der in der Spalte der Versionsseite "(approved") anzeigt. Durch Auswahl dieses Links wird die Revision als bestätigt gesetzt. Wenn man dann zurück zur seite Versionsgeschichte geht, sieht man einen "bestätigen"-Link neben jeder anderen Revision zusammen mit einem "ablehnen"-Link für die bereits bestätigte Revision; die Spalte der bestätigten Revisionen wird daneben einen Stern anzeigen. Wenn "bestätigen" irgend einer anderen Revision angeclickt wird, setzt die Bestätigung jeweils zurück; wenn "ablehnen" ausgewählt wird, bedeutet dies, dass es nicht länger eine bestätigte Revision dieser Seite existiert.

Benutzer ohne approverevisions Recht werden nichts Spezielles in der Versionsgeschichte sehen, ausser einen Stern bei der bestätigten Revision.

Durch Grundeinstellung: Wenn ein Benutzer mit der Berechtigung approverevisions eine Änderung auf der Seite durchführt, die bereits eine bestätigte Revision hat, die z.B. die letzte Revision der Seite ändert, setzt diese automatisch als bestätigt. Wenn im Gegensatz dazu eine Seite keine bestätigte Revision hat (dies beinhaltet selbstverständlich auch neue Seiten), werden keine automatische Bestätigtungen durchgeführt. The one exception to this is if $egApprovedRevsBlankIfUnapproved is set to true for the wiki; if it is, any edit by an approverevisions-permitted user to an unapproved page will also automatically become approved, thus turning that page non-blank.

Man kann auch automatisierte Bestätigungen ausschalten, wobei dann jede Bestätigung manuell durch Hinzufügen in der LocalSettings.php unterhalb des eingefügten Abschnittes von Approved Revs, durchgeführt werden muss.

$egApprovedRevsAutomaticApprovals = false;

Eine ähnliche Logik gilt sinngemäss für neue Versionen von Dateien; diese automatisierte Bestätigung kann auch automatisch durch einfügen folgender Zeile ausgeschaltet werden:

$egApprovedRevsFileAutomaticApprovals = false;

Conversely, if you set "$egApprovedRevsBlankIfUnapproved" or "$egApprovedRevsBlankFileIfUnapproved" to true in LocalSettings.php (see below), every edit to pages and/or files made by a user with 'approverevisions' permission becomes approved - even edits to pages/files that don't have an approved revision.

Manual revision approvals and unapprovals get stored in the 'approval' log; though approvals that happen automatically, as a result of someone with approval power editing a page, do not.

Special:ApprovedRevs page

Approved Revs legt eineeine Spezialseite an, "Special:ApprovedRevs" welche 4 separate Listen aufzeigt:

  • Alle Seiten, deren bestätigte Version nicht die Neueste ist
  • Alle Seiten mit bestätigten Versionen
  • Seiten mit unbestätigten Versionen (alle Seiten ohne bestätigter Version)
  • Seiten mit ungültigen Bestätigungen (sowohl Seiten im Namespace die zuvor nicht länger bestätigt waren)

Für die dritte Liste von Seiten mit nicht bestätigten Versionen, kann man wahlweise einen Link auf jeder Seite integrieren, dass die letzte Version bestätigt wurde. Um solch einen Link einzufügen, fügt man folgendes zu LocalSettings.php ein:

$egApprovedRevsShowApproveLatest = true;

Auflistung bestätigter Informationen

Informationen über Bestätigungen - wer sie gemacht hatte und wann - sind in "Letze Änderungungen"-Log abgelegt, welche auf der Seite Special:Log (Letzte Änderungen) angesehen werden können. Letzte Bestätigungen werden unter Special:RecentChanges gezeigt.

Unbestätigte Seiten als leere Seite anzeigen

If you want to, you can have pages that have no approved revision show up as blank - users will still be able to see all the revisions if they click on the "history" tab, but the main display will be a blank page. To do that, just add the following line to LocalSettings.php, anywhere after the inclusion of Approved Revs:

$egApprovedRevsBlankIfUnapproved = true;

Similarly, you can set files with no approved version to not show up when embedded in other pages, by adding the following line:

$egApprovedRevsBlankFileIfUnapproved = true;

Anzeige unbestätigter Seiten

By default, pages with no approved revision simply show up normally, with no indication of their status. You can have such pages display a message at the top saying, "This is the latest revision of this page; it has no approved revision." To do that, add the following line to LocalSettings.php:

$egApprovedRevsShowNotApprovedMessage = true;

Seiten als bestätigt setzen

Some wiki pages can have their revisions approved, while others cannot; this is determined in one of three ways.

Setting all pages in a namespace as approvable

A global variable, $egApprovedRevsEnabledNamespaces, exists, which determines which namespaces are handled by the extension. This variable is an array, and by default it holds six namespaces: NS_MAIN (defined as 0, the main namespace), NS_USER (2, user pages), NS_FILE (6, files), NS_TEMPLATE (10, templates), NS_HELP (12, help pages) and NS_PROJECT (4, the project namespace, which usually has the same name as the wiki). You can add additional namespaces to this set - after the inclusion of Approved Revs in LocalSettings.php, add something like:

$egApprovedRevsEnabledNamespaces[NS_USER_TALK] = true;

It is not recommended to add the Category or MediaWiki namespaces to this array, because, due to their special implementation in MediaWiki, approvals will not work correctly on those pages.

To remove default namespaces as approvable, set their value to false. For example, to make files unapprovable, add the following:

$egApprovedRevsEnabledNamespaces[NS_FILE] = false;

Making pages approvable with #approvable_by

Approved Revs defines the #approvable_by parser function, which lets you define certain pages as being approvable by certain individual users and groups. For example, the following call would allow user Alice Jones, as well as users in the Bureaucrat and Sysop groups, to approve the page on which it was called:

{{#approvable_by: users = Alice Jones | groups = bureaucrat,sysop }}

Note that, if a user who is allowed to edit a page because of this parser function approves a revision before this function was added, then they will lose the ability to make any other approvals (since the approved revision does not contain this call), until an administrator comes in and undoes their action.

Setting pages approvable via magic word

Individual pages not within one of the specified namespaces can also be made approvable, by adding the __APPROVEDREVS__ magic word anywhere within the page. It is recommended to add in this magic word to pages via a template. If __APPROVEDREVS__ is added directly to a page, just be careful not to approve a revision of the page from before that string was added; this could lead to unexpected behavior.

Letting non-administrators "own" pages

Sometimes it's helpful to allow those without the general 'approverevisions' permission to be able to approve revisions of certain pages - in other words, to have ownership of certain pages. An obvious example is user pages - it makes sense to allow each user to be able to approve revisions on their own user pages. For namespaces other than "User", you can choose to have the user who originally created any page in that namespace be designated as the page owner, who then has revision-approval permission for that page.

To have this kind of "ownership" for a specific namespace, you need to add the namespace to the variable $egApprovedRevsSelfOwnedNamespaces. To allow users to "own", i.e. be able to approve, pages in the main and user namespaces, for instance, you should add the following to LocalSettings.php:

$egApprovedRevsSelfOwnedNamespaces = array( NS_MAIN, NS_USER );

A namespace needs to belong to $egApprovedRevsEnabledNamespaces before it can be added to $egApprovedRevsSelfOwnedNamespaces.

Anzeige von Informationen um Bestätigungen

Approved Revs defines five "magic words" that can be used to display approval information about a specific page (or file). Diese sind:

  • APPROVALYEAR - the year in which the page was last approved
  • APPROVALMONTH - the month in which the page was last approved
  • APPROVALDAY - the day of the month in which the page was last approved
  • APPROVALTIMESTAMP - the full timestamp of the date/time in which the page was last approved
  • APPROVALUSER - the user who last approved the page.

All five can be simply called by themselves (which will return that information for the page on which the call is located), or called with a page name passed in (which will return that information for the specified page). So, for example, in the page "Main Page", the call {{APPROVALYEAR}} will display the year in which the page "Main Page" was last approved, while the call {{APPROVALYEAR:Employees list}} will display the year in which the page "Employees list" was last approved.

If any of these magic words are called for a page that has no approved revision, or for a page that does not exist, they will simply not display anything.

The first four of these magic words can also be called for files; the last one, APPROVALUSER, unfortunately will not work.

Note that, if you began using Approved Revs before version 1.4, the first four magic words, which all have to do with the time in which the revision was made, will most likely display a blank for any page whose revision was approved while Approved Revs was still on an older version.

API

Approved Revs defines an API action, "approve", which lets you either approve or (if the extra parameter "unapprove" is added) unapprove any revision via the MediaWiki API. See here for an explanation of the syntax for this API.

Marking all pages as approved

For pages that do not yet have an approved revision, you may want to automatically approve their latest revision, as a way to quickly initialize their content. For that, you can use the command line script 'ApprovedRevs/maintenance/approveAllPages.php'. This script approves the latest revision of all pages that can be approved but do not have an approved revision. (The script has various optional flags, including one that lets you also handle pages that already do have an approved revision.)

File approvals

Selecting version of a file to be approved

You can also approve file revisions with Approved Revs. It should be noted that only revisions to the actual file are approvable; revisions to the wikitext of the file pages are not. As such, approval of files is not done by clicking the "view history" link in the top-right of the file's page. Instead, scroll to the "File history" section near the bottom of the file page, and click "approve" on the right of the file history table.

When a version of an image is approved, that version is displayed when the image is included on other pages. For non-image uploads (e.g. PDFs), any links directly to the file will go to the approved version, not the latest.

Just like the approveAllPages.php script, there is another script, approveAllFiles.php, that exists specifically for file approvals.

Versionsgeschichte

Approved Revs liegt derzeit bei Version 2.0. Siehe die ganze Versionsgeschichte.

Bekannte Probleme

  • Approved Revs does not work for anonymous users with the AccessControl extension - approving a revision leads to a "Deny_action" error, because these users do not have access to history.

Beiträge zu diesem Projekt

Bugs and feature requests

Sende Deine Bug-Hinweise und Anfragen an Yaron Koren (yaron57@gmail.com).

Contributing patches to the project

If you found some bug and fixed it, or if you wrote code for a new feature, please either do a Git commit for it, or create a patch by going to the "ApprovedRevs" directory, and typing:

git diff > descriptivename.patch

If you create a patch, please send it, with a description, to Yaron Koren.

Übersetzung

Übersetzung von Approved Revs wird von translatewiki.net gemacht. Die Übersetzung für diese Erweiterung findet man hier: https://translatewiki.net/w/?title=Special:Translate&group=ext-approvedrevs. Um Sprachübersetzungen oder Änderungen zu ergänzen, solltest Du ein Konto bei translatewiki.net erstellen, dann einen Antrag auf Erlaubnis beim Administrtor stelle um dann bestimmte Sprache oder Sprachen diese Seite zu erstellen (das ist ein sehr einfacher Vorgang). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.

Siehe auch