• 4th May 2008 - By Taha Paksu

    Description : Its a widget plugin which collects data from Audioscrobbler web services and gets your last listened tracks and their album images. It works in PHP4 platforms and uses my simplexml class to collect data from Audioscrobbler.

    Installation : The directory structure should be like this :

     --> wp-plugins/
    	|-- lastfm_RPS/
    		|-- noart.gif
    		|-- simplexml.class.php
    		|-- readme.txt
    		|-- lastfm.css

    Then just activate the plugin, go to Design-Widgets, add the widget where you want, write the username and widget title in the settings and save. That’s all.

    Note : If your theme isn’t widget enabled, you can insert this plugin in your sidebar.php file or wherever you want like this :

    1
    2
    3
    4
    <div class="sidebar>
    <h3 id="43_my-last-fm_1" >;My Last.fm</h3>
    <?php lastfm_recent_sidebar([username (required)],[list item count(default is 10)],[timezone diff in seconds(default is 0)])?>
    </div>

    Download : You can get the latest release here : http://wordpress.org/extend/plugins/lastfm-rps/

    Demo : You can see a working example in my homepage.

    Whats New in Version 0.2?

    • Added option to define how many songs are displayed on the page
    • Seperated css file from code and added new “lastfm.css” file
    • Added different stylesheets to recently played songs
    • Changed the datetime display configuration like “x days y seconds and z minutes ago”
    • Changed the div’s into tables which are more reliable for different themes.
    • If the user hasn’t any wp_head() included in his/her theme’s header.php, this script checks and adds its css itself.

    Whats the fixes in Version 0.3?

    • Added a neccessary fix for the time difference between server time and local time.
    • If there is a track played in the player which length is less than 4 minutes ,the script showed two recently listened songs, so this is fixed now.It only displays one.

    Whats new in Version 0.4?

    • Added support for not widget-ready themes.
    • Added Screenshot
    • Updated Readme.txt

    Whats the fixes in Version 0.5?

    • When no songs played for a long time or only played only one song, this script raised errors. This is fixed now.
    • Optimized the SimpleXML Extension for speed issues.

    What’s added in v0.6?

    • Improved checking of album images.
    • If the feed item contains no album name, then directly shows default image.

    What’s New in v0.7?

    • Added image positioning
    • Added optional Bottom Text
    • Removed the slashes before ‘ and “
    • Converted tables to css so you have all the control in lastfm.css
    • Added artist images support. Now it shows artist images when it can’t find the album image.


    Yazıyı Paylaş:
    • Digg
    • del.icio.us
    • Facebook
    • Google Bookmarks
    • Live
    • Slashdot
    • StumbleUpon
    • Technorati
    • Furl
    • NewsVine
    • Pownce
    • Reddit
    • SphereIt
    • Spurl
    • TwitThis

  • 170 Responses to “Last.fm RPS Wordpress Plugin”

    • Lizzie on 23 December 2009

      My songlist isn’t showing up correctly – it’s all jumbled up. Can anyone help?? I’m using WP 2.9.

      http://countingtheyears.com

      Thanks x

      ReplyReply
    • Neal on 20 December 2009

      I can’t get the plugin to pull my song info. Do I have to scrobble from a local player or does it pull info from the online listening of last.fm. Want to make sure I cover my bases. Plugin looks great though.

      Thanks in advance.

      ReplyReply
      • Taha Paksu on 21 December 2009

        what exists in your personal profile page as listened or listening is displayed in this plugin. the answer is both you are listening locally and submitted to last.fm and you listen on the last.fm radio should be displayed here. and if you didnt listen to a song for a while maybe it wont show any songs on your profile.

        ReplyReply
    • Ryan Cain on 7 December 2009

      Hello! I love your plugin, but have made one adjustment that you might like to add to the main version. In lastfm.php, I have adjusted my lastfm_datediff function to account for songs that are currently being listened to. These songs will have a $dateDiff of zero or less. My modified function looks like this:

      function lastfm_datediff($date,$ret = 0,$serversec,$recentdisplayed){
      $now = time();
      $dateDiff = $now – $date + $serversec;
      $fullDays = floor($dateDiff/(60*60*24));
      $fullHours = floor(($dateDiff-($fullDays*60*60*24))/(60*60));
      $fullMinutes = floor(($dateDiff-($fullDays*60*60*24)-($fullHours*60*60))/60);
      if($dateDiff =4) return “$fullMinutes minutes ago”;
      if($recentdisplayed) return “$fullMinutes minutes ago”;
      if($ret) return “recent”;
      return “just listened”;
      }

      where I’ve added the line: if($dateDiff <= 0) return "listening now";

      ReplyReply
      • Ryan Cain on 7 December 2009

        Heh, I guess the code doesn’t show up too well in the comments. Anyway.. add

        if($dateDiff <= 0) return "listening now";

        right after the line:

        $dateDiff = $now – $date + $serversec;

        ReplyReply
        • Taha Paksu on 7 December 2009

          Thank you. I’m gonna review all the comments since the last version and build a new version but i don’t know when i’ll have a chance to do that. But thanks.

          ReplyReply
    • pled on 6 December 2009

      Really great plugin ! very good looking, Thank you …

      ReplyReply
    • Bart on 7 October 2009

      So, i have a problem with the times sometimes when i listen to tracks, is see this -1d,23h and 58m ago for example offcourse.
      What the problem? Can it be fixed? I really want it to work properly!

      ReplyReply
    • bigbrovar on 22 September 2009

      Doesnt work in wordpress 2.8x :(

      ReplyReply
      • Taha Paksu on 22 September 2009

        @bigbrovar : this site uses WP 2.8.4 and it works on it. what is the error?

        ReplyReply
        • bigbrovar on 26 September 2009

          “This username does not exist, or the feed service is down. ” that is what i get when i install it. am trying to run it on my localhost (ubuntu 9.04) what gives?

          ReplyReply
          • Taha Paksu on 26 September 2009

            does your username contain uppercase characters? What’s your username? I’ll try myself. On the other hand, you may not have the PHP’s XML extension installed on your localhost. That might be the problem too. Check it with phpinfo() function. Is there a “XML” component installed on the list?

            ReplyReply
            • bigbrovar on 21 October 2009

              Hey mate I finally uploaded my blog onlone and it still doesnt work still says This username does not exist, or the feed service is down Just thought to let you know

              ReplyReply
            • Taha Paksu on 27 September 2009

              that’s because this plugin fetches a xml file from last.fm.. try it again when you upload your site on a host.

              ReplyReply
            • bigbrovar on 27 September 2009

              Tried it again and i observed the following:

              The page takes blog page takes an incredible amount of time to load even though its on localhost and when it loads i get this “This username does not exist, or the feed service is down.”

              however if i disable the plugin. the page loads faster like it should.

              ReplyReply
            • bigbrovar on 27 September 2009

              my username on lastfm is bigbrova and phpinfo showed that XML is enabled and active. How there the widget work, will it for example work if am behind an http proxy? my localhost is behind an http_proxy so i had to add the proxy parameters to wordpress config which works fine for other internet aware widgets

              ReplyReply
    • DelilahMused on 23 July 2009

      Hi! I’m trying to use this widget in my blog and I get the following error in the sidebar (after which clickable links to the music are there): Warning: gzinflate() [function.gzinflate]: data error in /home/passcreek/www/delilahmused/wp-includes/http.php on line 1787. What am I doing wrong? Thanks so much for your help.

      Cindie

      ReplyReply
      • Taha Paksu on 24 July 2009

        @DelilahMused : I couldn’t see the error message when I clicked the links?

        ReplyReply
    • [...] Now we just have to find the plugin that matches your needs. The one I’ve selected is rather boring-looking, but I like the simple displays. If you want the plugin to show album covers you could try Last.fm RPS Wordpress plugin: http://www.tahapaksu.com/wordpress/lastfm-wordpress-plugin [...]

    • felix on 6 June 2009

      hello,

      i get these result from your code:

      “Parse error: syntax error, unexpected T_CLASS in /users/leiter/www/wordpress/test.php on line 2″

      these are the phpinfo results:
      SimpleXML
      Simplexml support enabled
      Revision $Revision: 1.151.2.22.2.45 $
      Schema support enabled

      after changing “simplexml.class.php” to “simplexml.php” in line 2 I get another pharse error.
      “Parse error: syntax error, unexpected ‘:’ in /users/leiter/www/wordpress/test.php on line 4″
      my php version is 5.2.8

      Best Regards

      ReplyReply

    Leave a Reply

    Spam Protection by WP-SpamFree Plugin


Ad