From ac52ece6babf5fe0f2a4c6e2e5424adefea289b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C3=A9cureuil?= Date: Wed, 19 Apr 2017 18:12:02 +0200 Subject: Add Cavendish theme --- skins/Cavendish/SkinCavendish.php | 228 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 skins/Cavendish/SkinCavendish.php (limited to 'skins/Cavendish/SkinCavendish.php') diff --git a/skins/Cavendish/SkinCavendish.php b/skins/Cavendish/SkinCavendish.php new file mode 100644 index 0000000..f9cb3bf --- /dev/null +++ b/skins/Cavendish/SkinCavendish.php @@ -0,0 +1,228 @@ +addModuleStyles( "skins.cavendish" ); + if( $wgHandheldStyle ) { + // Currently in testing... try 'chick/main.css' + $out->addStyle( $wgHandheldStyle, 'handheld' ); + } + $out->addStyle( 'Cavendish/resources/IE60Fixes.css', 'screen', 'IE 6' ); + $out->addStyle( 'Cavendish/resources/IE70Fixes.css', 'screen', 'IE 7' ); + + $out->addStyle( 'Cavendish/resources/rtl.css', 'screen', '', 'rtl' ); + + /* README for details */ + include('resources/config.php'); + + $out->addStyle( 'Cavendish/resources/colors/'. $cavendishColor .'.css', 'screen' ); + + if ($cavendishExtensionCSS) { + $out->addStyle( 'Cavendish/resources/extensions.css', 'screen' ); + } + $out->addStyle( 'Cavendish/resources/style.php', 'screen' ); + } + +} + +class CavendishTemplate extends MonoBookTemplate { + var $skin; + /** + * 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, $wgLang; + include('resources/config.php'); + $QRURL = htmlentities( $this->getSkin()->getTitle()->getFullURL()).$cavendishQRurladd; + $styleversion = '2.3.5'; + $this->skin = $skin = $this->data['skin']; + $action = $wgRequest->getText( 'action' ); + if ( $action == "") { + $action = "view"; + } + // Suppress warnings to prevent notices about missing indexes in $this->data + wfSuppressWarnings(); + // HTML starts here + $this->html( 'headelement' ); +?> +
+ +
+
+
msg('personaltools') ?>
+
+
    html('userlangattributes') ?>> + data['personal_urls'] as $key => $item) {?> + +
  • " class="active top-nav-element"> +   + + +  
  • + + +
+
+
+ +
+
+ +
+
+
+
+ + data['sitenotice']) { ?>
html('sitenotice') ?>
+

html('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'); } ?> +
+
+
+
+
+ + + +printTrail(); + echo Html::closeElement( 'body' ); + echo Html::closeElement( 'html' ); + wfRestoreWarnings(); + } +} // end of class -- cgit v1.2.1