Last.fm recent tracks Wordpress plugin

13409
I hacked together a simple Wordpress plugin for Last.fm which uses the webservice feed to display the recently played tracks on your weblog. It’s based on the del.icio.us Wordpress plugin and uses a similar layout, the same caching mechanism (to a file in /tmp) and CURL to retrieve the feed.

You can download the plugin here: lastfm.zip

To install simply unzip and copy the lastfm.php file to your /wp-content/plugins/ directory. Turn it on in your administration panel. And finally call the recent_tracks(<username>) function with your username from somewhere in your template. i.e:


<li><h2><a href="http://www.last.fm/user/tizzle/">last.fm/user/tizzle</a></h2>
<ul>
<?php recent_tracks('tizzle'); ?>
</ul>
</li>

Make sure your webhost has installed the CURL library for PHP though otherwise this plugin won’t work.
If not you could opt to use this modified version of my plugin which uses fopen instead.

Version history:

  • 0.5 (16-05-2007) - small fix to account for changes in Lastfm XML format (Thanks Anthony!)
  • 0.4 (09-03-2006) - changed caching behaviour and using XML instead of RSS feed
  • 0.3 (01-11-2005) - moved UL tag generation into plugin
  • 0.2 (01-11-2005) - fixed a caching problem
  • 0.1 (01-11-2005) - initial release

123 Responses to “Last.fm recent tracks Wordpress plugin”

  1. Anonymous Says:

    Brilliant stuff. However I’m getting problems like this in my sidebar:
    Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 648 is not allowed to access /tmp owned by uid 0 in /home/virtual/site480/fst/var/www/html/wp-content/plugins/lastfm.php on line 83

    Warning: fopen(/tmp/last.fm.demwunz.600.cache.tmp): failed to open stream: No such file or directory in /home/virtual/site480/fst/var/www/html/wp-content/plugins/lastfm.php on line 83

    Think you could help? Cheers buddy.

  2. Anonymous Says:

    Tijs;
    Ik krijg een error als ik hem wil “activaten”:
    Warning: Cannot modify header information - headers already sent by (output started at /home/brrt/www/blog/wp-content/plugins/lastfm.php:151) in /home/brrt/www/blog/wp-admin/admin.php on line 10

    Warning: Cannot modify header information - headers already sent by (output started at /home/brrt/www/blog/wp-content/plugins/lastfm.php:151) in /home/brrt/www/blog/wp-admin/admin.php on line 11

    Warning: Cannot modify header information - headers already sent by (output started at /home/brrt/www/blog/wp-content/plugins/lastfm.php:151) in /home/brrt/www/blog/wp-admin/admin.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /home/brrt/www/blog/wp-content/plugins/lastfm.php:151) in /home/brrt/www/blog/wp-admin/admin.php on line 13

    gr,
    Bart

  3. Anonymous Says:

    Warning: Cannot modify header information - headers already sent by (output started at /home/vortsekz/public_html/wp-content/plugins/lastfm.php:155) in /home/vortsekz/public_html/wp-admin/admin.php on line 10

    Warning: Cannot modify header information - headers already sent by (output started at /home/vortsekz/public_html/wp-content/plugins/lastfm.php:155) in /home/vortsekz/public_html/wp-admin/admin.php on line 11

    Warning: Cannot modify header information - headers already sent by (output started at /home/vortsekz/public_html/wp-content/plugins/lastfm.php:155) in /home/vortsekz/public_html/wp-admin/admin.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /home/vortsekz/public_html/wp-content/plugins/lastfm.php:155) in /home/vortsekz/public_html/wp-admin/admin.php on line 13

    As you can tel I know shit all about PHP so I got no idea what that means ;)

  4. tijs Says:

    The “cannot modify header information” errors are caused by whitespace either before or after the opening: tags. Make sure there are no spaces, line breaks, tabs or anything outside of the php tags and it should work. I guess i better offer a zipped download to make sure the code is copy and pasted correctly.

  5. tijs Says:

    The “safe mode restriction in effect” error is due to the fact that the plugin tries to write it’s cache file to the servers temporary files directory. On most servers a php script is allowed to do this and you won’t get this error, on some servers you might. To solve this call the recent_tracks() function with the additional parameters for the cache file where the cache file could be an absolute path to a file in /wp-content or any other directory that php can write to.

    i.e: recent_tracks( ‘username’, false, 600, ‘/domains/mydomain/wp-content/lastfm.cache’ );

  6. Matt Brett Says:

    This is rad. Very nice work!

    I could really use a Weekly Artist Chart list on my site - any chance you could do another version of this plugin with some of the various other feeds provided?

  7. Jeff Says:

    Yeah, I was looking for a weekly artist chart as well. I’ve looked at all the audioscrobbler plugins and couldn’t find that functionality. I work as a software developer but unfortunatlely have never programed in PHP before. Maybe I’ll try to give it a shot considering all the logic should be the same … just a different XML feed.

  8. tijs Says:

    It is indeed just a different XML feed. Copy paste and changing the node names that you need should do it. When i have the time to work on the plugin a bit more the stuff on the todo list has priority.

  9. EdLucas.com » First Post Says:

    […] last.fm recent tracks - until I can write some code to cache my tracks in MySQL and display them grouped into albums […]

  10. Ashex Says:

    Awesome plug-in! Works perfectly for me!

    A Note to anyone who’s using a linux server, for some reason it’s still case-sensitive (maybe last.fm user a linux server?), so make sure you capitalize your username if it has capitals.

    I had to do this, it kept saying no recent tracks until I capitalized my username, then it displayed it!

  11. breskeby Says:

    great plugin, thats what i searched for

  12. woozleBlog » last.fm Feed Says:

    […] Endlich läuft dieses nette last.fm-Plugin auch auf meinem Blog. […]

  13. mfd Says:

    The following gives me division by zero errors:

    Recently Played Music:

  14. tijs Says:

    you linked to a last.fm profile. I take it something is wrong with my plugin on your site? please link to your site instead so i can check what the error is exactly…

  15. mfd Says:

    Oops!

    While fixing my post I figured out the problem. Nice plugin!

  16. tijs Says:

    So what site are your using it on…? just curious.

  17. NrHate Says:

    Hi tijs.

    Can you tell me what might be wrong with my “curl”?
    I’m getting this from your plugin:

    Fatal error: Call to undefined function: curl_init() in /home/ignium/public_html/wp/wp-content/plugins/lastfm.php on line 74

    My php was instaled from the repository (i’m using debian), and I also installed libcurl3 and php4-curl… Is a php compilation with the curl option really necessary?

    BTW, great plugin ;)

  18. tijs Says:

    It does seem that the curl functions are only available in PHP when it is compiled with the curl option. I guess curl is not as widespread an option as i thought it was since more people seem to have this particluar problem. It’s something to keep in mind when i ever write another plugin that accesses a webservice.

  19. Serge Norguard Says:

    hi there, i found your plugin quite easy to implement. is there anyway to make it show only 1 song that was played ? as it’s currently showing 10 songs that was played previously.

  20. tijs Says:

    I’m afraid there is no simple option to set the number of songs returned. It returns 10 because the result from lastfm returns 10 songs. You could alter the code to only show the first song that lastfm returns but you’ll have to manually edit the code that transforms the data from lastfm into the list to show on your blog.

  21. Benn Says:

    I’m getting a 404 error. Any ideas why this might happen?

  22. Benn Says:

    Sorry should say ‘No recent tracks - 404 error’

  23. tijs Says:

    Weird… did you modify the code at all? A 404 would signify a page not found as in the page on last.fm containing your recent tracks. I haven’t seen this error before though.

  24. Benn Says:

    Hmm… I’ll give it another shot and see how it goes.

  25. Benn Says:

    OK.. here’s the include for the sidebar:

    I’M LISTENING TO

    I’ve left in there at www.royaltech.net/blog so you could see it.

    Didn’t alter the lastfm.php code at all.

  26. Benn Says:

    Ahh of course it converts the PHP. Anyway, it was the same code.

  27. jon kantro Says:

    Heh i also am getting a 404 error.

  28. Jacob Bolvig Says:

    I got the same 404 error. I haven’t changed anything in the code. Ive only implemented the recent track thing with my username in the sidebar as you described.

    My homepage: www.wisser.dk
    My last.fm profile: www.last.fm/user/jacobwb

    Whats going on :(?

  29. tijs Says:

    looking into it right now…

  30. tijs Says:

    I can only reproduce this error by calling the recent_tracks function with a user name that does not exist. So please double check if you called the function correctly. For you jacob it should be:

    recent_tracks(’jacobwb’);

    I tried it on my own blog just now and it worked fine. If it still doesn’t work after that please reply again.

  31. Jacob Bolvig Says:

    Et very very odd. Still doesnt work.

    www.wisser.dk/php.jpg

  32. tijs Says:

    Please download the following php script, unpack it and upload it to your webserver.

    http://blog.tijs.org/wp-content/files/curltest.php.zip

    After uploading open in it in your browser…

    i.e.: http://www.yourwebsite.com/curltest.php

    …and it will check if the audioscrobbler site is accessible from your webserver with cURL. It should either return “successfully contacted website” or an error message. Good luck!

  33. Jacob Bolvig Says:

    succesfully contacted websit. But still 404 :|
    Cant see wtf im doing wrong. Im not suppose to change anything in the lastfm php file right?

  34. Jacob Bolvig Says:

    btw im using wordpress v2, but that shouldnt have any effect should it?

  35. Jacob Bolvig Says:

    Aaaand, im not using it in index.php but sidebar.php. But that shouldnt have anything to do with it either, or what?

    .. sorry for the comment spam ;D

  36. tijs Says:

    - you don’t have to change anything in lastfm.php
    - it does not matter where you include it
    - wp 2.0; could be it. since this seems to be a recent problem and i haven’t tested my plugins in WP 2.0 yet i am guessing that this is indeed the trouble.

    From what i’ve read WP 2.0 has several issues so i am not installing it yet. I hear they have made an halfbaked attempt to make WP web 2.0 and buggered up lots of the interface while doing this. I am waiting with upgrading until i think it’s ready for daily use and i will not upgrade my plugins before then either. Sorry about that…

  37. Jacob Bolvig Says:

    Its okay. Guess ill return as soon as Wordpress gets a new version on the streets in hope of seeing your plugins updated :-)

  38. Benn Says:

    Nope.. still wordpress 1.5 here.

  39. tijs Says:

    really Ben? -damn- did you try the curltest.php file?

  40. Tim Says:

    Same issue as the others using WorldPress 1.5.2. I tried curltest.php and it “successfully contacted website.”

    Blog is here: http://www.loughprices.com/ http://loughprices.com/curltest.php

    Also didn’t change aything in lastfm.php, I just added it to the template.

  41. tijs Says:

    ok, i just tested it on another blog of mine and altough the plugin works if you directly copy&paste the template code example from this post it won’t work (and you get the 404) because the apostrophe’s are not correctly formatted. I missed the fact that Wordpress had formatted these incorrectly but i have changed the code example so that it now uses the correct formatting for the recent_tracks() function call.

    Please check your template and make sure that it uses the apostrophe instead of either right or left quotation marks. Let’s cross our fingers that this is the problem ;)

  42. Tim Says:

    That is the problem and it is fixed! I changed the code to use apostrophes and it works perfectly.

  43. fixfamily » Blog Archive » Song listings Says:

    […] While waiting for the kernel to compile (for the diskless client which is supposed to become the MythTV frontend for my home theatre installation), I added a plug-in for this site that lists the songs I’m listening to right now (or almost). At home, I’m using amaroK which is a very nice media player for Linux (with support for CD covers and lyrics), and at work it’s Winamp. Both can be configured to send song data to last.fm which can then be retrieved by other little utilities just like this plug-in to be integrated into websites and such. It’s not perfect though (I’d like more info like when the song was played, to be able to configure the number of songs to be displayed, to have it display else where), but for the moment it’s quite OK. […]

  44. Benn Says:

    Looks like I’m sorted with the apostrophe fix too!

  45. Benn Says:

    Well.. almost.

    I now get:
    No recent tracks (error 200)

  46. Benn Says:

    Ooops.. posted too quick.

    http://www.last.fm/user/royal618/
    …and there’s recent tracks being played.

  47. Benn Says:

    Nope.. now it works. Nice stuff! :)

  48. Josh Says:

    It isn’t showing any recently played tracks. With the sigs it will use anything within like 6 hours, now it is nothing. Is there anyway to make it played my last played tracks?

  49. J3rn log » Blog Archive » links for 2006-01-21 Says:

    […] tijs.org » Blog Archive » Last.fm recent tracks Wordpress plugin a simple Wordpress plugin for Last.fm which uses the webservice feed to display the recently played tracks on your weblog. (tags: Wordpress plugin Last.fm) […]

  50. randys.org » Recent Noise Says:

    […] The other half of getting the recent tracklist is a WordPress plugin;last.fm recent tracks. It’s a fairly simple PHP script that parses the RSS feed coming from my last.fm account. […]

  51. oldlovas Says:

    hey, thanx for helpful plugins and i wanna know
    how can i display only 5 songs on my site.

    cool.

  52. henrik Says:

    Thanx mate!

    Finally a script which is easy to configure and lets me display both of my lastfm-accounts at the same time without having to hack the .php file.

    (I guess it’s got something to do with me moving the site to a hotel with curl-support, but anywayz…)

    Super!

  53. Days of Speed Says:

    I get this displayed in page…

    Fatal error: Call to undefined function: recent_tracks() in /home/daysofspeed/htdocs/wp-content/themes/default/sidebar.php on line 73

    Any ideas people?

  54. Days of Speed Says:

    OK - solved that - hadn’t switched the plug-in on! Now I have the “No recent tracks (error 200)”…

  55. Days of Speed Says:

    Sorry to keep coming back and answering myself… solved - created a new profile at LastFM - all working! Thanks for the files etc.

  56. Days of Speed » Blog Archive » Brushed Says:

    […] Well, the first tweak of this here Word Press affair took place today. Following some grand assistance from tijs.org a LastFM plug-in has been added to my sidebar. […]

  57. Days of Speed Says:

    Just a quicky… when I haven’t _just_ listened to a track I get “No recent tracks (error 200)” - anyway around that? Either by changing the ‘error’ message (as it looks bust as it is) or anyway it can hold the last tracks until replaced? Cheers!

  58. tijs Says:

    Your quite right, the plugin does not currenlty cache the results so it is dependent on how long last.fm saves the last played list. A 200 ‘error’ means that the new data was received ok so it should not trigger an error but this seems not be implemented correctly yet. Maybe i’ll make an update later this week.

  59. Days of Speed Says:

    That would be both neat and very much appreciated. Thanks for the work so far.

  60. tijs.org » Blog Archive » Last.fm Recent Tracks plugin - version 0.4 Says:

    […] I just updated my Last.fm plugin. Get the latest version here: Last.fm Recent Tracks Wordpress plugin […]

  61. SNAFU » Kernel Panic, or better Kernel Shiver Says:

    […] I’m proudly to present a new feature: My recent last.fm tracks, which you can find in the sidebar to your left. (Talked about here - thanks to tijs). […]

  62. Wan Zafran Says:

    Hi! I’ve been looking for a plugin like this and am glad to have stumbled upon yours. I have implemented it in the profile section of my site. Your plugin’s quite customizable too, and can easily retrieve other last.fm feeds as well. Thanks for writing this plugin!

  63. modde Says:

    Thanx for an excellent plugin to view multiple-user last.fm accounts.

    Brilliant!

  64. james Says:

    Works fine here - but I don have one question. Is there an easy way to remove the indentation? Ive lookd at the PHP file and cant work out where this is set. Basically I want the so nges justified left with the title, like the other sidebar menus on my blog

  65. Blyght Says:

    This is a good plug-in; it plays nice with all the other plug-ins on my site, and I am loving it! Thanks for sharing it with us.

  66. tijs Says:

    james: take a look at the structure of the other menus on your blog. They probably use a structure with UL and LI tags too but use CSS to style the list differently. It may just be a maytter of adding a diiferent class name to the UL tag that surrounds the list of songs.

  67. Refluxology Says:

    Hi there - I’m on WP2 and the curltest.php works, but “No recent tracks (error 200)” is all the plugin can produce. The XML file http://ws.audioscrobbler.com/1.0/user/iantheimpaler/recenttracks.xml defintely exists and has songs in it. I’ve used in my page. Any ideas what’s wrong?

  68. Refluxology Says:

    Sorry, I copied the php line in where it says “I’ve used in my page” but it ate it :)

  69. Random Says:

    Thanks man. It works perfectly for me. Saved me a little bit of time, as I was about to create exactly this.

  70. Matthew Says:

    how do i go about customising this to retieve other feeds. specifically the weeklyartistchart feed. thanks.

  71. tijs Says:

    Matthew:

    1) you should point to the correct xml feed here:
    http://www.audioscrobbler.net/data/webservices/

    2) and then make sure the starttag and endtag functions that handle the xml parsing are changed to handle the new xml format. It may seem daunting at first but it really isn’t that hard.

  72. Matthew Says:

    crikey it’s tough, i’m really not a programmer. oh well :(

  73. Random Says:

    Worked perfectly for me, but just recently stopped updating tracks. I deleted the temp file, and now it just says no recent tracks. I even checked the rss file manually, and its still updating. Anyone else’s break recently too? Or maybe I’m just unlucky…

  74. arnebrasseur.net » How I discovered Last.fm Says:

    […] Personally I’m also very interested in the web-services they offer, that way it’s possible to show your favorite/most recent tracks on your blog, for instance. I was trying a wordpress plugin earlier on, but somehow the PHP installation on this server didn’t allow writing to disk, so I couldn’t cache. I disabled the caching, and it worked, and then it didn’t. It says on their site that if you make more than one request per second your IP will be banned. Possibly I just had a visitor while I was testing and they kicked me off. I’ll try again later. There are also AJAX based plugins, that way the user visiting makes the call. I’ll look into later. […]

  75. tijs Says:

    random: it still seems to work fine on this blog… did the read/write rights to the temp file change perhaps?

  76. Barry Says:

    Now using this on my site. Nice one.

  77. David Hildreth Says:

    i got it installed and working, but while it displays just fine in IE
    the track names are all jumbled in FF

    little help?

  78. Fat Vegan Says:

    Last.fm Wordpress Plugin (without CURL)…

    This is a complete ripoff of tijs’s plugin, but I’ve replaced the CURL library with the fopen URL wrapper. So it should work with pretty much any PHP install. Of course, it is now marginally less good.
    lastfm.zip
    Now I’m really going …

  79. leevin Says:

    Hi,
    I just signed up for lastfm, installed the plugin but get “No Recent Tracks error 200″ in my sidebar. When I use “tizzle” instead of my user name, it just says “No Recent Tracks.” Am I doing something wrong? Thanks.

  80. tijs Says:

    @leevin: no that does not mean anything is wrong. you get the no recent tracks when you use my username since i don’t have any recent tracks. The tracks you are seeing on my blog homepage were cached from a few days back. Try it with a username that has recent tracks on his or her profile on last.fm and see if you still get the error message.

  81. Kestrel Says:

    I love this plugin it works perfectly - thanks!

    I just have one question: Is there any way to reduce the number of songs displayed? To perhaps, 6 instead of 10, for instance?

  82. The Walrus » Recent tracks Says:

    […] Il blocco sulla sidebar con le recent tracks in un marquee verticale, secondo me molto bello, l’ho ottenuto combinando questo plugin e questo script da DynamicDrive. […]

  83. Decisions, decisions… at Archie Binnie’s Blog Says:

    […] last.fm recent tracks Wordpress plugin Displays recently played tracks. […]

  84. Le blog d’Anthony Dahanne » Blog Archive » Mise en place du blog Says:

    […] L’installation de Wordpress fût facile, mais le plus difficile commence : trouver les bons plugins, les faire fonctionner, etc… Le site de référence pour les plugins wordpress est Wp-Plugins, incontestablement ! J’ai choisi - pour le multilinguisme Polyglot. - pour l’interface last.fm last.fm recent tracks (bon c’est pas très poussé, mais çà fonctionne !) […]

  85. lil wyte Says:

    Hello!

    I installed Wordpress on my server, and set up a site. It’s a relly nice piece of software. However, I am missing a piece of functionality, and

    couldn’t find a suitable answer for it. Mayou you know a plugin I could use?I need to automatically inserts ads in my posts.And not AdSense ads, but rather HTML snippets defined by me (affiliate links, etc). Let’s say I would insert a tag in my post:
    – ad here –
    and the plugin would automatically replace it with some HTML code, when the post is displayed on my site.I really don’t need any fancy configuration options etc, just the basic replace functionality.
    Do you know a plugin that can handle this?

  86. tijs Says:

    @lil: you should check out the plugin directory: http://dev.wp-plugins.org/wiki/PluginDirectory

    there’s bound to be something in there that would suit you.

  87. mediaFetish Says:

    Thanks for writing this - I’ve been looking for a way to do this. Awesome. I hope you don’t mind I’m modifying the plug-in to suit my needs (a bit).

  88. theboywonder.co.uk » Last.fm weekly artists wordpress plugin Says:

    […] Firstly, complete credit to tijs for the original plugin, allowing you to display your recent tracks on your wordpress blog. I wanted a weekly artists option, rather than recent tracks, and noticed some other people were after the same, so I just changed a few bits and hey presto :) […]

  89. Robin Says:

    Replaced a few bits and bobs and managed to convert this lovely script into a weekly artists version. Full credit to tijs though - many thanks!
    http://theboywonder.co.uk/2006/08/08/last-fm-weekly-artists-wordpress-plugin/

  90. Ahmed Osman Says:

    I seem to be having a little trouble with the plugin. It’s been working great for the past 8 months, and suddenly in the past week this error popped up:

    Warning: fopen(/tmp/last.fm.Ashex.600.cache.tmp) [function.fopen]: failed to open stream: Permission denied in /home/napataor/public_html/chipnick/wp-content/plugins/lastfm.php on line 106

    I’ve tried deleting the file but i lack removal permissions in /tmp, so I was wondering if you knew what the cause may be.

  91. tijs Says:

    @ashmed: the error means that you can’t write to your tmp file anymore. this probably means that the settings of your configuration changed in some way, i would ask your hosting company if they can help you out.

  92. Geek Talk » Blog Archive » Last.fm Says:

    […] Well if that should ever become a problem, I hooked up my audio player of choice to last.fm, which in addition to in theory telling me what music I like based on music I like, will also let me display the last tracks I listened to using this lovely wordpress plugin. It also allows people to take one step closer to becoming a single white female type stalker. […]

  93. 0dot Says:

    thanks

  94. Hello world! op ekok.nl Says:

    […] Welkom op de nieuwe website. We zijn weer online met een nieuwe, verse server, in een nieuw jasje (Wordpress, K2, Gallery2, WPG2, Page Links To, Ultimate Slideshow, Time Since, Latest Comments, wp-lightbox2, Search Everything, WP-SlimStat, Last.fm recent, Subscripe to comments). […]

  95. Liza Marie Says:

    Fantastic! Thank you for this excellent plugin.

  96. NimBlog » Blog Archive » Last.fm Says:

    […] Listauduin vastikään last.fm:ään ja lisäsin sidebariin plugarin, joka listaa sivulle viimeksi winampissa soineet biisit. Olen pitkään yrittänyt vastustaa last.fm:n vetovoimaa, mutta nyt viimein wordpress-plugari käänsi pääni ja olen ylpeä (ja koko ajan ylpistyvä) jäsen. Harmi vain, että last.fm ei tue ja tuskin koskaan tuleekaan tukemaan mukavaa suomalaista playeria, Apolloa. […]

  97. helle Says:

    hi there
    Fat Vegan´s page is down so i cant download the plugin- could you (or someone else) please make a mirror for the fopen version

    thx a lot

  98. hanindyo Says:

    here’s a link on how to create custom block in Hemingway

    http://discuss.warpspire.com/viewtopic.php?pid=595#p595

  99. Benoit Says:

    Nice plugin, makes me happy ! … ;-)

  100. Leandro Ardissone Says:

    Thanks… I’ve modified this to get the latest loved songs.

  101. iSynth Says:

    hello tijs! very useful plugin, but can you work it out as it can feed the weekly top artists instead?
    would be much appreciated!

    thanx a ton!

  102. iSynth Says:

    all the things i found is to change line
    $api_url = “http://ws.audioscrobbler.com/1.0/user/$_last_user/recenttracks.xml”;

    to

    $api_url = “http://ws.audioscrobbler.com/1.0/user/$_last_user/weeklyartistchart.xml”;

    maybe there are other changes to be made?

  103. tijs Says:

    Unless the tags are formatted in exactly the same way you will have to change the end and start tag parser too. It’s a DIY kinda plugin though so you will have to figure it out for yourself.

  104. iSynth Says:

    hello tijs! since i’m not really into php, i think this will rather be a prob for me to get it changed the proper way! maybe you will do it yerself later cuz i saw many people ask for that :)

    just on the side note, how to disable hyperreference from the track in this plugin? or make them open in the “target=blank” way?

    tia!

  105. Think Small » Tech stuff Says:

    […] I was in a geeky mood this morning (am I never not?) and I finally decided to use the Last.fm plugin to put my most recently played tracks in the sidebar. It’s faster than what I had written myself, although that was more web 2.0 so probably a bit cooler. Whatever. I had to modify the plugin a bit and then I decided to use the code to write my own plugin that puts ‘posts I like’ (or something) from Google Reader in the sidebar. I intend to improve the plugin a lot, to make it a lot more customisable for example, and then I’ll add it to the plugin-list. […]

  106. Dieter Provoost » Blog Archive » Last.fm plugin Says:

    […] Op Tijs.org vond ik een Last.fm-plugin voor het Wordpress-platform. Als fervent muziekliefhebber en fan van Web 2.0 een leuke aanvulling op deze website. Ik bracht enkele minieme aanpassingen aan het script aan zodat het mijn wensen volledig vervuld […]

  107. thegistofit / before my morning coffee /… Says:

    […] During the course of my attempts at finding a solution, I found last.fm and set up an account. The music links that are currently in the sidebar come from  “scrobbling” my recently played song to that site, then using a WordPress plugin (from here). It seems to work, but I don’t like keeping another app running continually on my laptop, and it seems a bit convoluted. […]

  108. WR276 Says:

    Hi there

    Using recent_tracks(’wr276′); I obtain the “No recent tracks (error 200)” error like other guys. Could you tell me why is that.

    Thanks in advance.

  109. Glass Panes That Separate » scrobble scrobble Says:

    […] One more geeky feature for my website. Look to the right and see the beautiful ‘Now Playing’ section. Courtesy of tijs via last.fm, audioscrobbler.net, and rhythmbox. […]

  110. Scubarda.net » Nuovo veste grafica del blog Says:

    […] Last.fm recent tracks per la visualizzione delle ultime traccie ascoltate con Exaile e sul mio iPod […]

  111. Levi Says:

    Nice plugin! Thanks for the great work!

  112. Brendan McKenna Says:

    Grat Plugin, Thanks.

  113. My WordPress plugins | rich text Says:

    […] last.fm Recent Tracks: Shows my latest tracks on last.fm. This is fed from our Squeezebox mp3 player, so it also shows what Candice is listening to when I’m not home. I’m really not as big a Christina Aguilera fan as that might indicate. […]

  114. M Says:

    Hi! I’m getting errors like this in my sidebar,

    Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid is 33 is not allowed to access /tmp owned by uid 0 in /www/10/kuvaoume.net/wp-content/plugins/lastfm.php on line 111

    Warning: fopen(/tmp/last.fm.emeoume.600.cache.tmp) [function.fopen]: failed to open stream: No such file or directory in /www/10/kuvaoume.net/wp-content/plugins/lastfm.php on line 111
    * No recent tracks (error 200)

    Thanx pal!

  115. tijs Says:

    It’s trying to write the cache to the /tmp dir but your host does not allow it. You could create a directory yourself and give it enough write rights. Then change the part of the plugin where it says /tmp into the path to the directory you just made.

    good luck.

  116. M Says:

    Thanks alot. It`s work now. keep up the good work:)

  117. Buscando Informacion en la API de Last.FM | Colymore Says:

    […] Si alguien quiere el plugin esta aqui, y cuando consiga realizar la modificacion para mostrar la portada tambien lo publicare, pero antes necesito ayuda xD. […]

  118. WP Plugins DB » Blog Archive » Last.fm recent tracks Says:

    […] Visit […]

  119. Bob McCabe Says:

    I have your plugin and it works fantastically. Thank you so much! :D

  120. cle.me.uk » Blog Archive » Last.fm recent tracks Wordpress plugin Says:

    […] I decided that the last.fm image was wank, because it was slow, cludgy, and the text colour didn’t match my links. I have added a plugin that uses good old text to put in a link to each track instead. […]

  121. Bryce Says:

    I’d love to use this, but it would be great to be able to limit the number to 3 or 5.

  122. Tijs Says:

    Check the code, even if you don’t know the first thing about programming i’ll bet you can find which line to change the current number of items setting to the one you would like.

  123. Anthony Dahanne’s blog » Blog Archive » Wordpress Last.fm plugin (recent tracks) broken and fixed ! Says:

    […] UPDATE !!! The author of the Last.fm wordpress plugin has updated it to make it work !!! […]

Leave a Reply

You must be logged in to post a comment.