Erweiterung:MassEditRegex
![]() Freigabestatus: stabil |
|
---|---|
![]() |
|
Einbindung | Seitenaktivität , Spezialseite |
Beschreibung | Allows for using regular expressions to edit multiple pages at once |
Autor(en) | Adam Nielsen (MalvineousDiskussion) |
Letzte Version | 8.4.1 (2019-12-28) |
MediaWiki | 1.29+ |
Datenbankänderungen | Nein |
Lizenz | GNU General Public License 2.0 oder neuer |
Herunterladen | |
|
|
Quarterly downloads | 62 (Ranked 111st) |
Übersetze die MassEditRegex-Erweiterung, wenn sie auf translatewiki.net verfügbar ist | |
Probleme | Offene Aufgaben · Einen Fehler melden |
The MassEditRegex extension allows administrators perform a single edit across multiple pages in one step, by running a regular expression over the content of each page. This is well suited to performing simple edits such as renaming a template, adding pages to a category, or correcting typos (all of which can be done in the same edit operation by supplying multiple regular expressions.)
Verwendung
Sobald die Erweiterung installiert und das Recht masseditregex
zur Verwendung von MassEditRegex gegeben wurde, gehe zu "Special:MassEditRegex" und fülle das Bearbeitungsformular aus.
Familiarity with regular expressions is required to use this extension.
Funktionen
- Page iteration can be done on the client side, so PHP maximum execution time is no longer an issue when editing large numbers of pages.
- Transform each page using one or more regular expressions in a single step.
- Edits appear as "bot" so they don't show up in the normal edit list (unless the user chooses to show bot edits).
- Only users with the
masseditregex
permission can perform changes. - A new "edit all" tab appears on category pages and on Special:WhatLinksHere, for editing all listed pages at once.
- Pages to edit can be specified as:
- A list of page names
- A list of page name prefixes (e.g. "Test" will match pages called "Testing" and "Tested")
- A list of categories (all pages within the categories will be edited)
- A list of backlinks (pages edited are those linking to the ones in the list)
Installation
- Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens
MassEditRegex
im Ordnerextensions/
ablegen. - Folgenden Code am Ende der
LocalSettings.php
einfügen:wfLoadExtension( 'MassEditRegex' );
- Konfiguriere Benutzergruppen- und Benutzerrechte nach Belieben.
Erledigt – Zu Special:Version in dem Wiki (bei Einstellung auf deutsch nach Spezial:Version) navigieren, um die erfolgreiche Installierung der Erweiterung zu überprüfen.
Für Benutzer, die MediaWiki in der Version 1.34 und früher betreiben:
Die oben stehenden Anweisungen beschreiben die neue Installationsanweisung für diese Erweiterung unter der Verwendung von wfLoadExtension()
.
Wird diese Erweiterung in einer dieser früheren Versionen (MediaWiki 1.34 und früher) – an Stelle von wfLoadExtension( 'MassEditRegex' );
– installiert, benutze:
require_once "$IP/extensions/MassEditRegex/MassEditRegex.php";
Konfiguration
This extension comes with an extra user right called "masseditregex
" to allow fine grained control of which user groups may use this extension.
Standardmäßig ist es keiner Benutzergruppe zugewiesen.
In case you would like to assign it to a user group e.g. "masseditregexeditor
", add the following code to your "LocalSettings.php
" file right after the lines added in step (3) of the installation process:
$wgGroupPermissions['masseditregexeditor']['masseditregex'] = true;
Alternatively you may grant the permission to an existing user group, e.g. "sysop
" by adding the following line:
$wgGroupPermissions['sysop']['masseditregex'] = true;
Tipps
- Hinzufügen von Inhalten oben auf der Seite
- Detect any first character at the beginning of a page: → Search for:
/^(.)/
- Prepend my content to the char found a the beginning of a page including a line break: → Replace with:
MyContent\n$1
Bekannte Probleme
- Server-side execution is the default as it (should) be faster.
However editing large numbers of pages will cause server timeouts due to PHP limits on script execution time. To work around this (and perhaps to get better feedback on progress) you can tick "execute in browser" to have the job tracking done on the client-side. This should mean timeouts are no longer a problem.
- Seite nicht gefunden
In (at least) MediaWiki 1.31 and later, when the regex you provide is invalid, it will falsely indicate that all of the pages you selected for replacement are not found.
- Replacement in certain namespaces
If you would like to replace text only in certain namespaces, e.g. "File" and enter this with the page prefix option you will get the following note: "Error: The MediaWiki API returned the error code invalidtitle: Bad title "File:"."
Siehe auch
- Erweiterung:Text ersetzen — Eine ähnliche Erweiterung, die jedoch nicht funktionieren wird, wenn du
$wgCompressRevisions = true;
für dein Wiki einstellst.
![]() | Diese Erweiterung ist in den folgenden Paketen und/oder WikiFarmen beinhalten: This is not an authoritative list. Some wiki farms/hosts may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
- Stable extensions/de
- Page action extensions/de
- Special page extensions/de
- GPL licensed extensions/de
- Extensions in Wikimedia version control/de
- BaseTemplateToolbox extensions/de
- SkinTemplateNavigation::Universal extensions/de
- All extensions/de
- Extensions included in Miraheze/de
- Extensions included in MyWikis/de
- Extensions included in ProWiki/de
- Extensions included in WikiForge/de
- Edit extensions/de