300
);
-/** Navigation links for the user sidebar.
- * 'text' is the name of the MediaWiki message that contains the label of this link
- * 'href' is the name of the MediaWiki message that contains the link target of this link.
- * Link targets starting with http are considered remote links. Ones not starting with
- * http are considered as names of local wiki pages.
- */
-$wgNavigationLinks = array (
- array( 'text'=>'mainpage', 'href'=>'mainpage' ),
- array( 'text'=>'portal', 'href'=>'portal-url' ),
- array( 'text'=>'currentevents', 'href'=>'currentevents-url' ),
- array( 'text'=>'recentchanges', 'href'=>'recentchanges-url' ),
- array( 'text'=>'randompage', 'href'=>'randompage-url' ),
- array( 'text'=>'help', 'href'=>'helppage' ),
- array( 'text'=>'sitesupport', 'href'=>'sitesupport-url' ),
-);
-
/**
* On category pages, show thumbnail gallery for images belonging to that
* category instead of listing them as articles.
} else {
$tpl->set( 'body_onload', false );
}
- $tpl->set( 'navigation_urls', $this->buildNavigationUrls() );
+ $tpl->set( 'navigation_urls', $this->getNavigationLinks() );
$tpl->set( 'nav_urls', $this->buildNavUrls() );
// execute template
}
function getNavigationLinks() {
- global $wgNavigationLinks;
- return $wgNavigationLinks;
- }
-
- /**
- * build array of global navigation links
- * @return array
- * @access private
- */
- function buildNavigationUrls () {
- $fname = 'SkinTemplate::buildNavigationUrls';
- wfProfileIn( $fname );
-
- $links = $this->getNavigationLinks();
-
- $result = array();
- foreach ( $links as $link ) {
- $text = wfMsg( $link['text'] );
- wfProfileIn( "$fname-{$link['text']}" );
- if ($text != '-') {
- $dest = wfMsgForContent( $link['href'] );
- wfProfileIn( "$fname-{$link['text']}2" );
- $result[] = array(
- 'text' => $text,
- 'href' => $this->makeInternalOrExternalUrl( $dest ),
- 'id' => 'n-'.$link['text']
- );
- wfProfileOut( "$fname-{$link['text']}2" );
- }
- wfProfileOut( "$fname-{$link['text']}" );
- }
- wfProfileOut( $fname );
- return $result;
+ global $wgParser, $wgTitle;
+ $text = wfMsgForContent( 'navbar' );
+ $options = ParserOptions::newFromUser( $temp = NULL );
+ $parserOutput = $wgParser->parse( $text, $wgTitle, $options, true );
+ return $parserOutput->getText();
}
/**
<div class="portlet" id="p-nav">
<h5><?php $this->msg('navigation') ?></h5>
<div class="pBody">
- <ul>
- <?php foreach($this->data['navigation_urls'] as $navlink) { ?>
- <li id="<?php echo htmlspecialchars($navlink['id'])
- ?>"><a href="<?php echo htmlspecialchars($navlink['href']) ?>"><?php
- echo htmlspecialchars($navlink['text']) ?></a></li><?php } ?>
- </ul>
+ <?php echo $this->data['navigation_urls']; ?>
</div>
</div>
<div id="p-search" class="portlet">