. * * @file * @ingroup extensions * @author Mark Holmquist * @copyright Copyright © 2013, Mark Holmquist */ $moduleInfo = array( 'localBasePath' => __DIR__, 'remoteExtPath' => 'MultimediaViewer', ); $wgExtensionMessagesFiles['MultimediaViewer'] = __DIR__ . '/MultimediaViewer.i18n.php'; $wgResourceModules['multilightbox.interface'] = array_merge( array( 'scripts' => array( 'js/multilightbox/lightboxinterface.js', ), 'styles' => array( 'css/multilightbox.css', ), ), $moduleInfo ); $wgResourceModules['multilightbox.image'] = array_merge( array( 'scripts' => array( 'js/multilightbox/lightboximage.js', ), ), $moduleInfo ); $wgResourceModules['multilightbox'] = array_merge( array( 'scripts' => array( 'js/multilightbox/multilightbox.js', ), 'dependencies' => array( 'multilightbox.interface', ), ), $moduleInfo ); $wgResourceModules['ext.multimediaViewer'] = array_merge( array( 'scripts' => array( 'js/ext.multimediaViewer.js', ), 'styles' => array( 'css/ext.multimediaViewer.css', ), 'dependencies' => array( 'multilightbox', 'multilightbox.image', 'mediawiki.Title', 'jquery.ui.dialog', 'jquery.spinner', 'jquery.hidpi', ), 'messages' => array( 'multimediaviewer-file-page', 'multimediaviewer-repository', 'multimediaviewer-datetime-created', 'multimediaviewer-datetime-uploaded', 'multimediaviewer-userpage-link', 'multimediaviewer-credit', 'multimediaviewer-use-file', 'multimediaviewer-use-file-owt', 'multimediaviewer-use-file-own', 'multimediaviewer-use-file-offwiki', 'multimediaviewer-about-mmv', 'multimediaviewer-discuss-mmv', ), ), $moduleInfo ); $wgExtensionFunctions[] = function () { global $wgResourceModules; if ( isset( $wgResourceModules['ext.eventLogging'] ) ) { $wgResourceModules['schema.MediaViewer'] = array( 'class' => 'ResourceLoaderSchemaModule', 'schema' => 'MediaViewer', 'revision' => 6055641, ); $wgResourceModules['ext.multimediaViewer']['dependencies'][] = 'ext.eventLogging'; $wgResourceModules['ext.multimediaViewer']['dependencies'][] = 'schema.MediaViewer'; } }; $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-pd', 'cc-zero', 'default', ); foreach ( $licenses as $license ) { $wgResourceModules['ext.multimediaViewer']['messages'][] = 'multimediaviewer-license-' . $license; } $wgAutoloadClasses['MultimediaViewerHooks'] = __DIR__ . '/MultimediaViewerHooks.php'; $wgHooks['GetBetaFeaturePreferences'][] = 'MultimediaViewerHooks::getBetaPreferences'; $wgHooks['BeforePageDisplay'][] = 'MultimediaViewerHooks::getModulesForArticle'; $wgHooks['CategoryPageView'][] = 'MultimediaViewerHooks::getModulesForCategory'; $wgHooks['ResourceLoaderGetConfigVars'][] = 'MultimediaViewerHooks::resourceLoaderGetConfigVars'; $wgExtensionCredits['other'][] = array( 'path' => __FILE__, 'name' => 'MultimediaViewer', 'descriptionmsg' => 'multimediaviewer-desc', 'version' => '0.1', 'author' => array( 'MarkTraceur (Mark Holmquist)', ), 'url' => 'https://mediawiki.org/wiki/Extension:MultimediaViewer', );