Extension:Mp3Handler

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
Mp3Handler
Release status: unmaintained
Description MP3 Handler using dewplayer.fr
Author(s) wikt:User:Conrad.Irwin
Latest version 0.1
License GPL3
Download
Translate the Mp3Handler extension if it is available at translatewiki.net
Check usage and version matrix.

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.

Note: Dewplayer is not free software, though it is free of charge.

Install and configuration[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:
    require_once "$IP/extensions/Mp3Handler/Mp3Handler.php";
    $wgDewplayerPath = "$wgScriptPath/extensions/Mp3Handler/dewplayer.swf"; //Path to dewplayer.swf
    $wgMp3DownloadIcon = "$wgScriptPath/extensions/Mp3Handler/download.png"; //Path to the download.png
    $wgMp3DownloadPath = "$1"; //Download path. Change this to look in a different directory (to track downloads, etc.). Set this to false to disable the download button.
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

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.

See also[edit]