X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=skins%2FNostalgia.php;h=21d3578d816f214841cc7c9f99c1099f6fbfb619;hb=74281ebe4658bffd6cf702ee8e021e78c2347052;hp=70e4dfcbc24b7cdf1fc1fb97d936b4341596172f;hpb=83773b4a6945ab7e9e6e12e8cf5a28ce0a9a6579;p=lhc%2Fweb%2Fwiklou.git
diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php
index 70e4dfcbc2..21d3578d81 100644
--- a/skins/Nostalgia.php
+++ b/skins/Nostalgia.php
@@ -1,77 +1,109 @@
addModuleStyles( 'skins.nostalgia' );
}
+}
+
+class NostalgiaTemplate extends LegacyTemplate {
+
+ /**
+ * @return string
+ */
function doBeforeContent() {
$s = "\n
\n
\n";
- $s .= "
".$this->logoText( "right" )."
";
+ $s .= '
' . $this->getSkin()->logoText( 'right' ) . '
';
$s .= $this->pageTitle();
$s .= $this->pageSubtitle() . "\n";
- $s .= "
";
+ $s .= '
';
$s .= $this->topLinks() . "\n
";
- $notice = wfGetSiteNotice();
+ $notice = $this->getSkin()->getSiteNotice();
if( $notice ) {
$s .= "\n
$notice
\n";
}
$s .= $this->pageTitleLinks();
$ol = $this->otherLanguages();
- if($ol) $s .= "
" . $ol;
+ if( $ol ) {
+ $s .= '
' . $ol;
+ }
- $cat = $this->getCategoryLinks();
- if($cat) $s .= "
" . $cat;
+ $s .= $this->getSkin()->getCategories();
- $s .= "
\n
\n";
+ $s .= "
\n
\n";
$s .= "\n";
return $s;
}
+ /**
+ * @return string
+ */
function topLinks() {
- global $wgOut, $wgUser;
$sep = " |\n";
- $s = $this->mainPageLink() . $sep
- . $this->specialLink( "recentchanges" );
+ $s = $this->getSkin()->mainPageLink() . $sep
+ . Linker::specialLink( 'Recentchanges' );
- if ( $wgOut->isArticle() ) {
- $s .= $sep . $this->editThisPage()
- . $sep . $this->historyLink();
+ if ( $this->data['isarticle'] ) {
+ $s .= $sep . '' . $this->editThisPage() . '' . $sep . $this->talkLink() .
+ $sep . $this->historyLink();
}
/* show links to different language variants */
$s .= $this->variantLinks();
$s .= $this->extensionTabLinks();
-
- if ( $wgUser->isAnon() ) {
- $s .= $sep . $this->specialLink( "userlogin" );
+ if ( !$this->data['loggedin'] ) {
+ $s .= $sep . Linker::specialLink( 'Userlogin' );
} else {
- $s .= $sep . $this->specialLink( "userlogout" );
+ /* show user page and user talk links */
+ $user = $this->getSkin()->getUser();
+ $s .= $sep . Linker::link( $user->getUserPage(), wfMsgHtml( 'mypage' ) );
+ $s .= $sep . Linker::link( $user->getTalkPage(), wfMsgHtml( 'mytalk' ) );
+ if ( $user->getNewtalk() ) {
+ $s .= ' *';
+ }
+ /* show watchlist link */
+ $s .= $sep . Linker::specialLink( 'Watchlist' );
+ /* show my contributions link */
+ $s .= $sep . Linker::link(
+ SpecialPage::getSafeTitleFor( 'Contributions', $this->data['username'] ),
+ wfMsgHtml( 'mycontris' ) );
+ /* show my preferences link */
+ $s .= $sep . Linker::specialLink( 'Preferences' );
+ /* show upload file link */
+ if( UploadBase::isEnabled() && UploadBase::isAllowed( $user ) === true ) {
+ $s .= $sep . $this->getUploadLink();
+ }
+
+ /* show log out link */
+ $s .= $sep . Linker::specialLink( 'Userlogout' );
}
$s .= $sep . $this->specialPagesList();
@@ -79,6 +111,9 @@ class SkinNostalgia extends Skin {
return $s;
}
+ /**
+ * @return string
+ */
function doAfterContent() {
$s = "\n