i've modified the video_link function
function video_link($type, $node = NULL) {
$link = '';
// Node links for a video
if ($type == 'node' && $node->type == 'video' && $node->vidfile && user_access('access video')) {
//If the video is of type youtube and multi-file downloads aren't turned on don't show the download link.
if (_video_get_filetype($node->vidfile) == 'youtube' and $node->disable_multidownload == 1) {
$display_download_link = 0;
}
else {
$display_download_link = variable_get('video_displaydownloadlink', 1);
}
if (variable_get('video_displayplaylink', 1)) {
$link .= l(t('play'), "node/$node->nid/play", array('class' => 'outgoing', 'title' => t('play %link', array('%link' => $node->title))));
$link .= ($display_download_link == 1) ? ' ' . t('or') . ' ' : ' | ';
}
if ($display_download_link == 1) {
$link .= l(t('download'), "node/$node->nid/download", array('class' => 'outgoing', 'title' => t('download %link', array('%link' => $node->title))));
$link .= ' | ';
}
if (variable_get('video_displayplaytime', 1)) {
$link .= format_interval($node->playtime_seconds) . ' | ';
}
if (variable_get('video_displayfilesize', 1) and $node->size != 0) {
$link .= format_size($node->size) . ' | ';
}
if (variable_get('video_playcounter', 1) and user_access('view play counter')) {
$link .= $node->play_counter . ' ' . t('plays') . ' | ';
}
if (variable_get('video_downloadcounter', 1) and user_access('view download counter')) {
$link .= $node->download_counter . ' ' . t('downloads') . ' | ';
}
$link = substr($link, 0, -3); //Trim the last " | " off.
return array($link);
}
return array();
}
modified lines are the last three:
return array($link);
}
return array();
}
Comments
Comment #1
fax8 commentedgood catch.
Will be inserted in the next commit.
Comment #2
fax8 commentedfixed on video.module v1.38 on cvs.
Thanks for pointing this out.
Comment #3
(not verified) commented