| 1 |
<?php |
<?php |
| 2 |
// $Id: audio_theme.inc,v 1.5 2007/02/20 18:35:26 drewish Exp $ |
// $Id: audio_theme.inc,v 1.6 2007/07/30 18:36:40 drewish Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Format the teaser for an audio node. |
* Format the teaser for an audio node. |
| 6 |
*/ |
*/ |
| 7 |
function theme_audio_teaser($node){ |
function theme_audio_teaser($node){ |
| 8 |
// make sure that all the allowed tags are included. |
$format = variable_get('audio_teaser_format', '[audio-player]<br />[audio-file-length]'); |
| 9 |
foreach (audio_get_tags_allowed() as $tag) { |
return token_replace($format, 'node', $node); |
|
$params['!'. $tag] = isset($node->audio_tags[$tag]) ? check_plain($node->audio_tags[$tag]) : ''; |
|
|
} |
|
|
$params['!filelength'] = theme('audio_format_filelength', $node->audio_fileinfo); |
|
|
$params['!fileformat'] = theme('audio_format_fileformat', $node->audio_fileinfo); |
|
|
$params['!player'] = audio_get_node_player($node); |
|
|
$params['!play_count'] = check_plain($node->audio_fileinfo['play_count']); |
|
|
$params['!download_count'] = check_plain($node->audio_fileinfo['download_count']); |
|
|
|
|
|
$format = variable_get('audio_teaser_format', '!player<br />!filelength'); |
|
|
|
|
|
return t($format, $params); |
|
| 10 |
} |
} |
| 11 |
|
|
| 12 |
/** |
/** |