This repository has been archived by the owner on Dec 2, 2023. It is now read-only.
forked from MoeMoeFish/MoegirlAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MoegirlAD.php
90 lines (80 loc) · 3 KB
/
MoegirlAD.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
$wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'MoegirlAD',
'author' => array( 'Fish Thirteen', 'The Little Moe New LLC' ),
'url' => 'https://github.com/FishThirteen/MoegirlAD',
'description' => 'Show advertisement in the page header and page footer in Moegirlpedia',
'version' => 0.42,
'license-name' => "Apache-2.0+", // Short name of the license, links LICENSE or COPYING file if existing - string, added in 1.23.0
);
$wgExtensionMessagesFiles['MoegirlADMagic'] = __DIR__ . '/MoegirlAD.i18n.magic.php';
/*
* Options: (Wrote some/all of these settings into LocalSettings.php file)
*
* $wgMoegirlADEnabled
* - Boolean. determine if show advertisement in moegirl.
*
* $wgMoegirlADHeaderscriptDesktop
* - Add AD script into desktop version page header.
*
* $wgMoegirlADHeaderscriptMobile
* - Add AD script into mobile version page header.
*
* $wgMoegirlADTopADCode
* - the Advertisement code form the advertising company in top bar
* E.g.
* $wgMoegirlADADCode = <<<EOD
* <!-- 728*90 -->
* <div id='div-gpt-ad-1388996185454-0' style='width:728px; height:90px;'>
* <script type='text/javascript'>
* googletag.cmd.push(function() { googletag.display('div-gpt-ad-1388996185454-0'); });
* </script>
* </div>
* EOD;
*
* $wgMoegirlADBottomADCode
* - the Advertisement code in bottom bar
*
* $wgMoegirlADFooterEnabled
* - Boolean. show/hide the footer Advertisement
*
* $wgMoegirlADFooterADCode
* - the Advertisement code used to show in below of the footer
*
*$wgMoegirlADSideBarEnabled
* - Boolean. show/hide the sidebar Advertisement
*
* $wgMoegirlADSideBarADName
* - the side bar group name
*
* $wgMoegirlADSideBarADCode
* - the Advertisement code used to show in the bottom of the side bar
*
* $wgMoegirlADMobileTopADCode
* - the Advertisement code used for mobile view
*
* $wgMoegirlADEditCountQualification
* -Integer. Minimum edit counts to hide advertisement
*
*/
$wgMoegirlADEnabled = true;
$wgMoegirlADHeaderscriptDesktop = "";
$wgMoegirlADHeaderscriptMobile = "";
$wgMoegirlADTopADCode = "";
$wgMoegirlADBottomADCode = "";
$wgMoegirlADFooterEnabled = true;
$wgMoegirlADFooterADCode = "";
$wgMoegirlADSideBarEnabled = true;
$wgMoegirlADSideBarADName = "";
$wgMoegirlADSideBarADCode = "";
$wgMoegirlADMobileTopADCode = "";
$wgMoegirlADEditCountQualification = 5;
$wgAutoloadClasses['MoegirlADHooks'] = __DIR__ . '/MoegirlAD.hooks.php';
$wgHooks['BeforePageDisplay'][] = 'MoegirlADHooks::BeforePageDisplay';
$wgHooks['BeforePageDisplayMobile'][] = 'MoegirlADHooks::BeforePageDisplayMobile';
$wgHooks['SkinAfterContent'][] = 'MoegirlADHooks::onSkinAfterContent';
$wgHooks['SiteNoticeAfter'][] = 'MoegirlADHooks::onSiteNoticeAfter';
$wgHooks['SkinAfterBottomScripts'][] = 'MoegirlADHooks::onSkinAfterBottomScripts';
$wgHooks['SkinBuildSidebar'][] = 'MoegirlADHooks::onSkinBuildSidebar';
$wgHooks['GetDoubleUnderscoreIDs'][] = 'MoegirlADHooks::onGetDoubleUnderscoreIDs';