Erweiterung:Header Footer
![]() Freigabestatus: stabil |
|
---|---|
Beschreibung | Provides per-namespace and per-page header + footer inclusion |
Autor(en) | Jean-Lou Dupont |
Betreuer | James Montalvo |
Letzte Version | 3.0.1 (2020-12-20) |
MediaWiki | 1.25+ |
Datenbankänderungen | Nein |
Composer | mediawiki/header-footer |
Lizenz | GNU General Public License 2.0 oder neuer |
Herunterladen | Download snapshot Hinweis: releases |
|
|
Die Header Footer-Erweiterung ermöglicht die Einbindung eines Kopf- oder Fußbereichs. Diese Einbindung ist pro Seite oder pro Namensraum möglich.
Funktionen
- Speed - integriert mit Parser-Caching
- Secure - header and footer articles are located in the NS_MEDIAWIKI namespace
- Controllable - headers and/or footers can be disabled on pages which are edit protected
- Customizable - headers and footers are wrapped in
<div>
elements
Installation
Die empfohlene Methode zur Installation dieser Erweiterung ist die Verwendung von Composer. Die Unterstützung von Composer ist in MediaWiki integriert.
- Schritt 1
Change to the base directory of your MediaWiki installation. This is where the "LocalSettings.php" file is located. If you have not yet installed Composer do it now by running the following command in your shell:
wget https://getcomposer.org/composer.phar
As of September 2020 that version is the beta, which is incompatible with at least some MediaWiki installations. The stable version is at getcomposer.org/download.
- Step 2
If you do not have a "composer.local.json" file yet, create one and add the following content to it:
{
"require": {
"mediawiki/header-footer": "~3.0"
}
}
If you already have a "composer.local.json" file add the following line to the end of the "require" section in your file:
"mediawiki/header-footer": "~3.0"
Remember to add a comma to the end of the preceding line in this section.
- Step 3
Run the following command in your shell:
php composer.phar update --no-dev
Note if you have Git installed on your system add the --prefer-source flag to the above command. Also note that it may be necessary to run this command twice. If unsure do it twice right away.
- Step 4
Add the following line to the end of your "LocalSettings.php" file:
wfLoadExtension( 'HeaderFooter' );
- Verify installation success
As final step, you can verify Header_Footer got installed by looking at the "Special:Version" page on your wiki and check that it is listed.
Verwendung
Edit the pages:
MediaWiki:Hf-nsheader-namespace name
MediaWiki:Hf-nsfooter-namespace name
namespace name
must be in the language of the wiki (see Manual:$wgLanguageCode)
For the 'main' namespace, just use blank i.e. no string, but with the hyphen:
MediaWiki:Hf-nsheader-
MediaWiki:Hf-nsfooter-
Edit the pages:
MediaWiki:Hf-header-page name
MediaWiki:Hf-footer-page name
Befehle zur Deaktivierung
On edit protected pages, one can add
__NOHEADER__
to suppress the page level header__NOFOOTER__
to suppress the page level footer__NONSHEADER__
to suppress the namespace level header__NONSFOOTER__
to suppress the namespace level footer
CSS
- Page Level Header: <div class="hf-header">
- Namespace Level Header: <div class="hf-nsheader">
- Page Level Footer: <div class="hf-footer">
- Namespace Level Footer: <div class="hf-nsfooter">
Beispiele
- Page MediaWiki:hf-nsheader-Extension would contain the wikitext to be included as header for all pages of the Extension namespace.
- In this case, to suppress the header of the page Extension:HeaderFooter one should a) edit protect it, and b) add
__NONSHEADER__
in it.
- In this case, to suppress the header of the page Extension:HeaderFooter one should a) edit protect it, and b) add
- Page MediaWiki:hf-footer-Extension:HeaderFooter would contain the wikitext to be included as footer for the page Extension:HeaderFooter.
- In this case, to suppress the footer of the page Extension:HeaderFooter one should a) edit protect it, and b) add
__NOFOOTER__
in it.
- In this case, to suppress the footer of the page Extension:HeaderFooter one should a) edit protect it, and b) add
Siehe auch
- PageNotice extension – provides a way for you to define fixed notice messages for the top or the bottom of a page (by individual page name), or entire namespaces (by namespace number).
![]() | Diese Erweiterung ist in den folgenden Paketen und/oder WikiFarmen beinhalten: |
- Stable extensions/de
- Extensions with invalid or missing type/de
- Extensions supporting Composer/de
- GPL licensed extensions/de
- Extensions in GitHub version control/de
- OutputPageParserOutput extensions/de
- ResourceLoaderGetConfigVars extensions/de
- All extensions/de
- Extensions included in Canasta/de
- Extensions included in ProWiki/de
- View page extensions/de
- Headers and footers extensions/de