diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-07-15 15:33:36 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-07-15 15:33:36 -0300 |
commit | a5f917bbc55e295896b8084f6657eb8b6abaf8a8 (patch) | |
tree | 83dca14378e45b11fe6bbf1d17e64505dff43cbd /extensions/TimedMediaHandler/mwEmbedLoader.php | |
parent | a1d705e541e0d10baa6bb03935ffd38d9478d0e6 (diff) |
Add TimedMediaHandler extension that allows display audio and video files in wiki pages, using the same syntax as for image files
Diffstat (limited to 'extensions/TimedMediaHandler/mwEmbedLoader.php')
-rw-r--r-- | extensions/TimedMediaHandler/mwEmbedLoader.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/extensions/TimedMediaHandler/mwEmbedLoader.php b/extensions/TimedMediaHandler/mwEmbedLoader.php new file mode 100644 index 00000000..ae03a3dd --- /dev/null +++ b/extensions/TimedMediaHandler/mwEmbedLoader.php @@ -0,0 +1,24 @@ +<?php +// This is a stub entry point to load.php This is need to support valid paths for the stand alone +// mwEmbed module html test files. + +// This is useful for running stand alone test of mwEmbed components in the TimedMediaHandler +// extension. ( ie MwEmbedModules/EmbedPlayer/tests/*.html files ) + +$_GET['modules'] = 'startup'; +$_GET['only'] = 'scripts'; + +// NOTE this won't work so well with symbolic links +$loaderPath = dirname(__FILE__) . '/../../load.php'; +if( is_file( $loaderPath ) ){ + chdir( dirname( $loaderPath ) ); + include_once( $loaderPath ); +} else { + print "if( console && typeof console.log == 'function' ){ console.log('Error can't find load.php for stand alone tests' ) }"; +} +// Bootstrap some js code to make the "loader" work in stand alone tests: +// Note this has to be wrapped in a document.write to run after other document.writes +$pageStartupScript = ResourceLoader::makeInlineScript( + Xml::encodeJsCall( 'mw.loader.go', array() ) +); +echo Xml::encodeJsCall( 'document.write', array( $pageStartupScript ) ); |