How To: Theme the 1pixelout Flash Player - Part 2

There are times when you may want to theme the 1pixelout flash player differently on different parts of your site. Maybe you have a view and want the icons to look differently. Maybe you want to theme the flash player differently based on taxonomy. What ever the case, the 1pixelouts integration with drupal was designed to be themable. Let's take a look at how theme the player for these special cases.

Whether you are using the default function to do this theming or you are using the custom theming function we previously wrote about there won't be a difference. They work the same way.

The custom theming of the player needs to take place in either the template.php file or a .tpl.php file. In the case you are using views the Views Theme Wizard module, that is included with views, can help you create you template.php and .tpl.php functions and files.

Once you are inside your theming function or .tpl.php file the code for some custom theming looks something like:

<?php
$options
['leftbg'] = '0xFFFFFF';
$options['rightbg'] = '0xFFFFFF';
print
theme('audio_1pixelout_node_player', $node, $options);
?>

This sets the color of two of the 1pixelout flash player elements and then tells your function or .tpl.php file to display the audio player to the screen with the node it needs to get the audio information out of and the changed colors from the default ones.