[Mediawiki-l] Extension help

Dan Davis hokie99cpe+wiki at gmail.com
Thu Oct 19 02:49:33 UTC 2006

On 10/18/06, Grinfeder, Kim <grinfeder at miami.edu> wrote:
> To call the extension I plan to use: <wav file="file.wav">Caption</wav>
but I am stuck trying to
> access the wav file in the library. I was wondering if someone can point
me in the right
> direction or help me out.

Not 100%, but try this:

function WavInput( $input, $argv, &$parser ) {
    $wav = Image::newFromName($argv["file"]);
    if ($wav->exists()) {
        $url = $wav->getURL();
        $output = '<table bgcolor="#efefef" cellpadding="5" border="1"
bordercolor="#CCCCCC"><tr><td><EMBED SRC="'. $url. '" CONTROLS="console"
WIDTH=200 HEIGHT=260 AUTOSTART=false></EMBED><br />'. $input .
    } else {
        // perhaps check and see if argv[file] is an http/https/ftp link and
embed that source.
        $output = 'Useful error messaage';
    return $output;


More information about the MediaWiki-l mailing list