Extension:WikiMusicGuide MusicStream


 * Introduction
 * MusicStream is an extension that allows you to link an .mp3 or .ogg file in any MediaWiki based website.


 * About
 * The MusicStream is a media extension that allows anyone who has an .mp3 or .ogg file to stream/play it using the WikiMusicGuide Free Streaming Service. You can play music without waiting for the download to complete or installing complicated web media players. Linking your .mp3 or .ogg file on your page will let your browser download the song to either save it on your disk or open it in your preferred media player.


 * This simple but useful application that WikiMusicGuide offers will surely give an enjoyable interactive experience to its visitors, contributors, and all independent artists and bands in the music industry.


 * Installation:If you have an .mp3 or ogg file and you want to share it with WikiMusicGuide and others, please refer to the wiki text below.

// syntax

url=http://yourdomain.com/song.mp3 label=Song

URL is the address of the .mp3 or ogg file. Label is the title of the .mp3 or ogg file.

setHook( "musicstream", "renderMusicStream" ); } function renderMusicStream($input) { getOption($url,$input,'url'); getOption($text,$input,'label'); $output = "$text       "; return $output; }   function getOption(&$value,&$input,$name,$isNumber=false) { if(preg_match("/^\s*$name\s*=\s*(.*)/mi",$input,$matches)) { if($isNumber) { $value=intval($matches[1]); } else { $value=htmlspecialchars($matches[1]); }    }   } ?>
 * Code:
 * 1) Using this extension will allow you to stream your music.
 * 2) It takes a mp3 or ogg file as input and outputs a m3u streaming file.
 * 1) To activate the extension, include the following at the end of your LocalSettings.php
 * 2) require_once("extensions/musicstream.php");
 * 1) Syntax:
 * 1) url=http://yourdomain.com/song.mp3
 * 2) label=Song