Die Pflege der MediaWiki-Erweiterung WimaAdvertising wird von WikiMANNia verwaltet.
The maintenance of the MediaWiki extension WimaAdvertising is managed by WikiMANNia.
El mantenimiento de la extensión de MediaWiki WimaAdvertising está gestionado por WikiMANNia.
Adds four possible advertising spaces for the Skins Cologne Blue, Modern, MonoBook, Minerva, Timeless, and Vector/Vector-2022 that are filled by LocalSettings.php.
The advertising space 1 alternates randomly with Sitenotice. Advertising space 2 is located at the bottom of the article content. The advertising spaces 3 and 4 are located in the Sidebar. The exact positioning is determined with the entries * AD1
and * AD2
in the Sidebar.
Enable advertising. Default is false
.
$wgWimaAdvertising = true;
Disable advertising for logged-in users. Default is false
.
$wgWimaAdvertisingAnonOnly = true;
The slots can be labelled as Advert, Eventnote, Hint or let be blank. These variables have to be set:
$wgBannerTopType = 'advertising';
$wgBannerBottomType = 'blank';
$wgSidebarAd1Type = 'eventnote';
$wgSidebarAd2Type = 'hint';
The default value is advertising
. These variables can therefore be omitted for advertising insertions.
HTML code must be assigned to these variables:
$wgBannerTopCode = '';
$wgBannerBottomCode = '';
$wgSidebarAd1Code = '';
$wgSidebarAd2Code = '';
If a variable is not set or contains its string of zero length, the corresponding ad space remains unoccupied.
These variables must be assigned CSS style specifications, for example:
$wgBannerTopStyle = 'text-align:center;border:1px solid blue;';
$wgBannerBottomStyle = 'text-align:center;border:1px dotted red;';
The advertising space 1 alternates randomly with Sitenotice. Advertising space 2 is located at the bottom of the article content. The advertising spaces 3 and 4 are located in the sitenotice. The exact positioning is determined with the entries * AD1
and * AD2
in the Sidebar.
Enable advertising. Default is false
.
$wgWimaAdvertising = true;
Disable advertising for logged-in users. Default is false
.
$wgWimaAdvertisingAnonOnly = true;
The extension is localized for the languages "de", "en", "es", "fr", "it", "nl", "pt", and "ru".
Currently, this extension supports the skins Cologne Blue, Modern, MonoBook and Vector.
Further skins may require additional adjustments, which would have to be made in resources/css/myskin.css
.
Enable advertising. Default is false
.
$wgGoogleAdSense = true;
Disable advertising for logged-in users. Default is false
.
$wgGoogleAdSenseAnonOnly = true;
Replace this with your own publisher ID (google_ad_client / data-ad-client)
$wgGoogleAdSenseClient = 'none';
// Client ID for your AdSense script$wgGoogleAdSenseHost = 'none';
// Host ID for your AdSense scriptDefine up to four ad units:
$wgGoogleAdSense_AD1= [ 'slotid 1', 145, 260 ];
$wgGoogleAdSense_AD2= [ 'slotid 2', 145, 260 ];
$wgGoogleAdSense_Top= [ 'slotid 3', 145, 260 ];
$wgGoogleAdSense_Bottom = [ 'slotid 4', 145, 260 ];
$wgGoogleAdSense_Bottom = [ 'slotid 4', 145, 260, 'auto' ];
$wgGoogleAdSense_Bottom = [ 'slotid 4', 145, 260, 'rectangle' ];
$wgGoogleAdSense_Bottom = [ 'slotid 4', 145, 260, 'horizontal' ];
$wgGoogleAdSense_Bottom = [ 'slotid 4', 145, 260, 'vertical' ];
$wgGoogleAdSense_Bottom = [ 'slotid 4', 145, 260, 'vertical, rectangle' ];
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). Values such as 'auto', '100%', '60%' etc. are accepted.
Add any of the optional settings below – if your settings deviate from the defaults:
Source URL of the AdSense script. No need to change – it can't deviate from the defaults.
$wgGoogleAdSenseSrc = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
$wgGoogleAdSenseSrc = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234&host=ca-host-pub-5678';
GoogleAdSenseMode. Default is normal
.
$wgGoogleAdSenseMode = 'responsive
This extension works from REL1_35 and has been tested up to MediaWiki version 1.35.14
, 1.39.8
and 1.42.1
.
1.0.0
2.0.0
2.0.1
$skin->getUser()->isLoggedIn()
instead of !$skin->getUser()->isAnon()
.2.0.2
2.0.3
2.1.0
2.2.0
2.3.0
2.4.0
wm
.2.4.1
2.5.0
<head>
section.2.6.0
blank
.2.7.0
2.7.1
:
shown if label of Wima slots is set as to blank
.2.8.0
Google AdSense
code: Ad Units and Code Generation version "20240815-r00-rc00.462815510744624789"2.8.2
$wgGoogleAdSenseMode
: Ad-Tags2.8.3
$wgGoogleAdSenseHost
not set.2.8.4
data-ad-format
setting.2.8.5
wg
.