From a18c02824ad415574006d00d05d00108e023e942 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Fri, 26 Mar 2004 23:13:18 +0000 Subject: [PATCH] * Mono Skin added * oldid edit link in SkinPHPTal * more extensive footer --- includes/Skin.php | 1 + includes/SkinPHPTal.php | 27 +++++++++++++++++++++++---- languages/Language.php | 3 ++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 48cd2e3b69..d97334f9e1 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -20,6 +20,7 @@ if( $wgUseSmarty ) { if( $wgUsePHPTal ) { #$wgValidSkinNames[] = "PHPTal"; $wgValidSkinNames['davinci'] = "DaVinci"; + $wgValidSkinNames['mono'] = "Mono"; } include_once( "RecentChange.php" ); diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index 9494fede14..977c588642 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -33,15 +33,16 @@ 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() ); @@ -162,15 +166,21 @@ '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')); } @@ -333,6 +343,15 @@ 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"; } } diff --git a/languages/Language.php b/languages/Language.php index 92de7627d1..931014702a 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -99,7 +99,8 @@ if($wgMetaNamespace === FALSE) 'cologneblue' => "Cologne Blue", 'smarty' => "Paddington", 'montparnasse' => "Montparnasse", - 'davinci' => "DaVinci" + 'davinci' => "DaVinci", + 'mono' => "Mono" ); /* private */ $wgMathNamesEn = array( -- 2.20.1