2013-08-07 08:59:08 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* This file is part of the MediaWiki extension MultimediaViewer.
|
|
|
|
*
|
|
|
|
* MultimediaViewer is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* MultimediaViewer is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with MultimediaViewer. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @ingroup extensions
|
|
|
|
* @author Mark Holmquist <mtraceur@member.fsf.org>
|
|
|
|
* @copyright Copyright © 2013, Mark Holmquist
|
|
|
|
*/
|
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
// do not pollute global namespace
|
|
|
|
call_user_func( function() {
|
|
|
|
global $wgExtensionMessagesFiles, $wgResourceModules, $wgExtensionFunctions,
|
2014-02-06 16:17:38 +00:00
|
|
|
$wgAutoloadClasses, $wgHooks, $wgExtensionCredits, $wgNetworkPerformanceSamplingFactor;
|
|
|
|
|
|
|
|
/** @var int|bool: If set, records image load network performance once per this many requests. False if unset. **/
|
|
|
|
$wgNetworkPerformanceSamplingFactor = false;
|
2014-01-31 00:06:33 +00:00
|
|
|
|
|
|
|
$wgExtensionMessagesFiles['MultimediaViewer'] = __DIR__ . '/MultimediaViewer.i18n.php';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $path
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
$moduleInfo = function( $path ) {
|
|
|
|
return array(
|
|
|
|
'localBasePath' => __DIR__ . "/resources/$path",
|
|
|
|
'remoteExtPath' => "MultimediaViewer/resources/$path",
|
2013-12-06 17:10:39 +00:00
|
|
|
);
|
2014-01-31 00:06:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.lightboximage'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.lightboximage.js',
|
|
|
|
),
|
2014-02-25 02:28:49 +00:00
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.base',
|
|
|
|
),
|
2014-01-31 00:06:33 +00:00
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.lightboxinterface'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.lightboxinterface.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
2014-02-25 02:28:49 +00:00
|
|
|
'mmv.base',
|
2014-03-04 12:52:08 +00:00
|
|
|
'mmv.ui',
|
2014-02-04 23:44:36 +00:00
|
|
|
'mmv.ui.buttons',
|
2014-02-26 20:09:37 +00:00
|
|
|
'mmv.ui.canvas',
|
2014-02-03 11:13:37 +00:00
|
|
|
'mmv.ui.categories',
|
2014-01-31 00:06:33 +00:00
|
|
|
'mmv.ui.description',
|
|
|
|
'mmv.ui.fileUsage',
|
2014-02-07 14:47:00 +00:00
|
|
|
'mmv.ui.metadataPanel',
|
2014-02-06 23:18:47 +00:00
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.ThumbnailWidthCalculator'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ThumbnailWidthCalculator.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mediawiki',
|
|
|
|
'jquery',
|
|
|
|
'jquery.hidpi',
|
|
|
|
'mmv.base',
|
|
|
|
'mmv.model.ThumbnailWidth',
|
2014-01-31 00:06:33 +00:00
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.model'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.model.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.base',
|
|
|
|
'oojs',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/model' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.multilightbox'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.multilightbox.js',
|
|
|
|
),
|
|
|
|
|
2014-02-25 01:54:05 +00:00
|
|
|
'styles' => array(
|
|
|
|
'mmv.multilightbox.less',
|
|
|
|
),
|
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
'dependencies' => array(
|
2014-02-25 02:28:49 +00:00
|
|
|
'mmv.base',
|
2014-02-25 01:54:05 +00:00
|
|
|
'mmv.lightboxinterface',
|
2014-01-31 00:06:33 +00:00
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.model.FileUsage'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.model.FileUsage.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.model',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/model' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.model.Image'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.model.Image.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.model',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/model' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.model.Repo'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.model.Repo.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.model',
|
|
|
|
'oojs',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/model' ) );
|
|
|
|
|
2014-02-05 01:06:10 +00:00
|
|
|
$wgResourceModules['mmv.model.Thumbnail'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.model.Thumbnail.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.model',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/model' ) );
|
|
|
|
|
2014-02-06 23:18:47 +00:00
|
|
|
$wgResourceModules['mmv.model.ThumbnailWidth'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.model.ThumbnailWidth.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.model',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/model' ) );
|
|
|
|
|
2014-02-13 09:52:40 +00:00
|
|
|
$wgResourceModules['mmv.model.User'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.model.User.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.model',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/model' ) );
|
|
|
|
|
2014-02-10 21:24:19 +00:00
|
|
|
$wgResourceModules['mmv.model.TaskQueue'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.model.TaskQueue.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.model',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/model' ) );
|
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
$wgResourceModules['mmv.provider'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.provider.Api.js',
|
|
|
|
'mmv.provider.ImageUsage.js',
|
|
|
|
'mmv.provider.GlobalUsage.js',
|
2014-01-31 02:03:08 +00:00
|
|
|
'mmv.provider.ImageInfo.js',
|
|
|
|
'mmv.provider.FileRepoInfo.js',
|
|
|
|
'mmv.provider.ThumbnailInfo.js',
|
2014-02-06 00:12:50 +00:00
|
|
|
'mmv.provider.UserInfo.js',
|
2014-02-04 04:37:22 +00:00
|
|
|
'mmv.provider.Image.js',
|
2014-01-31 00:06:33 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mediawiki.Title',
|
|
|
|
'mmv.model',
|
2014-02-10 21:24:19 +00:00
|
|
|
'mmv.model.TaskQueue',
|
2014-01-31 00:06:33 +00:00
|
|
|
'oojs',
|
2014-02-15 02:15:54 +00:00
|
|
|
'mmv.performance',
|
2014-01-31 00:06:33 +00:00
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/provider' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.base'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.base.js',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.ui'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ui.js',
|
|
|
|
),
|
|
|
|
|
2014-02-14 00:36:10 +00:00
|
|
|
'styles' => array(
|
|
|
|
'mmv.ui.less',
|
|
|
|
),
|
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.base',
|
|
|
|
),
|
2014-02-03 22:46:04 +00:00
|
|
|
), $moduleInfo( 'mmv/ui' ) );
|
2014-01-31 00:06:33 +00:00
|
|
|
|
2014-02-26 20:09:37 +00:00
|
|
|
$wgResourceModules['mmv.ui.canvas'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ui.canvas.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'styles' => array(
|
|
|
|
'mmv.ui.canvas.less',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.ui',
|
|
|
|
'mmv.ThumbnailWidthCalculator',
|
|
|
|
'oojs',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/ui' ) );
|
|
|
|
|
2014-02-03 11:13:37 +00:00
|
|
|
$wgResourceModules['mmv.ui.categories'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ui.categories.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'styles' => array(
|
|
|
|
'mmv.ui.categories.less',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.ui',
|
|
|
|
'oojs',
|
|
|
|
),
|
2014-02-03 22:46:04 +00:00
|
|
|
), $moduleInfo( 'mmv/ui' ) );
|
2014-02-03 11:13:37 +00:00
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
$wgResourceModules['mmv.ui.description'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ui.description.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.ui',
|
|
|
|
'oojs',
|
|
|
|
),
|
2014-02-03 22:46:04 +00:00
|
|
|
), $moduleInfo( 'mmv/ui' ) );
|
2014-01-31 00:06:33 +00:00
|
|
|
|
|
|
|
$wgResourceModules['mmv.ui.fileUsage'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ui.fileUsage.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'styles' => array(
|
|
|
|
'mmv.ui.fileUsage.less',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mediawiki.Uri',
|
|
|
|
'mediawiki.jqueryMsg',
|
|
|
|
'mmv.ui',
|
|
|
|
'oojs',
|
|
|
|
),
|
2014-02-03 22:46:04 +00:00
|
|
|
), $moduleInfo( 'mmv/ui' ) );
|
2014-01-31 00:06:33 +00:00
|
|
|
|
2014-02-14 00:36:10 +00:00
|
|
|
$wgResourceModules['mmv.ui.permission'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ui.permission.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'styles' => array(
|
|
|
|
'mmv.ui.permission.less',
|
|
|
|
),
|
|
|
|
|
|
|
|
'messages' => array(
|
|
|
|
'multimediaviewer-permission-title',
|
2014-02-26 02:47:24 +00:00
|
|
|
'multimediaviewer-permission-viewmore',
|
2014-02-14 00:36:10 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'jquery.color',
|
|
|
|
'mediawiki.jqueryMsg',
|
|
|
|
'mmv.ui',
|
|
|
|
'oojs',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/ui' ) );
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
$wgResourceModules['mmv.ui.metadataPanel'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ui.metadataPanel.js',
|
|
|
|
),
|
2014-02-14 00:36:10 +00:00
|
|
|
|
|
|
|
'styles' => array(
|
|
|
|
'mmv.ui.metadataPanel.less',
|
|
|
|
),
|
2014-02-07 14:47:00 +00:00
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.ui',
|
|
|
|
'mmv.ui.fileReuse',
|
2014-02-14 00:36:10 +00:00
|
|
|
'mmv.ui.fileUsage',
|
|
|
|
'mmv.ui.permission',
|
|
|
|
'mmv.ui.description',
|
|
|
|
'mmv.ui.categories',
|
2014-02-07 14:47:00 +00:00
|
|
|
'oojs',
|
2014-02-18 08:19:10 +00:00
|
|
|
'moment',
|
2014-02-07 14:47:00 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'messages' => array(
|
|
|
|
'multimediaviewer-repository',
|
|
|
|
'multimediaviewer-repository-local',
|
|
|
|
|
|
|
|
'multimediaviewer-credit',
|
|
|
|
|
|
|
|
'multimediaviewer-userpage-link',
|
|
|
|
|
|
|
|
'multimediaviewer-datetime-created',
|
|
|
|
'multimediaviewer-datetime-uploaded',
|
|
|
|
|
2014-02-14 00:36:10 +00:00
|
|
|
// for license messages see end of file
|
|
|
|
'multimediaviewer-permission-link',
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
'multimediaviewer-geoloc-north',
|
|
|
|
'multimediaviewer-geoloc-east',
|
|
|
|
'multimediaviewer-geoloc-south',
|
|
|
|
'multimediaviewer-geoloc-west',
|
|
|
|
'multimediaviewer-geoloc-coord',
|
|
|
|
'multimediaviewer-geoloc-coords',
|
|
|
|
'multimediaviewer-geolocation',
|
|
|
|
|
|
|
|
'multimediaviewer-about-mmv',
|
|
|
|
'multimediaviewer-discuss-mmv',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/ui' ) );
|
|
|
|
|
|
|
|
$wgResourceModules['mmv.ui.fileReuse'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ui.fileReuse.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'styles' => array(
|
|
|
|
'mmv.ui.fileReuse.less',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.ui',
|
|
|
|
'oojs',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/ui' ) );
|
|
|
|
|
2014-02-04 23:44:36 +00:00
|
|
|
$wgResourceModules['mmv.ui.buttons'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.ui.buttons.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'styles' => array(
|
|
|
|
'mmv.ui.buttons.less',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.ui',
|
|
|
|
'oojs',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv/ui' ) );
|
|
|
|
|
2014-02-07 14:47:00 +00:00
|
|
|
$wgResourceModules['mmv.logger'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.logger.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
2014-02-17 15:09:23 +00:00
|
|
|
'jquery',
|
|
|
|
'mmv.base',
|
2014-02-07 14:47:00 +00:00
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
2014-02-06 16:17:38 +00:00
|
|
|
$wgResourceModules['mmv.performance'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.performance.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'jquery',
|
|
|
|
'mediawiki',
|
2014-02-11 13:25:39 +00:00
|
|
|
'mmv.base',
|
2014-02-06 16:17:38 +00:00
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
2014-02-15 02:15:54 +00:00
|
|
|
$wgResourceModules['mmv.api'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.api.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'jquery',
|
|
|
|
'mediawiki',
|
|
|
|
'mediawiki.api',
|
|
|
|
'mmv.base',
|
2014-02-19 14:41:40 +00:00
|
|
|
'oojs',
|
2014-02-15 02:15:54 +00:00
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
$wgResourceModules['mmv'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'styles' => array(
|
2014-02-03 04:04:20 +00:00
|
|
|
'mmv.less',
|
2014-02-24 17:06:11 +00:00
|
|
|
// Always make this one the last of the list (Bug 61852)
|
|
|
|
'mmv.loaded.css',
|
2014-01-31 00:06:33 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
2014-02-25 02:28:49 +00:00
|
|
|
'mmv.base',
|
2014-01-31 00:06:33 +00:00
|
|
|
'jquery.scrollTo',
|
|
|
|
'mmv.lightboximage',
|
|
|
|
'jquery.fullscreen',
|
2014-02-12 21:30:18 +00:00
|
|
|
'jquery.throttle-debounce',
|
2014-01-31 00:06:33 +00:00
|
|
|
'mediawiki.Uri',
|
|
|
|
'jquery.ui.dialog',
|
|
|
|
'jquery.hidpi',
|
|
|
|
'mmv.model',
|
|
|
|
'mmv.model.FileUsage',
|
|
|
|
'mmv.model.Image',
|
|
|
|
'mmv.model.Repo',
|
2014-02-05 01:06:10 +00:00
|
|
|
'mmv.model.Thumbnail',
|
2014-02-13 09:52:40 +00:00
|
|
|
'mmv.model.User',
|
2014-02-10 21:24:19 +00:00
|
|
|
'mmv.model.TaskQueue',
|
2014-01-31 00:06:33 +00:00
|
|
|
'mmv.provider',
|
|
|
|
'mediawiki.language',
|
|
|
|
'mmv.multilightbox',
|
2014-02-15 02:15:54 +00:00
|
|
|
'mmv.api',
|
2014-01-31 00:06:33 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
'messages' => array(
|
2014-02-03 11:13:37 +00:00
|
|
|
'comma-separator',
|
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
'multimediaviewer-file-page',
|
|
|
|
'multimediaviewer-use-file',
|
|
|
|
'multimediaviewer-use-file-owt',
|
|
|
|
'multimediaviewer-use-file-own',
|
|
|
|
'multimediaviewer-use-file-offwiki',
|
|
|
|
'multimediaviewer-desc-nil',
|
|
|
|
|
|
|
|
'multimediaviewer-fileusage-count',
|
|
|
|
'multimediaviewer-fileusage-count-more',
|
|
|
|
'multimediaviewer-fileusage-link',
|
|
|
|
'multimediaviewer-fileusage-local-section',
|
|
|
|
'multimediaviewer-fileusage-global-section',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
2014-02-17 15:09:23 +00:00
|
|
|
$wgResourceModules['mmv.bootstrap'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.bootstrap.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'jquery',
|
|
|
|
'mediawiki',
|
|
|
|
'mediawiki.Title',
|
|
|
|
'mmv.logger',
|
|
|
|
'mmv.ui',
|
2014-02-24 09:29:14 +00:00
|
|
|
'jquery.hashchange',
|
2014-02-17 15:09:23 +00:00
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
2014-03-04 11:53:53 +00:00
|
|
|
$wgResourceModules['mmv.bootstrap.autostart'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'mmv.bootstrap.autostart.js',
|
|
|
|
),
|
|
|
|
|
|
|
|
'dependencies' => array(
|
|
|
|
'mmv.base',
|
|
|
|
'mmv.bootstrap',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'mmv' ) );
|
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
$wgResourceModules['jquery.scrollTo'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'jquery.scrollTo.js',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'jquery.scrollTo' ) );
|
|
|
|
|
2014-02-24 09:29:14 +00:00
|
|
|
$wgResourceModules['jquery.hashchange'] = array_merge( array(
|
|
|
|
'scripts' => array(
|
|
|
|
'jquery.hashchange.js',
|
|
|
|
),
|
|
|
|
), $moduleInfo( 'jquery.hashchange' ) );
|
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
$wgExtensionFunctions[] = function () {
|
|
|
|
global $wgResourceModules;
|
|
|
|
|
|
|
|
if ( isset( $wgResourceModules['ext.eventLogging'] ) ) {
|
|
|
|
$wgResourceModules['schema.MediaViewer'] = array(
|
|
|
|
'class' => 'ResourceLoaderSchemaModule',
|
|
|
|
'schema' => 'MediaViewer',
|
2014-02-28 10:44:26 +00:00
|
|
|
'revision' => 7670440,
|
2014-01-31 00:06:33 +00:00
|
|
|
);
|
|
|
|
|
2014-02-06 16:17:38 +00:00
|
|
|
$wgResourceModules['schema.MultimediaViewerNetworkPerformance'] = array(
|
2014-01-31 00:06:33 +00:00
|
|
|
'class' => 'ResourceLoaderSchemaModule',
|
2014-02-06 16:17:38 +00:00
|
|
|
'schema' => 'MultimediaViewerNetworkPerformance',
|
2014-02-15 02:15:54 +00:00
|
|
|
'revision' => 7488625,
|
2014-01-31 00:06:33 +00:00
|
|
|
);
|
|
|
|
|
2014-02-27 07:56:53 +00:00
|
|
|
$wgResourceModules['mmv.bootstrap']['dependencies'][] = 'ext.eventLogging';
|
|
|
|
$wgResourceModules['mmv.bootstrap']['dependencies'][] = 'schema.MediaViewer';
|
|
|
|
|
2014-01-31 00:06:33 +00:00
|
|
|
$wgResourceModules['mmv']['dependencies'][] = 'ext.eventLogging';
|
|
|
|
$wgResourceModules['mmv']['dependencies'][] = 'schema.MediaViewer';
|
2014-02-06 16:17:38 +00:00
|
|
|
$wgResourceModules['mmv']['dependencies'][] = 'schema.MultimediaViewerNetworkPerformance';
|
2014-01-31 00:06:33 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
$licenses = array(
|
|
|
|
'cc-by-1.0',
|
|
|
|
'cc-sa-1.0',
|
|
|
|
'cc-by-sa-1.0',
|
|
|
|
'cc-by-2.0',
|
|
|
|
'cc-by-sa-2.0',
|
|
|
|
'cc-by-2.1',
|
|
|
|
'cc-by-sa-2.1',
|
|
|
|
'cc-by-2.5',
|
|
|
|
'cc-by-sa-2.5',
|
|
|
|
'cc-by-3.0',
|
|
|
|
'cc-by-sa-3.0',
|
|
|
|
'cc-by-sa-3.0-migrated',
|
|
|
|
'cc-by-4.0',
|
|
|
|
'cc-by-sa-4.0',
|
|
|
|
'cc-pd',
|
|
|
|
'cc-zero',
|
|
|
|
'pd',
|
|
|
|
'default',
|
|
|
|
);
|
|
|
|
|
|
|
|
foreach ( $licenses as $license ) {
|
|
|
|
$wgResourceModules['mmv']['messages'][] = 'multimediaviewer-license-' . $license;
|
2013-10-25 23:40:20 +00:00
|
|
|
}
|
2014-01-31 00:06:33 +00:00
|
|
|
|
|
|
|
$wgAutoloadClasses['MultimediaViewerHooks'] = __DIR__ . '/MultimediaViewerHooks.php';
|
|
|
|
$wgHooks['GetBetaFeaturePreferences'][] = 'MultimediaViewerHooks::getBetaPreferences';
|
|
|
|
$wgHooks['BeforePageDisplay'][] = 'MultimediaViewerHooks::getModulesForArticle';
|
|
|
|
$wgHooks['CategoryPageView'][] = 'MultimediaViewerHooks::getModulesForCategory';
|
|
|
|
$wgHooks['ResourceLoaderGetConfigVars'][] = 'MultimediaViewerHooks::resourceLoaderGetConfigVars';
|
|
|
|
$wgHooks['ResourceLoaderTestModules'][] = 'MultimediaViewerHooks::getTestModules';
|
|
|
|
|
2014-02-13 21:38:19 +00:00
|
|
|
$wgExtensionCredits['betafeatures'][] = array(
|
2014-01-31 00:06:33 +00:00
|
|
|
'path' => __FILE__,
|
|
|
|
'name' => 'MultimediaViewer',
|
|
|
|
'descriptionmsg' => 'multimediaviewer-desc',
|
|
|
|
'version' => '0.2.0',
|
|
|
|
'author' => array(
|
|
|
|
'MarkTraceur (Mark Holmquist)',
|
2014-02-13 21:38:19 +00:00
|
|
|
'Gilles Dubuc',
|
|
|
|
'Gergő Tisza',
|
|
|
|
'Aaron Arcos',
|
|
|
|
'Zeljko Filipin',
|
|
|
|
'Pau Giner',
|
|
|
|
'theopolisme',
|
|
|
|
'MatmaRex',
|
|
|
|
'apsdehal',
|
|
|
|
'vldandrew',
|
|
|
|
'Ebrahim Byagowi',
|
|
|
|
'Dereckson',
|
|
|
|
'Brion VIBBER',
|
|
|
|
'Yuki Shira',
|
|
|
|
'Yaroslav Melnychuk',
|
|
|
|
'tonythomas01',
|
|
|
|
'Raimond Spekking',
|
|
|
|
'Kunal Mehta',
|
|
|
|
'Jeff Hall',
|
|
|
|
'Christian Aistleitner',
|
|
|
|
'Amir E. Aharoni',
|
2014-01-31 00:06:33 +00:00
|
|
|
),
|
|
|
|
'url' => 'https://mediawiki.org/wiki/Extension:MultimediaViewer',
|
|
|
|
);
|
|
|
|
|
|
|
|
} );
|