Manuel:Pied de page

This page is a translated version of the page Manual:Footer and the translation is 60% complete.

Ajouter des liens au pied de page

Version de MediaWiki :
1.35

In MediaWiki 1.35, links can be added or overridden via the SkinAddFooterLinks hook. (See Manual:Footer/legacy for older installs.) For example, in an extension:

Liens internes
// Add a link to the page "Test Page" with the text "Test", allowing modification by wiki administrators
// test-desc and test-page are i18n messages with the text of the link and the name of the page, respectively
public static function onSkinAddFooterLinks( Skin $skin, string $key, array &$footerlinks  ) {
    if ( $key === 'places' ) {
        $footerlinks['test'] = $skin->footerLink( 'test-desc', 'test-page' );
    }
}

The two parameters passed to the skin::footerlink function should be i18n message keys. This means the eventual value will be taken from the content of the MediaWiki namespace page corresponding to those message keys; in this case the contents of the pages MediaWiki:test-desc and MediaWiki:test-page. The first parameter should contain the link text, the second the name of the page to link to. See the Class level documentation for more details.

Liens externes
// Add a link to this page (https://www.mediawiki.org/wiki/?curid=6031)
// test-desc is an i18n message of the text
public static function onSkinAddFooterLinks( Skin $skin, string $key, array &$footerlinks  ) {
    if ( $key === 'places' ) {
        $footerlinks['test'] = Html::element( 'a',
            [
                'href' => 'https://www.mediawiki.org/wiki/?curid=6031',
                'rel' => 'noreferrer noopener' // not required, but recommended for security reasons
            ],
        $skin->msg( 'test-desc' )->text()
    }
}


Ou si vous êtes administrateur de site, vous pouvez le faire dans LocalSettings.php . Voir les exemples pour :

Liens internes
Version de MediaWiki :
1.35
$wgHooks['SkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks ) {
    if ( $key === 'places' ) {
        $footerlinks['test'] = Html::element( 'a', [
			'href' => Title::newFromText(
				$skin->msg( 'test-page' )->inContentLanguage()->text()
			)
		], $skin->msg( 'test-desc' ) );
    };
};
Liens externes
// Add a link to this page (https://www.mediawiki.org/wiki/?curid=6031)
// test-desc is an i18n message of the text
$wgHooks['SkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks ) {
    if ( $key === 'places' ) {
        $footerlinks['test'] = Html::element( 'a',
            [
                'href' => 'https://www.mediawiki.org/wiki/?curid=6031',
                'rel' => 'noreferrer noopener' // not required, but recommended for security reasons
            ],
        $skin->msg( 'test-desc' )->text()
        );
    };
};

Personnaliser les éléments internes

Vous pouvez personnaliser individuellement les éléments inclus en modifiant certaines pages ou certains paramètres.

lastmod
edit MediaWiki:Lastmodifiedat. If $wgMaxCredits is enabled then edit MediaWiki:Lastmodifiedatby. You may also want to edit MediaWiki:othercontribs that shows other contributors. (6518)
credits
  • if $wgMaxCredits is not zero it will display page editors
  • i.e. set $wgMaxCredits = 10; or any other number
copyright
edit MediaWiki:Copyright. The parameter $1 on that page is replaced with a link to the details of copyright for your wiki. In LocalSettings.php $wgRightsText for the link text and set either $wgRightsPage or $wgRightsUrl with the location of a wiki page or external URL.
privacy
this is a link only. Edit MediaWiki:Privacy for the link text and MediaWiki:Privacypage for the wiki page to which to link.
about
this is a link only. Edit MediaWiki:Aboutsite for the link text and MediaWiki:Aboutpage for the wiki page to which to link.
disclaimer
this is a link only. Edit MediaWiki:Disclaimers for the link text and MediaWiki:Disclaimerpage for the wiki page to which to link.
tagline
non utilisé actuellement dans le pied de page

To remove the privacy, about and/or disclaimer links entirely, replace the link text with a single dash ("-").

Images

Voir $wgFooterIcons .

Texte et images

Depuis septembre 2016, il ne semble pas y avoir de manière standard pour ajouter une entrée formée d'un texte et d'une image en même temps.

Voir aussi