On 10/18/06, Grinfeder, Kim <grinfeder(a)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 .
'</td></tr></table>';
} else {
// perhaps check and see if argv[file] is an http/https/ftp link and
embed that source.
$output = 'Useful error messaage';
}
return $output;
}
Dan