Override Audio Download Link
Hello,
I am trying to make the Audio node's download link say simply "download" instead of "download audio file." I've tried using the code below in template.php, but it doesn't seem to work. Does anyone know how to do this?
<?php
function phptemplate_audio_link($type, $node, $main = 0) {
$links = array();
$link_access = user_access('view download stats');
if ($type == 'node' && $node->type == 'audio') {
if (_audio_allow_download($node)) {
$links['audio_download_link'] = array(
'title' => t('download'),
'href' => $node->url_download,
);
if($link_access){
$links['audio_download_count'] = array(
'title' => t('@download_count downloads', array('@download_count' => $node->audio_fileinfo['download_count'])),
);
}
}
if (_audio_allow_play($node) && $link_access) {
$links['audio_play_count'] = array(
'title' => t('@play_count plays', array('@play_count' => $node->audio_fileinfo['play_count'])),
);
}
}
return $links;
}
?>
Thanks

Try this
I'm not a themer, so this may not be completely correct (for Drupal 5.x and current Audio 5.x-dev)
<?phpfunction phptemplate_links($links, $attributes = array('class' => 'links')) {
if(isset($links['audio_download_link'])) {
$links['audio_download_link']['title'] = t('Download');
}
return theme_links($links, $attributes);
}
?>
Perfect, thank you so much!
Perfect, thank you so much!
Not working for me
That doesn't seem to be working for me. My audio nodes are being displayed through a custom view in list mode. Is there another way to do this?
Thanks!