/[drupal]/contributions/modules/audio/audio_theme.inc
ViewVC logotype

Diff of /contributions/modules/audio/audio_theme.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.6 by drewish, Mon Jul 30 18:36:40 2007 UTC revision 1.7 by drewish, Mon Jul 30 22:25:05 2007 UTC
# Line 1  Line 1 
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  /**  /**

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.3