I am using the mediafield_display module, but this question would apply if I wasn't.
I have a theme variable $zebracount that increments in my _phptemplate_variables() method in my theme (in Drupal 4.7 with the audio module this method would be phptemplate_audio_mp3_player() ). The theme that I have created styles nodes differently depending on a modulo number (aka my zebracount variable). The trouble is when the call is made to my function mythemename_mediafield_display_1pixelout() theme function, the template variable is no longer accessible.
I am trying to do something like:
/**
* Theme a 1pixelout audio file.
*/
function KimmyZen_mediafield_display_1pixelout($file, $item, $field) {
global $base_url;
//$options = array();
//$options['soundFile'] = check_url($base_url .'/'. $file['filepath']);
if ($zebracount == 1) {
$options = array(
'soundFile' => check_url($base_url .'/'. $file['filepath']),
'bg' => '0xFFFFCD',
'leftbg' => '0xb5bb7d',
'rightbg' => '0xb5bb7d',
'rightbghover' => '0xE5EFF5',
'lefticon' => '0xffffcd',
'righticon' => '0xffffcd',
'righticonhover' => '0xE99030',
'text' => '0x537e53',
'slider' => '0xb5bb7d',
'loader' => '0xfac46c',
'track' => '0xFFFFFF',
'border' => '0x537e53',
);
} else {
// different colors here
$options = array(