Skip to content

Commit

Permalink
Patches to main php script.
Browse files Browse the repository at this point in the history
Includes patch to build against mediawiki 1.28.x:
borkweb#66
  • Loading branch information
badshah400 committed May 17, 2017
1 parent 4ef5a0f commit 3e60bb1
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions BootstrapMediaWiki.skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ public function execute() {

<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li>
<a href="<?php echo $this->data['nav_urls']['mainpage']['href'] ?>">Home</a>
</li>
<!--One link to Main Page is enough!
<li> <a href="<?php echo $this->data['nav_urls']['mainpage']['href'] ?>">Home</a>
</li>-->

<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tools <span class="caret"></span></a>
<ul class="dropdown-menu">
Expand Down Expand Up @@ -144,7 +145,7 @@ public function execute() {
?>
<ul class="nav navbar-nav navbar-right">
<li>
<?php echo Linker::linkKnown( SpecialPage::getTitleFor( 'Userlogin' ), wfMsg( 'login' ) ); ?>
<?php echo Linker::linkKnown( SpecialPage::getTitleFor( 'Userlogin' ), wfMessage( 'login' ) ); ?>
</li>
</ul>
<?php
Expand Down Expand Up @@ -243,8 +244,11 @@ public function execute() {
<div class="container">
<?php $this->includePage('Bootstrap:Footer'); ?>
<footer>
<p>&copy; <?php echo date('Y'); ?> by <a href="<?php echo (isset($wgCopyrightLink) ? $wgCopyrightLink : 'http://borkweb.com'); ?>"><?php echo (isset($wgCopyright) ? $wgCopyright : 'BorkWeb'); ?></a>
&bull; Powered by <a href="http://mediawiki.org">MediaWiki</a>
<p>
<a href="http://mediawiki.org">
<img src="<?php global $wgScriptPath; echo ${wgScriptPath}.'/resources/assets/poweredby_mediawiki_176x62.png';?>" style="height:40px;"></a>
&nbsp;&bull; Theme by <a href="<?php echo (isset($wgCopyrightLink) ? $wgCopyrightLink : 'http://borkweb.com'); ?>">
<?php echo (isset($wgCopyright) ? $wgCopyright : 'BorkWeb'); ?></a> &copy; <?php echo date('Y'); ?>
</p>
</footer>
</div><!-- container -->
Expand Down Expand Up @@ -466,7 +470,8 @@ function getPageRawText($title) {
$wgParserOptions = new ParserOptions($wgUser);
// get the text as static wiki text, but with already expanded templates,
// which also e.g. to use {{#dpl}} (DPL third party extension) for dynamic menus.
$parserOutput = $wgParser->preprocess($article->getRawText(), $pageTitle, $wgParserOptions );
$content = $article->getContent( Revision::RAW );
$parserOutput = $wgParser->preprocess($content, $pageTitle, $wgParserOptions );
return $parserOutput;
}
}
Expand All @@ -479,7 +484,8 @@ function includePage($title) {
} else {
$article = new Article($pageTitle);
$wgParserOptions = new ParserOptions($wgUser);
$parserOutput = $wgParser->parse($article->getRawText(), $pageTitle, $wgParserOptions);
$content = $article->getContent( Revision::RAW );
$parserOutput = $wgParser->parse($content, $pageTitle, $wgParserOptions);
echo $parserOutput->getText();
}
}
Expand Down

0 comments on commit 3e60bb1

Please sign in to comment.