Hello again,
I'm working on integrating FlowPlayer into an Omeka theme and have it running nicely. The only problem is that right now, I'm calling FlowPlayer based on Item Type using the item_has_type()helper. Since my/many sites have mixed types of multimedia files for any given Item Type (mpeg, wmv, flv, etc), I need to narrow it down so that FlowPlayer only comes into play for supported formats.
Can anyone help me out with this one? Basically, I need to modify the code below.
<?php
//if image --> Lightbox...
if (item_has_thumbnail())
{
echo '<p><em>Click the Image for Full Size</em></p>';
echo display_files_for_item(array('linkAttributes'=>array('rel'=>'lightbox[gallery]')));
foreach ($item->Files as $file){
echo '<div style="clear:both;">Download: <a href="'. file_download_uri($file). '" class="download-file">'. $file->original_filename. '</a></div> ';
}
}
//if supported video -->Flowplayer...
elseif (item_has_type('Moving Image'))
{
foreach ($item->Files as $file) {
echo '<a href="'. file_download_uri($file). '" class="download-file" id="player" style="display:block;width:315px;height:300px;background:#555;border:3px double #fff;"></a>';
echo '<script>flowplayer("player", "'.WEB_ROOT.'/themes/berlinGallery/common/flowplayer/flowplayer-3.2.2.swf");</script>';
echo '<div style="clear:both;">Download: <a href="'. file_download_uri($file). '" class="download-file">'. $file->original_filename. '</a></div> ';
}
}
//if any other...
else
{
echo display_files_for_item();
}
?>
Thanks,
Erin

