How To Use WikiBanner

From wiki.mikejung.biz
Jump to: navigation, search

Liquidweb 728x90.jpg You can view the main wiki page for WikiBanner by visiting this link WikiBanner

How to Install WikiBanner for MediaWiki[edit]

Download and extract the WikiBanner .zip file

cd /home/$user/www/wiki/extensions
wget https://github.com/Sturmkrieg/WikiBanner/archive/master.zip
unzip master.zip

Rename the WikiBanner directory and set file permissions to whatever is appropriate.

mv $extracted_directory_name_version/ WikiBanner/
chown -R $user. WikiBanner/

Configure WikiBanner in LocalSettings.php

vim home/$user/www/wiki/LocalSettings.php

##Add this line near the top of the file

require_once "$IP/extensions/WikiBanner/WikiBanner.php";
  • Navigate to your wiki's "Special:Version" page, at this point the extension should be listed.

Use WikiBanner Top Banner[edit]

To Use the top banner, you can simply ad the code underneath the requires line in LocalSettings.php. In the example below I am using the top banner spot for an ad.

vim LocalSettings.php

require_once "$IP/extensions/WikiBanner/WikiBanner.php";
$wgTopBannerCode = '
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- TopBannerAd -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="$Your_ID"
     data-ad-slot="$Your_adslot"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
';

Use WikiBanner Bottom Banner[edit]

To Use the bottom banner, you can simply ad the code underneath the requires line in LocalSettings.php. In the example below I am using the top banner spot for an ad.

vim LocalSettings.php

require_once "$IP/extensions/WikiBanner/WikiBanner.php";
$wgBottomBannerCode = '
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- TopBannerAd -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="$Your_ID"
     data-ad-slot="$Your_adslot"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
';