Overriding Download Options
From ResourceSpace Documentation Wiki
It's possible to replace the download box to the right of the preview image on the view resource page with a custom download box for a given resource type.
Example - a YouTube video preview link
In this example the download box will be altered to show a link to YouTube for video resources.
Create a subfolder off the root called 'viewers'. In here place a file called 'type?.php' where ? is the resource type number (by default for videos this is 3, so use 'type3.php').
Add the following code to this file:
<?
# Special case for videos
$stream_url=get_data_by_field($ref,46);
?>
<table cellpadding="0" cellspacing="0">
<tr >
<td>File Information</td>
<td>File Size </td>
<td>Options</td>
</tr>
<? if ($stream_url!="") { ?>
<tr class="DownloadDBlend">
<td><h2>Online Preview</h2><p>Low resolution streaming preview.</p></
td>
<td>N/A</td>
<td class="DownloadButton HorizontalWhiteNav"><a href="<?=$stream_url?
>">Stream Video</a></td>
</tr>
<? } ?>
</table>
You need to replace the number '46' with the ID of the field that you are using to store the YouTube URL.
