[Mediawiki-l] menuanpassungen
frank dheim
conloos at yahoo.de
Thu Jul 7 23:45:30 UTC 2005
Nabend,
ich hatte meine Navigationsmenu in 1.4.4 und 1.4.5
angepast.
nach update auf 1.4.6 geht das nicht mehr und ich
finde den Fehler nicht...
[LocalSettings.php]
### schanipp ###
$wgNavigationLinks = array (
array( 'text'=>'mainpage', 'href'=>'mainpage'
),
array( 'text'=>'recentchanges',
'href'=>'recentchanges-url' ),
array( 'text'=>'randompage',
'href'=>'randompage-url' ),
array( 'text'=>'help', 'href'=>'helppage' )
);
$wgCustomLinks = array (
array( 'text'=>'allsides', 'href'=>'allsides-url' )
);
### schanipp ###
[SkinTemplate.php]
### schanipp ###
function outputPage( &$out ) {
...
$tpl->set( 'custom_urls', $this->buildCustomUrls() );
...
}
### weiter unten
class SkinTemplate extends Skin {
...
/**
* build array of global navigation links
* @return array
* @access private
*/
function buildCustomUrls () {
$fname = 'SkinTemplate::buildNavigationUrls';
wfProfileIn( $fname );
global $wgCustomLinks;
$result = array();
foreach ( $wgCustomLinks 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;
}
...
}
### schanipp ###
[LanguageDe.php]
### schanipp ###
"customlinks" => "Kategorien",
"allsides" => "Alle Seiten",
'allsides-url' => 'Special:Allpages',
'randompage-url' => 'Special:Randompage',
### schanipp ###
sorry, hab alles soweit es ging gekürzt
danke con
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
More information about the MediaWiki-l
mailing list