X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=skins%2FNostalgia.php;h=21d3578d816f214841cc7c9f99c1099f6fbfb619;hb=74281ebe4658bffd6cf702ee8e021e78c2347052;hp=4bf4bf6bde08ef1564f0accfea66aa5882aa9b7c;hpb=ba9ae792125f3e5dc4add3a3dbf1bf08f8e0553a;p=lhc%2Fweb%2Fwiklou.git
diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php
index 4bf4bf6bde..21d3578d81 100644
--- a/skins/Nostalgia.php
+++ b/skins/Nostalgia.php
@@ -1,83 +1,119 @@
addModuleStyles( 'skins.nostalgia' );
}
- function getStylesheet() {
- return 'common/nostalgia.css';
- }
- function getSkinName() {
- return "nostalgia";
- }
+}
- function doBeforeContent() {
- global $wgUser, $wgOut, $wgTitle;
+class NostalgiaTemplate extends LegacyTemplate {
- $s = "\n
\n
";
- $s .= $this->logoText( "right" );
+ /**
+ * @return string
+ */
+ function doBeforeContent() {
+ $s = "\n
\n
\n";
+ $s .= '
' . $this->getSkin()->logoText( 'right' ) . '
';
$s .= $this->pageTitle();
$s .= $this->pageSubtitle() . "\n";
+ $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;
-
- $cat = $this->getCategoryLinks();
- if($cat) $s .= "
" . $cat;
+ if( $ol ) {
+ $s .= '
' . $ol;
+ }
+
+ $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();
}
- if ( $wgUser->isAnon() ) {
- $s .= $sep . $this->specialLink( "userlogin" );
+
+ /* show links to different language variants */
+ $s .= $this->variantLinks();
+ $s .= $this->extensionTabLinks();
+ 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();
return $s;
}
+ /**
+ * @return string
+ */
function doAfterContent() {
$s = "\n
\n";
@@ -85,14 +121,12 @@ class SkinNostalgia extends Skin {
$s .= $this->bottomLinks();
$s .= "\n
" . $this->pageStats();
- $s .= "\n
" . $this->mainPageLink()
- . " | " . $this->aboutLink()
- . " | " . $this->searchForm();
+ $s .= "\n
" . $this->getSkin()->mainPageLink()
+ . ' | ' . $this->getSkin()->aboutLink()
+ . ' | ' . $this->searchForm();
$s .= "\n
\n
\n";
return $s;
}
}
-
-?>