Unfortunately the documentation here is only for D5.x: http://drupal.org/node/34043

How must I modify this code to get it work with D7?

function phptemplate_audio_1pixelout_node_player($node, $options = array()) {
  $options = array_merge(array(
    'leftbg' => '0xFF0000',
    'rightbg' => '0x000000',
    'lefticon' => '0xFFFFFF',
    'righticon' => '0xFFFFFF',
  ));
  return theme_audio_1pixelout_node_player($node, $options);
}

Or where can I change the Button-Colors?

Comments

drupal a11y’s picture

Guess I found it in the .module in line 286:
function audiofield_wpaudioplayer($player_path, $audio_file) {
return '

';
}

But I would love to know what I had to do to change the colors in a "adaptivetheme_subtheme"?
What must I add and where?
There´s a "theme-settings.php" and a "template.php".

SORRY for this dull questions? I am not right into this stuff.

tepad.no’s picture

There is also a mistake in the audiofield.module file which causes the player to be opaque rather than transparent.

The line 292 is

<param name="transparent" value="wmode"/>

and shoud be:

<param name="wmode" value="transparent"/>

Good luck:).

Hari’s picture

This is for drupal 6 but my guess is that it is similar in D7 as well. There is a theme function called theme_audiofield_players_wpaudioplayer that can be copied to your template.php file.

This is the override that I used to set the colors back to the default colors.

function THEMENAME_audiofield_players_wpaudioplayer($player_path, $audio_file){

  return '<object id="audioplayer2" height="24" width="290" data="' . $player_path . '" type="application/x-shockwave-flash">
                          <param value="' . $player_path . '" name="movie"/>
                          <param value="playerID=2&amp;bg=0xe5e5e5&amp;leftbg=0xcccccc&amp;lefticon=0x333333&amp;rightbg=0xb4b4b4&amp;rightbghover=0x999999&amp;righticon=0x333333&amp;righticonhover=0xFFFFFF&amp;text=0x333333&amp;slider=0x357DCE&amp;track=0xFFFFFF&amp;border=0xcccccc&amp;loader=0x009900&amp;soundFile=' . $audio_file . '" name="FlashVars"/>
                          <param value="high" name="quality"/>
                          <param value="false" name="menu"/>
                          <param value="wmode" name="transparent"/>
                          </object>';
}

Replace THEMENAME with the name of your theme that you will be placing the override in.

P.S. Apologies for the ugly formatting, the function is copied directly out of the module.

tamerzg’s picture

Status: Active » Fixed

Fixed in dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

cooldeeponline’s picture

Title: Color-Theming in Drupal 7 for the WordPress Audio Player » Works --- Color-Theming in Drupal 7 for the WordPress Audio Player

yeah that works for me... thanks!!!