@@ -78,7 +78,10 @@ discard block |
||
78 | 78 | <!-- START PIVOTTEMPLATE --> |
79 | 79 | <div class="off-canvas-wrap docs-wrap" data-offcanvas=""> |
80 | 80 | <div class="inner-wrap"> |
81 | - <?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "<div class='fixed'>"; ?> |
|
81 | + <?php if ($wgPivotFeatures['fixedNavBar'] != false) { |
|
82 | + echo "<div class='fixed'>"; |
|
83 | +} |
|
84 | +?> |
|
82 | 85 | <nav class="tab-bar hide-for-print"> |
83 | 86 | <section id="left-nav-aside" class="left-small show-for-small"> |
84 | 87 | <a class="left-off-canvas-toggle"><span id="menu-user"><i class="fa fa-navicon fa-lg"></i></span></a> |
@@ -95,10 +98,16 @@ discard block |
||
95 | 98 | </section> |
96 | 99 | |
97 | 100 | <section id="right-nav-aside" class="right-small"> |
98 | - <a class="right-off-canvas-toggle"><span id="menu-user"><i class="fa <?php if ($wgUser->isLoggedIn()): ?>fa-user<?php else: ?>fa-navicon<?php endif; ?> fa-lg"></i></span></a> |
|
101 | + <a class="right-off-canvas-toggle"><span id="menu-user"><i class="fa <?php if ($wgUser->isLoggedIn()): ?>fa-user<?php else { |
|
102 | + : ?>fa-navicon<?php endif; |
|
103 | +} |
|
104 | +?> fa-lg"></i></span></a> |
|
99 | 105 | </section> |
100 | 106 | </nav> |
101 | - <?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "</div>"; ?> |
|
107 | + <?php if ($wgPivotFeatures['fixedNavBar'] != false) { |
|
108 | + echo "</div>"; |
|
109 | +} |
|
110 | +?> |
|
102 | 111 | <aside class="left-off-canvas-menu"> |
103 | 112 | <ul class="off-canvas-list"> |
104 | 113 | |
@@ -121,19 +130,28 @@ discard block |
||
121 | 130 | <?php if ($wgUser->isLoggedIn()): ?> |
122 | 131 | <li id="personal-tools"><label>Personal</label></li> |
123 | 132 | <?php foreach ($this->getPersonalTools() as $key => $item) { echo $this->makeListItem($key, $item); } ?> |
124 | - <?php else: ?> |
|
133 | + <?php else { |
|
134 | + : ?> |
|
125 | 135 | <?php if (isset($this->data['personal_urls']['anonlogin'])): ?> |
126 | - <li><a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; ?>"><?php echo wfMessage( 'login' )->text() ?></a></li> |
|
136 | + <li><a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; |
|
137 | +} |
|
138 | +?>"><?php echo wfMessage( 'login' )->text() ?></a></li> |
|
127 | 139 | <?php elseif (isset($this->data['personal_urls']['login'])): ?> |
128 | 140 | <li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']); ?>"><?php echo wfMessage( 'login' )->text() ?></a></li> |
129 | - <?php else: ?> |
|
130 | - <li><?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage( 'login' )->text()); ?></li> |
|
141 | + <?php else { |
|
142 | + : ?> |
|
143 | + <li><?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage( 'login' )->text()); |
|
144 | +} |
|
145 | +?></li> |
|
131 | 146 | <?php endif; ?> |
132 | 147 | <?php endif; ?> |
133 | 148 | </ul> |
134 | 149 | </aside> |
135 | 150 | |
136 | - <section id="main-section" class="main-section" <?php if ($wgPivotFeatures['fixedNavBar'] != false) echo "style='margin-top:2.8125em'"; ?>> |
|
151 | + <section id="main-section" class="main-section" <?php if ($wgPivotFeatures['fixedNavBar'] != false) { |
|
152 | + echo "style='margin-top:2.8125em'"; |
|
153 | +} |
|
154 | +?>> |
|
137 | 155 | |
138 | 156 | <div id="page-content"> |
139 | 157 |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | |
14 | 14 | public function setupSkinUserCss(OutputPage $out) { |
15 | 15 | parent::setupSkinUserCss($out); |
16 | - global $wgLocalStylePath; |
|
16 | + global $wgLocalStylePath; |
|
17 | 17 | global $wgPivotFeatures; |
18 | 18 | $wgPivotFeaturesDefaults = array( |
19 | 19 | 'showActionsForAnon' => true, |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | $out->addModuleStyles('skins.pivot.styles'); |
39 | - $viewport_meta = 'width=device-width, user-scalable=yes, initial-scale=1.0'; |
|
39 | + $viewport_meta = 'width=device-width, user-scalable=yes, initial-scale=1.0'; |
|
40 | 40 | $out->addMeta('viewport', $viewport_meta); |
41 | 41 | $out->addModuleScripts('skins.pivot.js'); |
42 | 42 | if ( $wgPivotFeatures['preloadFontAwesome'] ) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $this->html('headelement'); |
56 | 56 | switch ($wgPivotFeatures['usePivotTabs']) { |
57 | 57 | case true: |
58 | - ob_start(); |
|
58 | + ob_start(); |
|
59 | 59 | $this->html('bodytext'); |
60 | 60 | $out = ob_get_contents(); |
61 | 61 | ob_end_clean(); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | 'useAddThisFollow' => '' |
32 | 32 | ); |
33 | 33 | foreach ($wgPivotFeaturesDefaults as $fgOption => $fgOptionValue) { |
34 | - if ( !isset($wgPivotFeatures[$fgOption]) ) { |
|
34 | + if ( ! isset($wgPivotFeatures[$fgOption])) { |
|
35 | 35 | $wgPivotFeatures[$fgOption] = $fgOptionValue; |
36 | 36 | } |
37 | 37 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $viewport_meta = 'width=device-width, user-scalable=yes, initial-scale=1.0'; |
40 | 40 | $out->addMeta('viewport', $viewport_meta); |
41 | 41 | $out->addModuleScripts('skins.pivot.js'); |
42 | - if ( $wgPivotFeatures['preloadFontAwesome'] ) { |
|
42 | + if ($wgPivotFeatures['preloadFontAwesome']) { |
|
43 | 43 | $out->addHeadItem('font', '<link rel="preload" href="'.$wgLocalStylePath.'/pivot/assets/fonts/fontawesome-webfont.woff2?v=4.7.0" as="font" type="font/woff2" crossorigin="anonymous" />'); |
44 | 44 | } |
45 | 45 | } |
@@ -107,10 +107,10 @@ discard block |
||
107 | 107 | <ul class="off-canvas-list"> |
108 | 108 | |
109 | 109 | <li class="has-form"> |
110 | - <form action="<?php $this->text( 'wgScript' ); ?>" id="searchform" class="mw-search"> |
|
110 | + <form action="<?php $this->text('wgScript'); ?>" id="searchform" class="mw-search"> |
|
111 | 111 | <div class="row collapse"> |
112 | 112 | <div class="small-12 columns"> |
113 | - <input type="search" name="search" placeholder="<?php echo wfMessage( 'search' )->text() ?>" title="Search [alt-shift-f]" accesskey="f" id="searchInput-offcanvas" autocomplete="off"> |
|
113 | + <input type="search" name="search" placeholder="<?php echo wfMessage('search')->text() ?>" title="Search [alt-shift-f]" accesskey="f" id="searchInput-offcanvas" autocomplete="off"> |
|
114 | 114 | </div> |
115 | 115 | </div> |
116 | 116 | </form> |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | <?php foreach ($this->getPersonalTools() as $key => $item) { echo $this->makeListItem($key, $item); } ?> |
128 | 128 | <?php else: ?> |
129 | 129 | <?php if (isset($this->data['personal_urls']['anonlogin'])): ?> |
130 | - <li><a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; ?>"><?php echo wfMessage( 'login' )->text() ?></a></li> |
|
130 | + <li><a href="<?php echo $this->data['personal_urls']['anonlogin']['href']; ?>"><?php echo wfMessage('login')->text() ?></a></li> |
|
131 | 131 | <?php elseif (isset($this->data['personal_urls']['login'])): ?> |
132 | - <li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']); ?>"><?php echo wfMessage( 'login' )->text() ?></a></li> |
|
132 | + <li><a href="<?php echo htmlspecialchars($this->data['personal_urls']['login']['href']); ?>"><?php echo wfMessage('login')->text() ?></a></li> |
|
133 | 133 | <?php else: ?> |
134 | - <li><?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage( 'login' )->text()); ?></li> |
|
134 | + <li><?php echo Linker::link(Title::newFromText('Special:UserLogin'), wfMessage('login')->text()); ?></li> |
|
135 | 135 | <?php endif; ?> |
136 | 136 | <?php endif; ?> |
137 | 137 | </ul> |
@@ -152,10 +152,10 @@ discard block |
||
152 | 152 | <img alt="<?php echo $this->text('sitename'); ?>" src="<?php echo $this->text('logopath') ?>" style="max-width: 100%;height: auto;display: inline-block; vertical-align: middle;"></a> |
153 | 153 | </li> |
154 | 154 | <li class="has-form"> |
155 | - <form action="<?php $this->text( 'wgScript' ); ?>" id="searchform" class="mw-search"> |
|
155 | + <form action="<?php $this->text('wgScript'); ?>" id="searchform" class="mw-search"> |
|
156 | 156 | <div class="row collapse"> |
157 | 157 | <div class="small-12 columns"> |
158 | - <input type="search" name="search" placeholder="<?php echo wfMessage( 'search' )->text() ?>" title="Search [alt-shift-f]" accesskey="f" id="searchInput" autocomplete="off"> |
|
158 | + <input type="search" name="search" placeholder="<?php echo wfMessage('search')->text() ?>" title="Search [alt-shift-f]" accesskey="f" id="searchInput" autocomplete="off"> |
|
159 | 159 | </div> |
160 | 160 | </div> |
161 | 161 | </form> |
@@ -180,25 +180,25 @@ discard block |
||
180 | 180 | </div> |
181 | 181 | <?php endif; ?> |
182 | 182 | <!--[if lt IE 9]> |
183 | - <div id="siteNotice" class="sitenotice"><?php echo $this->text('sitename') . ' '. wfMessage( 'pivot-browsermsg' )->text(); ?></div> |
|
183 | + <div id="siteNotice" class="sitenotice"><?php echo $this->text('sitename').' '.wfMessage('pivot-browsermsg')->text(); ?></div> |
|
184 | 184 | <![endif]--> |
185 | 185 | |
186 | - <?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice" class="sitenotice"><?php $this->html( 'sitenotice' ); ?></div><?php } ?> |
|
187 | - <?php if ( $this->data['newtalk'] ) { ?><div id="usermessage" class="newtalk"><?php $this->html( 'newtalk' ); ?></div><?php } ?> |
|
186 | + <?php if ($this->data['sitenotice']) { ?><div id="siteNotice" class="sitenotice"><?php $this->html('sitenotice'); ?></div><?php } ?> |
|
187 | + <?php if ($this->data['newtalk']) { ?><div id="usermessage" class="newtalk"><?php $this->html('newtalk'); ?></div><?php } ?> |
|
188 | 188 | </div> |
189 | 189 | </div> |
190 | 190 | |
191 | 191 | <?php if ($wgUser->isLoggedIn() || $wgPivotFeatures['showActionsForAnon']): ?> |
192 | - <a href="#" data-options="align:left" data-dropdown="drop1" class="button secondary small radius pull-right hide-for-print" id="drop"><i class="fa fa-navicon fa-lg"><span id="page-actions" class="show-for-medium-up"> <?php echo wfMessage( 'actions' )->text() ?></span></i></a> |
|
192 | + <a href="#" data-options="align:left" data-dropdown="drop1" class="button secondary small radius pull-right hide-for-print" id="drop"><i class="fa fa-navicon fa-lg"><span id="page-actions" class="show-for-medium-up"> <?php echo wfMessage('actions')->text() ?></span></i></a> |
|
193 | 193 | <ul id="drop1" class="tiny content f-dropdown" data-dropdown-content> |
194 | - <?php foreach($this->data['content_actions'] as $key => $tab) { echo preg_replace(array('/\sprimary="1"/', '/\scontext="[a-z]+"/', '/\srel="archives"/'),'',$this->makeListItem($key, $tab)); } ?> |
|
195 | - <?php wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this, true )); ?> |
|
194 | + <?php foreach ($this->data['content_actions'] as $key => $tab) { echo preg_replace(array('/\sprimary="1"/', '/\scontext="[a-z]+"/', '/\srel="archives"/'), '', $this->makeListItem($key, $tab)); } ?> |
|
195 | + <?php wfRunHooks('SkinTemplateToolboxEnd', array(&$this, true)); ?> |
|
196 | 196 | </ul> |
197 | 197 | |
198 | 198 | <?php endif; |
199 | 199 | $namespace = str_replace('_', ' ', $this->getSkin()->getTitle()->getNsText()); |
200 | 200 | $displaytitle = $this->data['title']; |
201 | - if (!empty($namespace)) { |
|
201 | + if ( ! empty($namespace)) { |
|
202 | 202 | $pagetitle = $this->getSkin()->getTitle(); |
203 | 203 | $newtitle = str_replace($namespace.':', '', $pagetitle); |
204 | 204 | $displaytitle = str_replace($pagetitle, $newtitle, $displaytitle); |
@@ -210,8 +210,8 @@ discard block |
||
210 | 210 | <div class="<?php echo $wgPivotFeatures['useAddThisShare']; ?> hide-for-print"></div> |
211 | 211 | <!-- Go to www.addthis.com/dashboard to customize your tools --> |
212 | 212 | <?php } ?> |
213 | - <?php if ( $this->data['isarticle'] ) { ?><h3 id="tagline"><?php $this->msg( 'tagline' ) ?></h3><?php } ?> |
|
214 | - <?php if ( $this->html('subtitle') ) { ?><h5 id="sitesub" class="subtitle"><?php $this->html('subtitle') ?></h5><?php } ?> |
|
213 | + <?php if ($this->data['isarticle']) { ?><h3 id="tagline"><?php $this->msg('tagline') ?></h3><?php } ?> |
|
214 | + <?php if ($this->html('subtitle')) { ?><h5 id="sitesub" class="subtitle"><?php $this->html('subtitle') ?></h5><?php } ?> |
|
215 | 215 | <div id="contentSub" class="clear_both"></div> |
216 | 216 | <div id="bodyContent" class="mw-bodytext"> |
217 | 217 | <?php |
@@ -294,11 +294,11 @@ discard block |
||
294 | 294 | function renderSidebar() { |
295 | 295 | $sidebar = $this->getSidebar(); |
296 | 296 | foreach ($sidebar as $boxName => $box) { |
297 | - echo '<li><label class="sidebar" id="'.Sanitizer::escapeId( $box['id'] ).'"';echo Linker::tooltip( $box['id'] ).'>'.htmlspecialchars( $box['header'] ).'</label></li>'; |
|
298 | - if ( is_array( $box['content'] ) ) { |
|
297 | + echo '<li><label class="sidebar" id="'.Sanitizer::escapeId($box['id']).'"'; echo Linker::tooltip($box['id']).'>'.htmlspecialchars($box['header']).'</label></li>'; |
|
298 | + if (is_array($box['content'])) { |
|
299 | 299 | foreach ($box['content'] as $key => $item) { echo $this->makeListItem($key, $item); } |
300 | 300 | } |
301 | 301 | } |
302 | - return; } |
|
302 | + return; } |
|
303 | 303 | } |
304 | 304 | ?> |
305 | 305 | \ No newline at end of file |