JoeTech.com


IZEA Ranks Badge
Get one at:
JoeTech.com
### Contact | About Joe Tech | Advertise | Get Reviewed | Disclosure | Tools  

White Label the Deli.cio.us MP3 Player in Just 4 Easy Steps

Posted in Just Cool, web by Joe Tech on the January 30th, 2008

Suppose you want to not just link to MP3 files on your site, but you want to also show a tiny flash player next to the link. I needed to do just that, so I modified some code for a brilliant little player called “playtagger” that Deli.cio.us came up with a while back. I love their player, but they have some stuff in it that I didn’t want, so I made a few easy changes and I’ll show you how you can, too.

Here’s what theirs looks like (enlarged and with the parts we don’t want crossed out):
playtagger.jpg

Here’s my version:
Station ID
Note: Firefox doesn’t want you to hear flash audio that is in a hidden container. Anyone know a way around that?

You want to do the same thing? Just follow the steps below. It’s not as complicated as it looks.

1. Copy the files
Just right-click and “Save As” for both of these files:
http://images.del.icio.us/static/js/playtagger.js
http://images.del.icio.us/static/swf/playtagger.swf

If you don’t want to use your own Play and Stop images, grab the default ones:
http://images.del.icio.us/static/img/mp3/play.gif
http://images.del.icio.us/static/img/mp3/stop.gif

2. Modify the javascript
This is really easier than you would think. Just open up the playtagger.js file in your favorite editor and make the following changes:
- Search for “http://images.del.icio.us/static/img/mp3/play.gif” and replace it with the url to the Play image you want to use.
- Search for “http://images.del.icio.us/static/img/mp3/play.gif” and replace it with the url to the Stop image you want to use.
- Search for “http://images.del.icio.us/static/swf/playtagger.swf” and replace it with the path to where you saved the flash file. (do this in 2 places)
- Search for “img.parentNode.insertBefore(Delicious.Mp3.player, img.nextSibling)” and ADD, on the next line, “Delicious.Mp3.player.style.display=”none”;
- Search for “100” and replace with “1

3. Upload all the files to your web directory
You should already know how to do this.

4. Add the code to your header
Now just call the playtagger in your page like this: <script type=”text/javascript” src=”playtagger.js”></script>

Bonus: Be choosey
If you want to pick and choose which mp3 links get a player, just search for the following line:
if(o.href.match(/\.mp3$/i)){
and change it to:
if((o.href.match(/\.mp3$/i)) && (o.label==’mp3player’)){

Then just add label=”mp3player” to any mp3 link that you would like to have a player next to it.

If you can think of any other ways to improve upon this, add them in the comments.

No related posts.

If you liked this Joe Tech article, subscribe to the RSS feed for daily updates.

Submit this story to: [ del.icio.us] [ Stumble it!] [Share]

4 Responses to 'White Label the Deli.cio.us MP3 Player in Just 4 Easy Steps'

Subscribe to comments with RSS or TrackBack to 'White Label the Deli.cio.us MP3 Player in Just 4 Easy Steps'.

  1. Mp3 Player said,

    on February 4th, 2008 at 3:23 pm

    [...] White Label the Deli.cio.us MP3 Player in Just 4 Easy Steps [...]


  2. on March 2nd, 2008 at 2:31 am

    [...] White Label the Deli.cio.us MP3 Player in Just 4 Easy Steps [...]

  3. joel said,

    on February 24th, 2009 at 10:13 pm

    this hack works like a champ. how i detest javascript, but this was a snap. thanks!

  4. Chery said,

    on April 16th, 2010 at 10:22 pm

    How do I transfer songs on my mp3 player on the computer without charging my mp3 player? I want to do that so I don’t drain the batter life by charging the mp3 player when it still has power.
    Chery´s last blog ..wifi phones My ComLuv Profile


Leave a Reply

CommentLuv Enabled

Sponsor



Archives


Events

Check back soon

Sponsors

Dedicated server hosting by Codero

FREE SSL

  • Cheapest e cigarettes
  • Advertise Here

Friends


Top Commenters

 
Popular Posts
 • Nine Inch Nails - Music 2.0
 • How to Protect Your Private Inf...
 • VentureOne 100mph Hybrid Looks Good
 • How To Replace A Dell Inspiron Laptop Heat Sink And Fan Assembly
 • 76 Web Ranked Candidates For President
 
 
Copyright © 2010

Joe Colburn