function phptemplate_audio_mp3_player($node, $options = array()) { global $base_url; global $playerId; // flash only supports a limited range of sample rates. switch ($node->audio_fileinfo['sample_rate']) { case '44100': case '22050': case '11025': break; default: return; } $options = array( 'playerId' => $playerId++, 'soundFile' => $node->url_play, 'bg' => '0xFFFFFF', 'leftbg' => '0x80B3CC', 'rightbg' => '0xE5EFF5', 'rightbghover' => '0xE5EFF5', 'lefticon' => '0xE5EFF5', 'righticon' => '0x80B3CC', 'righticonhover' => '0xE99030', 'text' => '0x006699', 'slider' => '0x80B3CC', 'loader' => '0xE5EFF5', 'track' => '0xFFFFFF', 'border' => '0x80B3CC', ); $params = array(); foreach ($options as $key => $val) { $params[] = rawurlencode($key) .'='. rawurlencode($val); } $player = $base_url .'/'. path_to_theme() .'/player.swf'; $output = ''; $output .= ''; $output .= ''; $output .= ''; $output .= ''; $output .= ''; $output .= ''; return $output; }