On the bottom right of this website is a small list entitled "What I'm listening to". What it does is very simple, any time I listen to a track on my phone or PC then that track, artist, album and album cover is added to the list all linked up to listen to it on last.fm.
Read on if you want to know how to do this on your own site because it's very simple!
By the way, if you find a better way to do this or update the script to be better then comment below.
First, get yourself a last.fm account as that is what we'll be using to get the track from your place of listening to the web. Now install the software anywhere you listen to music so on your PC, phone, shoe, eye, what ever. There is a version for most things including Windows and Android.
Now get yourself an api key here
Now, to add it to Drupal:
{syntaxhighlighter brush: as3;fontsize: 100; first-line: 1; }<script type="text/javascript" src="/js/lastfm.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('div#lastfm').lastFM({ username: 'YOUR USERNAME', apikey: 'YOUR API KEY', number: 3, artSize: 'medium', noart: 'images/noartwork.gif', onComplete: function(){ //Done } }); }); </script> <div id="lastfm"> <dl> <dt class="lfm_art"> <a href="#"></a> </dt> <dd class="lfm_song"></dd> <dd class="lfm_artist"></dd> <dd class="lfm_album"></dd> </dl> </div> {/syntaxhighlighter}
Contact me here or catch me on one of
the social networks below
Try this on your mobile
You should be able to use this right from the screen
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
|
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
|
|
Copyright David Slack - Web developer
Comments
Andrea (not verified)
Thu, 08/03/2012 - 11:27
Permalink
Dave is it possible to create
Dave is it possible to create animated images using dreamweaver?I am not that much aware in that application.I hope you can give me some advice.
Dave
Thu, 08/03/2012 - 21:29
Permalink
Fireworks
Hi Andrea, Fireworks is the place you want to go for animated gifs. Unless you know Flash because you can output you Flash animations as animated Gifs. You could also look into animating SVGs or the new HTML5 canvas.
Let me know what you go with
I do websites, me
Anonymous (not verified)
Mon, 19/03/2012 - 04:41
Permalink
Skiny is good for you
I can say that minkyu is so cool. Thanks for the helpful post.
Add new comment