forked from borkweb/BootstrapMediaWiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap-mediawiki.php
56 lines (48 loc) · 1.84 KB
/
bootstrap-mediawiki.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Bootstrap MediaWiki
*
* @bootstrap-mediawiki.php
* @ingroup Skins
* @author Matthew Batchelder (http://borkweb.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
*/
if ( ! defined( 'MEDIAWIKI' ) ) die( "This is an extension to the MediaWiki package and cannot be run standalone." );
$wgExtensionCredits['skin'][] = array(
'path' => __FILE__,
'name' => 'Bootstrap Mediawiki',
'url' => 'http://borkweb.com',
'author' => '[http://borkweb.com Matthew Batchelder]',
'description' => 'MediaWiki skin using Bootstrap 3',
);
$wgValidSkinNames['bootstrapmediawiki'] = 'BootstrapMediaWiki';
$wgAutoloadClasses['SkinBootstrapMediaWiki'] = __DIR__ . '/BootstrapMediaWiki.skin.php';
$skinDirParts = explode( DIRECTORY_SEPARATOR, __DIR__ );
$skinDir = array_pop( $skinDirParts );
$wgResourceModules['skins.bootstrapmediawiki'] = array(
'styles' => array(
$skinDir . '/bootstrap/css/bootstrap.min.css' => array( 'media' => 'all' ),
$skinDir . '/google-code-prettify/prettify.css' => array( 'media' => 'all' ),
$skinDir . '/style.css' => array( 'media' => 'all' ),
),
'scripts' => array(
$skinDir . '/bootstrap/js/bootstrap.min.js',
$skinDir . '/google-code-prettify/prettify.js',
$skinDir . '/js/jquery.ba-dotimeout.min.js',
$skinDir . '/js/behavior.js',
),
'dependencies' => array(
'jquery',
'jquery.mwExtension',
'jquery.client',
'jquery.cookie',
),
'remoteBasePath' => &$GLOBALS['wgStylePath'],
'localBasePath' => &$GLOBALS['wgStyleDirectory'],
);
if ( isset( $wgSiteJS ) ) {
$wgResourceModules['skins.bootstrapmediawiki']['scripts'][] = $skinDir . '/' . $wgSiteJS;
}//end if
if ( isset( $wgSiteCSS ) ) {
$wgResourceModules['skins.bootstrapmediawiki']['styles'][] = $skinDir . '/' . $wgSiteCSS;
}//end if