Rozšíření:PageNotice
![]() Stav rozšíření: stabilní |
|
---|---|
Zavádění | Oznámení |
Popis | Umožňuje definovat pevnou zprávu pro záhlaví nebo zápatí pro každou stránku nebo jmenný prostor |
Napsal(i) | Daniel Kinzler (Duesentriebdiskuse) |
MediaWiki | 1.29+ |
Licence | GNU General Public License 2.0 nebo pozdější |
Zdrojový kód | |
|
|
Čtvrtletní stahování | 46 (Ranked 124th) |
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 messages on the top or the bottom of
- a page (by individual page name), or
- entire namespaces (by Manuál:Jmenný prostor number).
You can define new fixed MediaWiki messages by creating new pages following a special page-naming pattern to hold that message, and then creating your desired message as the contents of that new page:
Usage
- top notice for page XXX goes in
[[MediaWiki:top-notice-XXX]]
- bottom notice for page XXX goes in
[[MediaWiki:bottom-notice-XXX]]
- top notice for pages in namespace NNN goes in
[[MediaWiki:top-notice-ns-NNN]]
(where NNN is the numeric namespace ID) - bottom notice for pages in namespace NNN goes in
[[MediaWiki:bottom-notice-ns-NNN]]
(where NNN is the numeric namespace ID)
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 New Page, name:
- [[mediawiki:top-notice-ns-0]]
- Create new 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:
- Create New Page, name:
- [[mediawiki:bottom-notice-ns-0]]
- Create new page contents:
{| cellspacing="5" cellpadding="0" style="margin: 0em 0em 1em 0em; border: 1px solid #1DA0E7; background: #B3DDF4; width: 100%" | '''''Welcome to this wiki - you can edit every page!''''' |}
- 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
PageNotice
ve vaší složceextensions/
. - Následující kód přidejte na konec vašeho souboru
LocalSettings.php
: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.
Pro ty, kteří používají MediaWiki 1.33 a starší:
Výše uvedené instrukce se týkají instalace přes wfLoadExtension()
, což je novější způsob instalace rozšíření.
Pokud potřebujete toto rozšíření nainstalovat na starší verzi (MediaWiki 1.33 či starší), musíte místo wfLoadExtension( 'PageNotice' );
použít:
require_once "$IP/extensions/PageNotice/PageNotice.php";
Configuration
$wgPageNoticeDisablePerPageNotices
- If set to
true
, notices on the per-page level are disabled; only namespace level notices will appear. The default value isfalse
.
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í je zahrnuto v následujících balíčcích a/nebo wiki farmách: Toto není autoritativní seznam. Některé wiki farmy/hostitelé mohou obsahovat tento extension, i když zde nejsou uvedeny. Pro potvrzení se vždy obraťte na své wiki farmy/hostitele nebo balíček. |