Jump to content

Extension:Mp3Handler

From mediawiki.org
MediaWiki extensions manual
Mp3Handler
Release status: unmaintained
Implementation Media
Description MP3 Handler using a player from flash-mp3-player.net
Author(s) Conrad Irwin
Vitaliy Filippov
Latest version 0.1
MediaWiki
Database changes No
Download

Once you have installed this extension, you can upload Mp3 files in the same manner as images. To display them on a page, use the syntax [[File:MyFile.mp3]], just like for images.

Installation

[edit]
  • Download and place the file(s) in a directory called Mp3Handler in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    require_once "$IP/extensions/Mp3Handler/Mp3Handler.php";
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

[edit]
Parameter Description Default Status
$wgMp3DownloadPath Download path. Change this to look in a different directory (to track downloads, etc.). Set this to false to disable the download button. URL to the raw image Optional
$wgMp3DownloadIcon Path to the "download.png" icon "$wgScriptPath/extensions/Mp3Handler/download.png" Optional
$wgMp3playerPath Path to the MP3 player "$wgScriptPath/extensions/Mp3Handler/mp3player.swf" Optional

If you want to make sure that "download" really does download instead of playing in the browser, you should configure your server to set the MIME type to application/octet-stream. Overriding $wgMp3DownloadPath can make this easier.

License

[edit]

Original code is GPL3, while the player itself is CC-BY-SA 3.0 and MPL-1.1.