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