X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=skins%2FNostalgia.php;h=21d3578d816f214841cc7c9f99c1099f6fbfb619;hb=a4c62952e9814b90b48957ebd38ba4f0281e3b24;hp=0fceccc9bcc14448192aa346a52e5e96c4881e5a;hpb=b89965cded3205280eb659843a2baa5d0bcc1f3d;p=lhc%2Fweb%2Fwiklou.git
diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php
index 0fceccc9bc..21d3578d81 100644
--- a/skins/Nostalgia.php
+++ b/skins/Nostalgia.php
@@ -1,95 +1,132 @@
addModuleStyles( 'skins.nostalgia' );
}
- function getStylesheet() {
- return 'nostalgia.css';
- }
- function getSkinName() {
- return "nostalgia";
- }
+}
- function doBeforeContent() {
- global $wgUser, $wgOut, $wgTitle, $wgSiteNotice;
+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
";
- if( $wgSiteNotice ) {
- $s .= "\n
$wgSiteNotice
\n";
+
+ $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 ( 0 == $wgUser->getID() ) {
- $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() {
- global $wgUser, $wgOut;
-
$s = "\n
\n";
$s .= "\n\n
\n";
return $s;
}
}
-
-?>