Extension:WimaAdvertising

The WimaAdvertising extension offers four additional blocks to the, , , , and  skin. The banners are placed in the top and bottom of the wiki and two of them in the.

Use
One ad block is located at the top of the "MediaWiki:Sitenotice", a second one below the article text in front of the category bar and two more ad blocks in the sidebar. By entering  and   in the MediaWiki:Sidebar, these can be placed individually. If Sitenotice is defined, the TopBanner will be displayed randomly alternating with the Sitenotice message.

Configuration options
Enable advertising. Default is.

Disable advertising for logged-in users. Default is.

wgBannerType

 * Set the type of the banner
 * Possible values: 'advertising', 'eventnote', 'hint'
 * Default value: 'advertising'

wgBannerCode

 * Set a html of the banner.

You can also do Google AdSense:

wgBannerStyle

 * Set the CSS style specifications for the banner.

Google Adsense
Enable advertising. Default is.

Disable advertising for logged-in users. Default is.

Mandatory parameters
(You can get your publisher ID and ad unit ID from the "Get code" page: Get and copy the ad code.)

Ad units
Define up to four ad units:

Replace the first value with your AdSense ad unit ID (google_ad_slot / data-ad-slot) for each ad unit. The Slot ID for your AdSense script is for example 1234580893.

Also specify the width and the height of the AdSense unit, specified in your AdSense account (google_ad_width / data-ad-width, google_ad_height / data-ad-height).

Optional parameters
Add any of the optional settings below – if your settings deviate from the defaults:

Skin Vector
Skin Vector in revision 1.35 and 1.36 needs a hack to make the extension work for the ads in the sidebar.

In file  change line 450 (REL1_35), respectively in file   change line 337 (REL1_36): into:

Skin MonoBook
For the Skin MonoBook, the ad at the bottom might look better if the hook is moved to the end of the content area.

In file  change lines 85-91: into:

In file  change lines 20-24: into:

Remarks

 * This extension works from REL1_25 and has been tested up to MediaWiki version 1.39.1.
 * The SkinBuildSidebar hook no longer allows images for several Skins and HTML code to be placed in the sidebar.
 * So only the upper and lower add slots are still available.
 * A solution for this circumstance is not yet known.
 * Version 2.1 has added support for Skin.
 * Version 2.2 has added support for Skin.

Version 3.0

 * The version 3.0 has a new approach, with click-away ads that are fixed and do not disappear when scrolling, and are (largely) independent of the skin. (See first impression)
 * At the moment only tested with MediaWiki version.
 * Download on GitHub (alpha Version)