From 28ecda1e36eafb8f76e11e1ce4a968f833ca0b81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 9 Aug 2005 12:25:07 +0000 Subject: [PATCH] * Giving interwiki links a class so that they can be styled individually --- includes/SkinTemplate.php | 11 ++++++++--- skins/MonoBook.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index fcdd3daf02..daf9f5b686 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -362,10 +362,15 @@ class SkinTemplate extends Skin { if ( !$wgHideInterlanguageLinks ) { foreach( $wgOut->getLanguageLinks() as $l ) { + $tmp = explode( ':', $l, 2 ); + $class = 'interwiki-' . $tmp[0]; + unset($tmp); $nt = Title::newFromText( $l ); - $language_urls[] = array('href' => $nt->getFullURL(), - 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l), - 'class' => $wgContLang->isRTL() ? 'rtl' : 'ltr'); + $language_urls[] = array( + 'href' => $nt->getFullURL(), + 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l), + 'class' => $class + ); } } if(count($language_urls)) { diff --git a/skins/MonoBook.php b/skins/MonoBook.php index ca28f92c8d..2556c4b0b1 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -189,7 +189,7 @@ class MonoBookTemplate extends QuickTemplate {