Category Archives: Webware

Audioscrobbler – how to put recent tracks on your blog/site

I use the RSS feed of my recent tracks combined with the free FeedDigest service to show the recent tracks I listened to with AudioScrobbler/last.fm. You can see it in the right-hand column – it’s titled “Recent Tunes”.

Feeddigest does all the work. Sign up for a free FeedDigest account and give it your RSS feed URL (mine is http://ws.audioscrobbler.com/rdf/history/brianpipa)

Use one of their templates or use a custom one – I use this as my template:

<li class="music">
<a href="%URL%">%DESCRIPTION,25%</a>
</li>

so for every entry, it creates it as an li element of class “music”. It will link to the last.fm page for that song, it will use the description as the text on the webpage, and it will cut it off at 25 characters.

Once you create it in feed digest, you click on the “get the code” link and you put the code in your sidebar. Since I am running WordPress, I use the PHP code like this:

<?php
include ("http://app.feeddigest.com/digest3/4J2AUPCK1S.html");
?>

but it also supports including it via Javascript.

(optional) To get the little speaker icon thingies, my stylesheet has a li.music entry in it to put the audio.gif in front of each entry. The stylesheet entry looks like this:

li.music { list-style-image:url(/images/audio.gif);
}

Do NOT use the image straight from my site. Put it on your own site. If you use it directly from my site, I could at any time switch the image to something you may not like.

One other nice feature about FeedDigest is that it caches the RSS. If you go for a while without playing songs it will still show the last data it had…you never get any empty lists on your site.

UPDATE: Just so you know, the most frequent you can set a free Feeddigest to update is every 30 minutes so you only get snapshots of what you are listening to – you don’t get a true running list. If anyone knows of a way to do what Feeddigest does (convert an RSS feed into an HTML list) that does it realtime (doesn’t just cehck it every 30 minutes) – please let me know. I bet there is a PHP script that can do this. An yes, there is a way to do this with an image by using the free service at DenNess and there are some “image-makers” you an run on your own machine too (PHP).


, , , , , ,

Google questions

  • Here is a cool Google MP3 search – just replace songtitle with the title of the song you are looking for.
  • Anyone know how to add a number in front of Google search results? Say I do a search and I find my site in the results, but it’s way down the first page – how can I tell what number the result is? Is there a Firefox plugin to do this? or a Google option?
  • I read some stuff on Google Bombing today. I’d heard of it before, but never knew the details. I think my Google bomb phrase will be “polycarbonated java” (I know, I know, that’s not exactly how a google bomb works).


, , , ,