Wir empfehlen:

Banner für Sidebar

Aus DadAWeb
Wechseln zu: Navigation, Suche

Add a banner to the sidebar (PHP)

You can add one or more banners to the sidebar by hacking your skins/Monobook.php file (if you're using monobook) to include the following piece of code.

Find (line 188):




<?php $this->msg('sidebar-banner1-headingtext') ?>

<a href="<?php $this->msg('sidebar-banner1-url') ?>"> <img width="100%" title="<?php $this->msg('sidebar-banner1-alttext') ?>" alt="<?php $this->msg('sidebar-banner1-alttext') ?>" src="<?php $this->msg('sidebar-banner1-imgsrc') ?>" /></a>


Now in your Wiki, create four System messages: (i.e. articles named MediaWiki:sidebar-banner1-...)

parameter value
sidebar-banner1-headingtext The text that will be displayed as the banner heading ("advertisement", "sponsor" etc.)
sidebar-banner1-url The destination URL of this banner
sidebar-banner1-alttext Content of the alt="" parameter of an HTML <img> tag: any title for the destination site
sidebar-banner1-imgsrc Content of the src="" parameter of an HTML <img> tag: the URL of the banner image. It may be the address of an image uploaded to your Wiki (magic words may be used, e.g. {{filepath:banner1.png}}), or the address of an external image

To add more banners, just repeat the process renaming "banner1" to "banner2" etc.