Created
February 27, 2012 23:58
-
-
Save dantman/1927993 to your computer and use it in GitHub Desktop.
Scalar skin (Example of a Vector derived skin)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Scalar skin | |
* | |
* @file | |
* @ingroup Skins | |
*/ | |
if( !defined( 'MEDIAWIKI' ) ) die( "This is an extension to the MediaWiki package and cannot be run standalone." ); | |
$wgValidSkinNames['scalar'] = 'Scalar'; | |
$wgAutoloadClasses['SkinScalar'] = dirname(__FILE__).'/Scalar.skin.php'; | |
$wgResourceModules['skins.scalar'] = array( | |
'styles' => array( | |
'scalar/screen.css' => array( 'media' => 'screen' ), | |
), | |
'remoteBasePath' => &$GLOBALS['wgStylePath'], | |
'localBasePath' => &$GLOBALS['wgStyleDirectory'], | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Scalar | |
* | |
* @file | |
* @ingroup Skins | |
*/ | |
if( !defined( 'MEDIAWIKI' ) ) | |
die( -1 ); | |
require_once( dirname( __FILE__ ) . '/../Vector.php' ); | |
/** | |
* @ingroup Skins | |
*/ | |
class SkinScalar extends SkinVector { | |
var $skinname = 'scalar', $stylename = 'scalar'; | |
/** | |
* @param $out OutputPage | |
*/ | |
function setupSkinUserCss( OutputPage $out ) { | |
global $wgHandheldStyle; | |
parent::setupSkinUserCss( $out ); | |
$out->addModuleStyles( 'skins.scalar' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment