Banner für Sidebar
Version vom 28. Oktober 2009, 17:41 Uhr von WikiSysop (Diskussion | Beiträge)
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): <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):
?> </div>
Include:
?>
</div>
Now in your Wiki, create four System messages: (i.e. articles named MediaWiki:sidebar-banner1-...)
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.