I just have a question about theming Soundmanager 2 to produce a different style for the player. Can this be done with css and .tpl files, or do I have to wait for a newer version? If it can be done, what files do I need to edit?

CommentFileSizeAuthor
#4 player.png5.36 KBinfines
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

infines’s picture

Title: Hello » Theming Soundmanager2
andreas_jonsson’s picture

Component: Code » Documentation

Yes you can theme the SM2 players by overriding the .css files from the soundmanager2 library and .tpl.php files from the soundmanager2 module. You probably want to stick with editing the .css files and leave the .tpl files intact unless you know what you're doing, as the functionality of the different sm2 players requires a certain HTML structure to work properly.

The d7 version also provides theme hooks to change the soundmanager2 .js settings files to enable or disable things like "useWaveformData", "useEQData", "fillGraph".

Theming example: You're using the page-player and wants to change the time display to green (because hackers like green).
Copy the "sites/all/libraries/soundmanager2/demo/page-player/css/page-player.css" to your theme "sites/all/themes/YOURTHEME/page-player.css", add "stylesheets[all][] = page-player.css" to "YOURTHEME.info".
Open up the .css file in your editor of choice, go to line 213 to find the selector "ul.playlist li .timing", add "color: #0F0" and save.
Empty your cache. Done.

More information on the "Overriding style sheets from modules and base themes" documentation page: http://drupal.org/node/263967

Todo: a documentation page showing some basic theming information.

infines’s picture

What about removing the file name from the player itself? Is that in the template files or is that part of the SM library?

infines’s picture

FileSize
5.36 KB

This is the player I'm trying to make, I'm guessing I'll need to alter the page player template file or make a custom template, will this be fairly easy to do?

RaulMuroc’s picture

Issue summary: View changes

Would be nice to have an option to change the player color through a javascript menu (for ex.) so more focused to user experience than developer.

Should I open new feature issue?

And the same question like in #8.