Rozšíření:PageNotice
Appearance
Stav rozšíření: stabilní |
|
|---|---|
| Implementace | Oznámení |
| Popis | Umožňuje definovat pevnou zprávu pro záhlaví nebo zápatí pro každou stránku nebo jmenný prostor |
| Autoři | Daniel Kinzler (Duesentriebdiskuse) |
| MediaWiki | 1.29+ |
| Licence | GNU General Public License 2.0 nebo novější |
| Stáhnout | |
|
|
| Přeložte rozšíření PageNotice, používá-li lokalizaci z translatewiki.net | |
| Problémy | Otevřené úkoly · Nahlásit chybu |
The PageNotice extension provides a way to create a fixed notice message on the top or the bottom of either:
- an entire namespace (by Jmenný prostor number)
- an individual page (by page name, if the extension is configured to allow it)
Usage
Wiki administrators can define a page notice by creating a new page in MediaWiki namespace following a special page-naming pattern, and then writing the notice in that new page.
- The top notice for pages in namespace NN goes in
[[MediaWiki:top-notice-ns-NN]](where NN is the numeric namespace ID). - The bottom notice for pages in namespace NN goes in
[[MediaWiki:bottom-notice-ns-NN]](where NN is the numeric namespace ID).
If enabled:
- The top notice for page XXX goes in
[[MediaWiki:top-notice-XXX]]. - The bottom notice for page XXX goes in
[[MediaWiki:bottom-notice-XXX]].
Examples
This will put the phrase: "Welcome to this wiki - you can edit every page!" at the top of every page in the main namespace:
- Create a new page named:
- [[mediawiki:top-notice-ns-0]]
- Add the page contents:
'''Welcome to this wiki - you can edit every page!'''
This will put a blue banner saying "Welcome to this wiki - you can edit every page!" at the bottom of every page in the main namespace:
- Create a new page named:
- [[mediawiki:bottom-notice-ns-0]]
- Add the page contents:
<div style="margin-left: 1em; color: var(--color-base, #202122); background: var(--background-color-content-added, #a3d3ff)">'''''Welcome to this wiki - you can edit every page!'''''</div>
- Result looks like this:
- Welcome to this wiki - you can edit every page!
Installation
- Stáhněte soubor/y a vložte je do adresáře pojmenovaného
PageNoticeve vaší složceextensions/.
Vývojáři a přispěvatelé kódu by si místo toho měli nainstalovat rozšíření from Git pomocí:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/PageNotice
- Na konec vašeho souboru LocalSettings.php přidejte následující kód:
wfLoadExtension( 'PageNotice' );
- Configure as required.
Dokončeno – Přejděte na stránku Special:Version vaší wiki a zkontrolujte, zda bylo rozšíření úspěšně nainstalováno.
Configuration
$wgPageNoticeDisablePerPageNotices- If set to
true, notices on the per-page level are disabled; only namespace level notices will appear. The default value isfalse. - On Wikimedia wikis this is set to
true.
See also
- Extension:Header_Footer - Provides per-namespace or per-page header & footer inclusion without depending on any other extension.
- Manual:Interface/Sitenotice - The sitewide header notice, a standard MediaWiki feature.
| Toto rozšíření se používá na jednom nebo více projektech Wikimedia. Pravděpodobně to znamená, že rozšíření je stabilní a funguje dostatečně dobře, aby jej mohly používat weby s tak vysokou návštěvností. Vyhledejte tento název rozšíření v konfiguračních souborech CommonSettings.php a InitialiseSettings.php Wikimedie, abyste viděli, kde je nainstalováno. Úplný seznam rozšíření nainstalovaných na konkrétní wiki lze vidět na stránce wiki Special:Version. |
| Toto rozšíření je zahrnuto v následujících wiki farmách/hostitelích a/nebo balíčcích: |
