-
Notifications
You must be signed in to change notification settings - Fork 1
/
DummyFandoomMainpageTags.class.php
75 lines (67 loc) · 1.9 KB
/
DummyFandoomMainpageTags.class.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
<?php
/**
* Class for DummyFandoomMainpageTags extension
*
* @file
* @ingroup Extensions
*/
// DummyFandoomMainpageTags class
class DummyFandoomMainpageTags {
/* Fields */
private $mParser;
private $mWidgetID = '';
/* Functions */
public static function onParserFirstCallInit( Parser &$parser ) {
// Register the hook with the parser
$parser->setHook( 'mainpage-leftcolumn-start', [ 'DummyFandoomMainpageTags', 'renderLeftColumn' ] );
$parser->setHook( 'mainpage-rightcolumn-start', [ 'DummyFandoomMainpageTags', 'renderRightColumn' ] );
$parser->setHook( 'mainpage-endcolumn', [ 'DummyFandoomMainpageTags', 'renderEndColumn' ] );
// Continue
return true;
}
/*
<div class="main-page-tag-lcs main-page-tag-lcs-exploded" style="margin-right: -310px; "><div class="lcs-container" style="margin-right: 310px;">
</div></div>
<div class="main-page-tag-rcs"><div class="rcs-container">
</div></div>
*/
public static function renderLeftColumn( $input, $args, Parser $parser ) {
$htmlOut = Xml::openElement( 'div',
[
'class' => 'main-page-tag-lcs main-page-tag-lcs-exploded',
'style' => 'margin-right: -310px;'
]
);
$htmlOut .= Xml::openElement( 'div',
[
'class' => 'lcs-container',
'style' => 'margin-right: 310px;'
]
);
$parser->getOutput()->addModuleStyles( [
'ext.dummyfandoommainpagetags.styles',
] );
return $htmlOut;
}
public static function renderRightColumn( $input, $args, Parser $parser ) {
$htmlOut = Xml::openElement( 'div',
[
'class' => 'main-page-tag-rcs'
]
);
$htmlOut .= Xml::openElement( 'div',
[
'class' => 'rcs-container'
]
);
$parser->getOutput()->addModuleStyles( [
'ext.dummyfandoommainpagetags.styles',
] );
return $htmlOut;
}
public static function renderEndColumn( $input, $args, Parser $parser ) {
$htmlOut = Xml::closeElement( 'div' );
$htmlOut .= Xml::closeElement( 'div' );
return $htmlOut;
}
}