User:Jack Phoenix/patches/XSoundBox

Index: XSoundBox.php

=
====================================================== --- XSoundBox.php	(revision 115) +++ XSoundBox.php	(working copy) @@ -1,17 +1,28 @@  'XSoundBox', +	'version' => '1.0', +	'description' => 'Allows to play sound media on the wiki, by using SoX and Lame', +	'author' => 'Mikołaj Musielak', +	'url' => 'http://www.mediawiki.org/wiki/Extension:XSoundBox' +); +//Avoid unstubbing $wgParser too early on modern (1.12+) MW versions, as per r35980 +if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { +	$wgHooks['ParserFirstCallInit'][] = 'wfXSoundBox'; +} else { +	$wgExtensionFunctions[] = 'wfXSoundBox'; +} -$wgExtensionFunctions [] = 'wfXSoundBox'; $wgXSoundRepoPath = '/images/_ext_xsound/images/'; $wgXSoundRepoURL = 'http://images.wikia.com/_ext_xsound/images/'; function wfXSoundBox { global $wgParser; $wgParser->setHook( 'xsound', 'EmbedXSound' ); +	return true; } function EmbedXSound($fName, $argV) { @@ -75,7 +86,4 @@ 		. ''; 	} -} - - -?> +} \ No newline at end of file Index: ~README

=
====================================================== --- ~README	(revision 115) +++ ~README	(working copy) @@ -1,7 +1,7 @@ To install: -Add this line to LocalSettings: - Require_Once ($IP . '/extensions/XSoundBox.php'); +Add this line to LocalSettings.php: + require_once($IP . '/extensions/XSoundBox.php'); Since Adobe Flash Player can only handle MP3 files we need to convert other files first. This is done with sox/lame combo, so you'll have to make sure both programs are installed and avaiable for HTTP server.