Rozšíření:EditNotify
Stav rozšíření: stabilní |
|
|---|---|
| Implementace | Oznámení |
| Popis | Rozšíření pro oznámení o vytváření/úpravách stránky |
| Autoři | Abhinand and Yaron Koren |
| Nejnovější verze | 1.1.2 (května 2026) |
| Zásady kompatibility | Větev master zachovává zpětnou kompatibilitu. |
| MediaWiki | >= 1.36.0 |
|
|
| Licence | Licence MIT |
| Stáhnout | |
| Přeložte rozšíření EditNotify, používá-li lokalizaci z translatewiki.net | |
| Problémy | Otevřené úkoly · Nahlásit chybu |
EditNotify je rozšíření MediaWiki, které umožňuje uživatelům dostávat oznámení při vytváření a úpravě stránky. Rozšíření používá rozšíření Echo k upozornění uživatelů.
Funkce
Rozšíření umožňuje registrovaným uživatelům dostávat upozornění na:
- Vytváření nových stránek
- Jakákoli úprava existujících stránek
- Změna konkrétního pole šablony
- Změna konkrétního pole šablony na konkrétní hodnotu šablony
Všichni uživatelé přihlášení k některé z výše uvedených událostí budou upozorněni jednoduchou výstražnou zprávou (Echo notification) a e-mailem. Možné sady stránek, o kterých si uživatelé mohou zvolit, že budou upozorněni, jsou:
- Všechny stránky - sledovat změny nebo vytvoření všech stránek
- All pages in one or more namespaces
- All pages in one or more categories
Instalace
- Nainstalujte rozšíření Echo , které je potřeba k tomu, aby toto rozšíření fungovalo.
- Stáhněte si kód přes Git nebo soubor zip soubor/y a vložte je do adresáře pojmenovaného
EditNotifyve vaší složceextensions/. - Na konec vašeho souboru LocalSettings.php přidejte následující kód:
wfLoadExtension( 'EditNotify' );
- Vyžaduje nastavení v konfiguračním souboru.
- Yes Dokončeno – Přejděte na stránku
Special:Versionvaší wiki a zkontrolujte, zda bylo rozšíření úspěšně nainstalováno.
Configuration
- The array
$wgEditNotifyAlertsshould be added to your "LocalSettings.php", and usernames can be added to each sub-array within it to get that set of users notified of the respective events. - Template field names, or template field name/value pairs, can be added if you wish to track those changes. Namespaces or categories to be tracked can also be added to the respective 'namespace' or 'category' keys in the array.
- If a user wishes to receive a notification on all pages, then the category and namespace keys can be omitted.
$wgEditNotifyAlerts = [ [ 'action' => 'create', 'users' => [ 'user1', 'user2' ] ], [ 'action' => 'edit', 'namespace' => 'namespace name', 'users' => [ 'user2' ] ], [ 'action' => 'edit', 'namespace' => 'namespace name', 'category' => 'category name', 'users' => [ 'user1' ] ], [ 'action' => 'edit', 'namespace' => 'namespace name', 'category' => 'category name', 'template' => 'template name', 'templateField' => 'field name', 'users' => [ 'user1', 'user2' ] ], [ 'action' => 'edit', 'namespace' => 'namespace name', 'category' => 'category name', 'template' => 'template name', 'templateField' => 'field name', 'templateFieldValue' => 'field value', 'users' => [ 'user1', 'user2' ] ], ... ];
Examples
Users can be notified of create and edit events for all pages. In the example below, Joe will be notified if any page is created or edited.
[ 'action' => [ 'create', 'edit' ], 'users' => [ 'Joe' ] ],
Say, if users David and Ram have to get notified when a page is created, the user John has to get notified when a non-template page in the 'User' namespace is edited, and Charles has to track the edit event in 'Uniwiki' category, then the array would look something like:
$wgEditNotifyAlerts = [ [ 'action' => 'create', 'users' => [ 'David', 'Ram' ] ], [ 'action' => 'edit', 'namespace' => 'User', 'users' => [ 'John' ] ], [ 'action' => 'edit', 'category' => 'Uniwiki', 'users' => [ 'Charles' ] ], .... ];
George and Ann will be notified of the change in template value if the field value of 'full name' changes in the template 'User info' in the 'User' and 'Talk' namespaces. Mia will be notified of the change in the field value of 'full name' in the template 'User info' on any page.
.... [ 'action' => 'edit', 'namespace' => [ 'User', 'Talk' ], 'template' => 'User info', 'templateField' => 'full name', 'users' => [ 'George', 'Ann' ] ], [ 'action' => 'edit', 'template' => 'User info', 'templateField' => 'full name', 'users' => [ 'Mia' ] ], ...
If a page in the 'User' namespace includes a template called 'User info' with a field called 'full name' whose value changes to 'Albert Albertson', Brennan will be notified of this event.
[ 'action' => 'edit', 'namespace' => 'User', 'template' => 'User info', 'templateField' => 'full name', 'templateFieldValue' => 'Albert Albertson', 'users' => [ 'Brennan' ] ], ...
As expected, you can add as many arrays to $wgEditNotifyAlerts as you want to handle additional events.
Version history
- 1.0.0 - August 22, 2016 - Initial version
- 1.1 - February 21, 2024 - Removed support for MW < 1.36; many coding improvements and bug fixes
- 1.1.1 - April 15, 2025 - Improved support for MW 1.37+
- 1.1.2 - May 27, 2026 - Improved support for MW 1.45+; coding improvements