MediaWiki  REL1_19
Nostalgia.php
Go to the documentation of this file.
00001 <?php
00009 if( !defined( 'MEDIAWIKI' ) ) {
00010         die( -1 );
00011 }
00012 
00017 class SkinNostalgia extends SkinLegacy {
00018         var $skinname = 'nostalgia', $stylename = 'nostalgia',
00019                 $template = 'NostalgiaTemplate';
00020 
00024         function setupSkinUserCss( OutputPage $out ){
00025                 parent::setupSkinUserCss( $out );
00026                 $out->addModuleStyles( 'skins.nostalgia' );
00027         }
00028 
00029 }
00030 
00031 class NostalgiaTemplate extends LegacyTemplate {
00032 
00036         function doBeforeContent() {
00037                 $s = "\n<div id='content'>\n<div id='top'>\n";
00038                 $s .= '<div id="logo">' . $this->getSkin()->logoText( 'right' ) . '</div>';
00039 
00040                 $s .= $this->pageTitle();
00041                 $s .= $this->pageSubtitle() . "\n";
00042 
00043                 $s .= '<div id="topbar">';
00044                 $s .= $this->topLinks() . "\n<br />";
00045 
00046                 $notice = $this->getSkin()->getSiteNotice();
00047                 if( $notice ) {
00048                         $s .= "\n<div id='siteNotice'>$notice</div>\n";
00049                 }
00050                 $s .= $this->pageTitleLinks();
00051 
00052                 $ol = $this->otherLanguages();
00053                 if( $ol ) {
00054                         $s .= '<br />' . $ol;
00055                 }
00056 
00057                 $s .= $this->getSkin()->getCategories();
00058 
00059                 $s .= "<br clear='all' /></div><hr />\n</div>\n";
00060                 $s .= "\n<div id='article'>";
00061 
00062                 return $s;
00063         }
00064 
00068         function topLinks() {
00069                 $sep = " |\n";
00070 
00071                 $s = $this->getSkin()->mainPageLink() . $sep
00072                   . Linker::specialLink( 'Recentchanges' );
00073 
00074                 if ( $this->data['isarticle'] ) {
00075                         $s .= $sep . '<strong>' . $this->editThisPage() . '</strong>' . $sep . $this->talkLink() .
00076                                         $sep . $this->historyLink();
00077                 }
00078 
00079                 /* show links to different language variants */
00080                 $s .= $this->variantLinks();
00081                 $s .= $this->extensionTabLinks();
00082                 if ( !$this->data['loggedin'] ) {
00083                         $s .= $sep . Linker::specialLink( 'Userlogin' );
00084                 } else {
00085                         /* show user page and user talk links */
00086                         $user = $this->getSkin()->getUser();
00087                         $s .= $sep . Linker::link( $user->getUserPage(), wfMsgHtml( 'mypage' ) );
00088                         $s .= $sep . Linker::link( $user->getTalkPage(), wfMsgHtml( 'mytalk' ) );
00089                         if ( $user->getNewtalk() ) {
00090                                 $s .= ' *';
00091                         }
00092                         /* show watchlist link */
00093                         $s .= $sep . Linker::specialLink( 'Watchlist' );
00094                         /* show my contributions link */
00095                         $s .= $sep . Linker::link(
00096                                 SpecialPage::getSafeTitleFor( 'Contributions', $this->data['username'] ),
00097                                 wfMsgHtml( 'mycontris' ) );
00098                         /* show my preferences link */
00099                         $s .= $sep . Linker::specialLink( 'Preferences' );
00100                         /* show upload file link */
00101                         if( UploadBase::isEnabled() && UploadBase::isAllowed( $user ) === true ) {
00102                                 $s .= $sep . $this->getUploadLink();
00103                         }
00104 
00105                         /* show log out link */
00106                         $s .= $sep . Linker::specialLink( 'Userlogout' );
00107                 }
00108 
00109                 $s .= $sep . $this->specialPagesList();
00110 
00111                 return $s;
00112         }
00113 
00117         function doAfterContent() {
00118                 $s = "\n</div><br clear='all' />\n";
00119 
00120                 $s .= "\n<div id='footer'><hr />";
00121 
00122                 $s .= $this->bottomLinks();
00123                 $s .= "\n<br />" . $this->pageStats();
00124                 $s .= "\n<br />" . $this->getSkin()->mainPageLink()
00125                                 . ' | ' . $this->getSkin()->aboutLink()
00126                                 . ' | ' . $this->searchForm();
00127 
00128                 $s .= "\n</div>\n</div>\n";
00129 
00130                 return $s;
00131         }
00132 }