From 0ff582a4f48af9395009f0a4c611a51310454286 Mon Sep 17 00:00:00 2001 From: Oliver Burger Date: Tue, 25 Oct 2011 20:59:51 +0000 Subject: import of original cavendish theme --- skins/cavendish.php | 419 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 419 insertions(+) create mode 100644 skins/cavendish.php (limited to 'skins/cavendish.php') diff --git a/skins/cavendish.php b/skins/cavendish.php new file mode 100644 index 0000000..c6498bb --- /dev/null +++ b/skins/cavendish.php @@ -0,0 +1,419 @@ + + * + * This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 + * Unported License. To view a copy of this license, visit + * http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative + * Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. + * + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** + * Inherit main code from SkinTemplate, set the CSS and template filter. + * @todo document + * @ingroup Skins + */ +class Skincavendish extends SkinTemplate { + function initPage( OutputPage $out ) { + parent::initPage( $out ); + $this->skinname = 'cavendish'; + $this->stylename = 'cavendish'; + $this->template = 'cavendishTemplate'; + + } + + function setupSkinUserCss( OutputPage $out ) { + global $wgHandheldStyle; + + parent::setupSkinUserCss( $out ); + + // Append to the default screen common & print styles... + $out->addStyle( 'cavendish/main.css', 'screen' ); + if( $wgHandheldStyle ) { + // Currently in testing... try 'chick/main.css' + $out->addStyle( $wgHandheldStyle, 'handheld' ); + } + + /* + $out->addStyle( 'cavendish/IE50Fixes.css', 'screen', 'lt IE 5.5000' ); + $out->addStyle( 'cavendish/IE55Fixes.css', 'screen', 'IE 5.5000' ); + $out->addStyle( 'cavendish/IE60Fixes.css', 'screen', 'IE 6' ); + $out->addStyle( 'cavendish/IE70Fixes.css', 'screen', 'IE 7' ); + + $out->addStyle( 'cavendish/rtl.css', 'screen', '', 'rtl' ); + */ + } +} + +/** + * @todo document + * @ingroup Skins + */ +class cavendishTemplate extends QuickTemplate { + var $skin; + var $show_sitename = 1; // Show sitename next to the header logo? 1=true, 0=false. + + /** + * Template filter callback for Cavendish skin. + * Takes an associative array of data set from a SkinTemplate-based + * class, and a wrapper for MediaWiki's localization database, and + * outputs a formatted page. + * + * @access private + */ + function execute() { + global $wgRequest, $wgSitename; + $this->skin = $skin = $this->data['skin']; + $action = $wgRequest->getText( 'action' ); + + // retrieve site name + $this->set('sitename', $wgSitename); + + // Suppress warnings to prevent notices about missing indexes in $this->data + wfSuppressWarnings(); + +?> +data['xhtmlnamespaces'] as $tag => $ns) { + ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> + + + html('headlinks') ?> + <?php $this->text('pagetitle') ?> + html('csslinks') ?> + + + + data ); ?> + + + +html('headscripts') ?> +data['jsvarurl']) { ?> + + +data['pagecss']) { ?> + +data['usercss']) { ?> + +data['userjs']) { ?> + +data['userjsprev']) { ?> + +data['trackbackhtml']) print $this->data['trackbackhtml']; ?> + + +data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" +data['body_onload']) { ?> onload="text('body_onload') ?>" + class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> + +
+
+ + + data['sitenotice']) { ?>
html('sitenotice') ?>
+ + + +
+ + + + +
+ +
+ + +
+ + +

data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

+

msg('tagline') ?>

+
html('subtitle') ?>
+ + data['undelete']) { ?>
html('undelete') ?>
+ data['newtalk'] ) { ?>
html('newtalk') ?>
+ data['showjumplinks']) { ?> + + html('bodytext') ?> + data['catlinks']) { $this->html('catlinks'); } ?> + + data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> +
+
+ +
+ +
+ + + + +
+ +html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> +html('reporttime') ?> +data['debug'] ): ?> + + + + +
  • msg('personaltools') ?> +
      + data['personal_urls'] as $key => $item) { ?> +
    • + class="">
    • + +
    +
  • + +
  • +
      +
      + + skin->tooltipAndAccesskey('search'); + if( isset( $this->data['search'] ) ) { ?> value="text('search') ?>" /> +
      + skin->tooltipAndAccesskey( 'search-go' ); ?> /> + + skin->tooltipAndAccesskey( 'search-fulltext' ); ?> /> + + + +
      +
      +
    +
  • + +
  • msg('toolbox') ?> + +
  • +data['language_urls'] ) { +?> +
  • msg('otherlanguages') ?> +
      + data['language_urls'] as $langlink) { ?> +
    • + +
    +
  • + +
  • + + + +
  • +