OpenCraft
Follow OC!
  • Home
  • About
  • Solutions
  • Portfolio
  • Clients
  • Blog
  • Contact

Coloring 1pixelout flash player in audio module

Mon, 2008-06-09 11:14
Tags:
  • coding
  • drupal
  • theming
By: 
Rita Faddoul

In order to theme the 1pixelout player in drupal, you need to paste the following code in the template.php file of the theme.

<?php
function phptemplate_audio_1pixelout_node_player($node, $options = array()) {
  $defaultoptions['leftbg'] = '0x000000';
  $defaultoptions['rightbg'] = '0x000000';
  $defaultoptions['lefticon'] = '0xFFFFFF';
  $defaultoptions['righticon'] = '0xFFFFFF';
  $options = array_merge($defaultoptions, $options);
  return theme_audio_1pixelout_node_player($node, $options);
}
?>

where the part between the [' '] is the part to be colored and the numbers after the 0x are the hex codes of the colors we're using.

For example, this is the function in my blog :

<?php
function phptemplate_audio_1pixelout_node_player($node, $options = array()) {
  $defaultoptions['bg'] = '0xecfdec';
  $defaultoptions['leftbg'] = '0xffb92b';
  $defaultoptions['rightbg'] = '0xd340bf';
  $defaultoptions['rightbghover'] = '0xc2e532';
  $defaultoptions['lefticon'] = '0xFFFFFF';
  $defaultoptions['righticon'] = '0xFFFFFF';
  $defaultoptions['righticonhover'] = '0xffb92b';
  $defaultoptions['loader'] = '0xc2e532';
  $defaultoptions['slider'] = '0xd340bf';
  $options = array_merge($defaultoptions, $options);
  return theme_audio_1pixelout_node_player($node, $options);
}
?>

This is how it looks like when it's quiet(not playing):

1pixelout audio

and when it's playing:

1pixelout audio playing

This is the page where I got it from and on the official webpage of the player you can find a list of more parameters to color in the player.

AttachmentSize
1pixelout-audio.png6.85 KB
1pixelout-audio-playing.png9.19 KB
  • rfaddoul's blog

Our work

Parks Egypt

The Egyptian Ministry of State...

PricewaterhouseCoopers

PricewaterhouseCoopers needed a dynamic Web portal to manage the...

View our complete portfolio

Related posts

  • Beware PHP $_REQUEST!
  • Run webinject (nagios plugin) for drupal projects
  • Apache MultiViews automatically appends file extensions
  • How to associate default users with projects in 'Case Tracker' module?
  • Enabling clean URLs for Drupal on a clean Ubuntu

OpenCraft

  • About
  • Team
  • Process
  • Community
  • Media Kit
  • Portfolio
  • Clients
  • Industries
    • Social economic development
    • Multimedia culture
  • Services
    • Drupal development
    • Information architecture
    • Open source software development
    • Social network engineering
  • Request quote
  • Contact
  • Search
Blog

Our profiles at:

Drupal Google
rss

Creative Commons License
search