This repository has been archived by the owner on Sep 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
FancyBoxThumbs.php
48 lines (41 loc) · 1.58 KB
/
FancyBoxThumbs.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
<?php
/**
* FancyBoxThumbs MediaWiki Extension
* @version 2.1
* @example at http://gilluminate.com/mediawiki/
* @author [http://www.gilluminate.com Jason Gill]
* @license [http://www.gnu.org/licenses/gpl.html GPLv3]
*/
/**
* fancyBox - jQuery Plugin
* @version: 2.1.4 (Thu, 17 Jan 2013)
* @example at http://fancyapps.com/fancybox/
* @license www.fancyapps.com/fancybox/#license
* @copyright Copyright 2012 Janis Skarnelis - janis@fancyapps.com
*/
if ( !defined( 'MEDIAWIKI' ) ) {
echo( "This file is part of an extension to the MediaWiki software and cannot be used standalone.\n" );
die( 1 );
}
$fbtFancyBoxOptions = "{}";
//Register Credits
$wgExtensionCredits['media'][] = array(
'name' => 'FancyBoxThumbs',
'url' => 'http://www.mediawiki.org/wiki/Extension:FancyBoxThumbs',
'author' => '[http://www.gilluminate.com Jason Gill]',
'description' => 'Displays thumbnailed images in a Mac-style "lightbox" that floats overtop of web page. A simple and fancy lightbox alternative',
'version' => '2.1'
);
$wgResourceModules['ext.FancyBoxThumbs'] = array(
'scripts' => array('fancyBox/source/jquery.fancybox.js','ext.FancyBoxThumbs.js'),
'styles' => 'fancyBox/source/jquery.fancybox.css',
'localBasePath' => dirname( __FILE__ ).'/modules',
'remoteExtPath' => 'FancyBoxThumbs/modules',
);
$wgHooks['BeforePageDisplay'][] = 'fbtBeforePageDisplay';
function fbtBeforePageDisplay(&$out){
global $fbtFancyBoxOptions;
$out->addModules( 'ext.FancyBoxThumbs' );
$out->addInlineScript('var fbtFancyBoxOptions = '.$fbtFancyBoxOptions.';');
return true;
}