* Mono Skin added
authorGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 26 Mar 2004 23:13:18 +0000 (23:13 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Fri, 26 Mar 2004 23:13:18 +0000 (23:13 +0000)
* oldid edit link in SkinPHPTal
* more extensive footer

includes/Skin.php
includes/SkinPHPTal.php
languages/Language.php

index 48cd2e3..d97334f 100644 (file)
@@ -20,6 +20,7 @@ if( $wgUseSmarty ) {
 if( $wgUsePHPTal ) {
     #$wgValidSkinNames[] = "PHPTal";
     $wgValidSkinNames['davinci'] = "DaVinci";
+    $wgValidSkinNames['mono'] = "Mono";
 }
 
 include_once( "RecentChange.php" );
index 9494fed..977c588 100644 (file)
 
                function initPage() {
                        $this->skinname = "davinci";
+                       $this->template = "xhtml_slim";
                }
 
                function outputPage( &$out ) {
                        global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut;
                        global $wgScriptPath, $wgStyleSheetPath, $wgLanguageCode, $wgUseNewInterlanguage;
-                       global $wgOutputEncoding, $wgUseDatabaseMessages, $action;
+                       global $wgOutputEncoding, $wgUseDatabaseMessages, $action, $oldid, $diff;
 
                        $this->initPage();
-                       $tpl = new PHPTAL($this->skinname . '.pt', 'templates');
+                       $tpl = new PHPTAL($this->template . '.pt', 'templates');
                        #if ( $wgUseDatabaseMessages ) { // uncomment this to fall back to GetText
 
                        $tpl->setTranslator(new MediaWiki_I18N());
@@ -53,6 +54,7 @@
                        $tpl->setRef( "thispage", &$thispage );
                        $tpl->set( "subtitle", $out->getSubtitle() );
                        $tpl->setRef( 'charset', $wgOutputEncoding);
+                       $tpl->setRef( 'skinname', $this->skinname );
 
                        $loggedin = $wgUser->getID() != 0;
                        $tpl->setRef( "loggedin", &$loggedin );
@@ -85,6 +87,8 @@
                        $tpl->setRef( "skin", &$this);
                        $tpl->set( "logo", $this->logoText() );
                        $tpl->set( "pagestats", $this->pageStats() );
+                       $tpl->set( "disclaimer", $this->disclaimerLink() );
+                       $tpl->set( "about", $this->aboutLink() );
 
                        $tpl->setRef( "debug", &$out->mDebugtext );
                        $tpl->set( "reporttime", $out->reportTime() );
                                'akey' => wfMsg('accesskey-talk'));
 
                                if ( $wgTitle->userCanEdit() ) {
+                                       if ( $oldid && ! isset( $diff ) ) {
+                                               $oid = "&oldid={$oldid}";
+                                       }
                                        $content_actions['edit'] = array('class' => ($action == 'edit' or $action == 'submit') ? 'selected' : '',
                                        'text' => wfMsg('edit'),
-                                       'href' => $this->makeUrl($thispage, 'action=edit'),
+                                       'href' => $this->makeUrl($thispage, 'action=edit'.$oid),
                                        'ttip' => wfMsg('tooltip-edit'),
                                        'akey' => wfMsg('accesskey-edit'));
                                } else {
+                                       if ( $oldid && ! isset( $diff ) ) {
+                                               $oid = "&oldid={$oldid}";
+                                       }
                                        $content_actions['edit'] = array('class' => ($action == 'edit') ? 'selected' : '',
                                        'text' => wfMsg('viewsource'),
-                                       'href' => $this->makeUrl($thispage, 'action=edit'),
+                                       'href' => $this->makeUrl($thispage, 'action=edit'.$oid),
                                        'ttip' => wfMsg('tooltip-edit'),
                                        'akey' => wfMsg('accesskey-edit'));
                                }
                function initPage() {
                        SkinPHPTal::initPage();
                        $this->skinname = "davinci";
+                       $this->template = "xhtml_slim";
+               }
+       }
+       
+       class SkinMono extends SkinPHPTal {
+               function initPage() {
+                       SkinPHPTal::initPage();
+                       $this->skinname = "mono";
+                       $this->template = "xhtml_slim";
                }
        }
        
index 92de762..9310147 100644 (file)
@@ -99,7 +99,8 @@ if($wgMetaNamespace === FALSE)
        'cologneblue' => "Cologne Blue",
        'smarty' => "Paddington",
        'montparnasse' => "Montparnasse",
-       'davinci' => "DaVinci"
+       'davinci' => "DaVinci",
+       'mono' => "Mono"
 );
 
 /* private */ $wgMathNamesEn = array(