Who We Are
bmk
girlie
kristine
Search



Notify List
Let us keep you posted on new entries! Join the notify list!
Blog Status
14 entries
146 comments
12.06.04 11:44 am last update
last 50 referrers

Listed on BlogShares
Syndication
link to us!

virtual venus

virtual venus: MT Wiki
Powered By
because weblogs need love too
Sunday, February 1, 2004
Winamp Hoverable Playlist updated

This is a revised version of the tutorial to update and improve the original code.

Displaying the songs you are listening to in real time, along with detail about them, is a nice addition to your site. Using a combination of plugins can give many options for the display of info. My goal was to not only make a list of the songs I was listening to, but to display an album cover from the song upon hovering.

With this in mind, I started with the concept and Trackback URL format from A Whole Lotta Nothing. The idea is to use Trackback to transfer the info rather than FTP or another method. Because most of my songs on my system have ID3 tags on them, I added some additional info to be pulled in with the Trackback.

I had seen Brad's concept for an advanced Macro that used the Overlib script to change

<amazon keyword="album title">
into an amazon link with a hover. The Trackback URL contains the Current Song title, the Current Album Name, and the Current Artist. This combined with the IfEmpty plugin to determine if the Current Album and Artist info is available will either give text or the code for a hover with the album title and link to purchase it at Amazon.

Finally, some PHP gives a different message if WinAmp is stopped is added and the whole thing is included onto my sidebar. The details of how I've done this are below. Many modifications could be made to this to make it work the way YOU want it to!




Required:


Example from kadyellebee.com
winamp2.gif
When you hover the title of the song, the overlib popup displays, giving the album picture and a purchase link.

Directions:

  • Create a new blog or select one of your less traveled blogs. This will keep the rebuilds upon trackback down.
    • Create a new category. Entries won't be posted in the category, but trackback pings will come into it. I named mine Incoming, because that's a term I use through my sites when data is pulled into a template.
    • Edit the category attributes. Turn on Accept Incoming TrackBack pings.
    • Click Save, and more info will appear below.
    • Note the TrackBack URL for this category:
      http://your-site.com/mt/mt-tb.cgi/3779

      This will be what you use in the next steps.
    • Open Winamp, and use the menu to select Options > Preference and then go to Plugins and click on the General Purpose option.
      • Select the DoSomething plugin and click Configure. If DoSomething is not in the list, it means you probably haven't installed it into the correct directory. Double check the DoSomething documentation.
      • I have the following check boxes checked:
        • Enable Error Messages
        • Show Status Window
      • Now we are gonna create a new action.
        • From the Action drop down box, select "Submit A URL"
        • In the URL box, you'll put something like this (all on one line - breaks are only added for wrapping):
          http://your-site.com/mt/mt-tb.cgi?tb_id=3779
          &excerpt=%%URL_CURRENTSONG%%&url=blank
          &blog_name=%%URL_CURRENTALBUM%%
          %20%2D%20%%URL_CURRENTARTIST%%

          The italicized portion should be filed in with your Trackback URL you noted from before.
        • The URL Result File box can stay empty.
        • Click "Add -->" button on the right side.
        • Fill in a directory loction in the Temp Dir box. I use my music folder on my computer just to keep things all in one place.
        • Click the "OK" button.

        click to view the config screen
    • Now Winamp and DoSomething are set to send the info to MT. We'll set up a template to display the info.
      • Create a New Index Template named Incoming with an output file of incoming.php.
      • Paste the below code into the template:
      • I created a new Module named regex to store the amazon definition. Paste the following into it:
  • I use PHP to include this file into my Main Index template on my main blog. This will keep the list current without having to rebuild your index page itself.
    An example of a PHP include statement is as follows:
    <?
    include("/home/USER/public_html/BLOG/incoming.php");
    ?>
  • You'll also want to follow the Overlib instructions to put the script into your Main Index template on your main blog.
    this would include uploading the .js file and adding two lines of code to your template - the first in the <head> container, and the second inside the <body> :
    <script language="JavaScript" src="<$MTBlogURL$>/overlib.js"></script> <script type="text/javascript">
    <!--
    var ImgSrc = "<img src='";
    var AltEnd = "' align='left' border='0' hspace='5' /><br />Released: <b>";
    var EndPrice = "</b><br />Amazon Price: <b>";
    var PurchLink = "</b><br /><a href='";
    var PurchEnd = "'>Purchase</a>";
    // -->
    </script>

    <div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;">&nbsp;</div>
That should do it! You now have a fully functioning playlist that connects your music player to your website.

Special thanks to Lisa for helping troubleshoot the issues with the original code.


For debugging purposes, you can create a New Index Template with the instructions from the Wiki: Playlist Test template. Post a link here, and it will help us determine where the problem is.

Comments: 23

Thank you, so much. =)

by Lisa at 06:36 PM on 02.01.04

I have yet to get the Amazon or Overlib to work. All the code just does nothing. However, the pinging is working. Is it ok to leave url as blank and blog_name is just blog_name? I can't get the stupid ping removing to work either and I'm wondering if I'm pinging wrong?

by kim at 01:21 PM on 02.03.04

Kim, you should be able to use the URL inside of DoSomething as shown above, just replacing your trackback URL in there. Are you getting song titles to show up on your incoming page, or nothing?

You might create a test template to see where things aren't connecting, and post a link back here so I can check it out. The code I used in my test template is available on the Wiki. :)

by kristine at 07:15 PM on 02.03.04

The pings show up. I'm running into all sorts of problems though because the currentsongname includes my username and password for a stream i subscribe to/paid for. I was afraid I was sending a malformed ping or something though, since I can't remove them. I'm going to check out the Wiki and get back to you.

by kim at 08:52 PM on 02.03.04

Thanks for this great tutorial, but for the life of me I can't retrieve the album name. Do you get consistent results from the DoSomething plugin? I've played with the URL, e.g.: http://www.oliviertravers.com/cms/mt-tb.cgi?tb_id=xxx&excerpt=%%URL_CURRENTSONG%%&title=%%URL_CURRENTARTIST%%&blog_name=%%URL_CURRENTALBUM%%&url=blank

But all I can get in my pings is the artist name and song title. I've tried with several different tracks, all with correct ID3v1 and ID3v2 tags (I've checked with "View file info" in Winamp 5). Any suggestions appreciated, thanks.

Here's my test page, of course the Amazon integration won't work except if the song title happens to be the same as the album name:
http://www.oliviertravers.com/archives/test/index2.php

by Olivier Travers at 04:38 AM on 02.14.04

My page is building quite slowly since I've implemented this. It can take upwards of 3/4 minutes to rebuild. Do I need to rebuild incoming.php every time I post/rebuild?
Do you have any speedups you can recommend?

by freecia at 03:49 AM on 02.25.04

Freecia, there shouldn't be a overall slowness with this code - are you using a separate blog for the incoming pings like suggested? That will make it so that rebuilds only happen when pings come in, and then the PHP will pull THAT blog's page in. Does that help?

by kristine at 02:34 AM on 02.27.04

*sigh* - no matter what I do I can't seem to get Winamp to ping my category - I'm using the exact url you mention at the top within the DoSomething plugin, have configured everything as it should be... and the category IS set up to accept pings

But no pings :o(

oh - no temp file in the temp directory i set in the plugin either :(

by spyke at 01:20 PM on 02.29.04

ummm - i take that back - stoopid little syntax file on my part :o)

by spyke at 02:34 PM on 02.29.04

I am having trouble getting the Overlib and Amazon working...have read above comments! The include is working as you will see on the main page, but the test page: is not working. Can you help me please?
Thanks.

by Greg at 07:46 AM on 03.04.04

I am having trouble getting the Overlib and Amazon working...have read above comments! The include is working as you will see on the main page, but the test page: is not working. Can you help me please?
Thanks.

by Greg at 07:46 AM on 03.04.04

Sorry, seemed to be an error with the script, here is the test page: http://www.aboutthisboy.co.uk/blog/plugging/test.php

by Greg at 07:47 AM on 03.04.04

Hi.. I love this! I finally got it working, but only one thing remains - the song titles and band names aren't linked to Amazon.com; they are just plain text. What am I still doing wrong?? Thanks for any help that can be offered! 8-)

by jamieanne at 05:40 AM on 03.05.04

Oh! Nevermind... I was cruising the MT support forums and found out that in the configuration for the DoSomething Winamp plugin, I needed to have the Enable ID3 Info Gathering checkbox checked.

by jamieanne at 05:21 PM on 03.05.04

ooo you know what... i never thot of that. i haven't been able to get those other plugins working with DoSomething either. i shall try that. thanks!

by kim at 05:24 PM on 03.05.04

I'm still having problems, can anyone help me out?
Thanks.

by Greg at 03:52 PM on 03.08.04

Sorry, forgot the link: here
Greg

(comment edited by girlie)

by Greg at 03:52 PM on 03.08.04

If you are using iTunes instead, my Now Playing plug-in allows you to use these scripts with iTunes.

http://brandon.fuller.name/archives/hacks/nowplaying/

by Brandon Fuller at 01:14 PM on 03.30.04

Hmm, I appear to be having a problem getting the pings from Winamp to MT. I've followed the guide exactly over at http://tripleb.co.uk, set up my incoming at http://tripleb.co.uk/incoming.php, and a test at http://tripleb.co.uk/testing.php

My head's all swiss cheesed now :)

by Mike at 11:20 AM on 04.04.04

Like many before me, I cannot seem to get Winamp to successfully ping my site; when I play a song, the "Submitting URL" box pops up, but my "Now Playing" category shows no trackbacks. I'm 99% positive I have everything set up correctly...I can't figure out what's wrong. Any ideas?

by J.Cormier at 09:45 PM on 04.29.04

I'm having the same problem as above. It won't send the ping to the blog and I just get an error. I can't figure out exactly what I'm doing wrong here.. =(

by Trish at 11:10 AM on 05.10.04

I'm having the same problem. I'm showing the pings being sent, but the page itself won't load any of the information.

Here's the URL:

by Dave at 08:19 PM on 07.21.04

Argh...it didn't take. Let's try that again:

http://www.redbearonline.com/winamptest.php

by Dave at 08:22 PM on 07.21.04
Comments are closed on this entry
More Entries

Copyright © Virtual Venus