Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
control the display state for left sidebar ad
Browse files Browse the repository at this point in the history
  • Loading branch information
Fish Thirteen committed Jun 11, 2014
1 parent baa299d commit 766fd0e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions MoegirlAD.hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public static function onSkinAfterBottomScripts( $skin, &$text ) {


public static function onSkinBuildSidebar( Skin $skin, &$bar ) {
global $wgMoegirlADSideBarADName, $wgMoegirlADSideBarADCode;
global $wgMoegirlADSideBarEnabled, $wgMoegirlADSideBarADName, $wgMoegirlADSideBarADCode;

if (MoegirlADHooks::shouldShowADs()) {
if (MoegirlADHooks::shouldShowADs() && $wgMoegirlADSideBarEnabled) {
$bar[$wgMoegirlADSideBarADName] = $wgMoegirlADSideBarADCode;
}
}
Expand Down
14 changes: 9 additions & 5 deletions MoegirlAD.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
*
* $wgMoegirADFooterADCode
* - the adverticement code used to show in below of the footer
*
*$wgMoegirlADSideBarEnabled
* - show/hide the sidebar adverticement
*
* $wgMoegirlADSideBarADName
* - the side bar group name
Expand All @@ -43,11 +46,12 @@
*
*/
$wgMoegirlADEnabled = true;
$wgMoegirlADTopADCode = "";
$wgMoegirlADBottomADCode = "";
$wgMoegirlADFooterADCode = "";
$wgMoegirlADSideBarADName = "";
$wgMoegirlADSideBarADCode = "";
$wgMoegirlADTopADCode = "Top Adverticement";
$wgMoegirlADBottomADCode = "Bottom Adverticement";
$wgMoegirlADFooterADCode = "Foot Adverticement";
$wgMoegirlADSideBarEnabled = true;
$wgMoegirlADSideBarADName = "Sidebar group name";
$wgMoegirlADSideBarADCode = "Sidebar Adverticement";



Expand Down

0 comments on commit 766fd0e

Please sign in to comment.