<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.townx.org" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>townx - Drupal Last.fm module - now works with Drupal 5! - Comments</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5</link>
 <description>Comments for &quot;Drupal Last.fm module - now works with Drupal 5!&quot;</description>
 <language>en</language>
<item>
 <title>That rocks</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-40319</link>
 <description>&lt;p&gt;Drupal Last.fm module - now works with Drupal 5 - that is absolute my choice :-)&lt;/p&gt;</description>
 <pubDate>Sat, 06 Feb 2010 17:06:38 -0600</pubDate>
 <dc:creator>Healthy eating plan</dc:creator>
 <guid isPermaLink="false">comment 40319 at http://www.townx.org</guid>
</item>
<item>
 <title>Great stuff</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-40135</link>
 <description>&lt;p&gt;Love all the chat about Drupal. Big fan, and can&#039;t get enough on it.&lt;/p&gt;</description>
 <pubDate>Wed, 02 Dec 2009 20:25:35 -0600</pubDate>
 <dc:creator>Application Performance Management Software</dc:creator>
 <guid isPermaLink="false">comment 40135 at http://www.townx.org</guid>
</item>
<item>
 <title>thanks</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39991</link>
 <description>&lt;p&gt;Really great work, this module is perfect for me, thanks&lt;/p&gt;</description>
 <pubDate>Wed, 21 Oct 2009 06:35:15 -0500</pubDate>
 <dc:creator>degriffe</dc:creator>
 <guid isPermaLink="false">comment 39991 at http://www.townx.org</guid>
</item>
<item>
 <title>drupal6 last.fm module</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39976</link>
 <description>&lt;p&gt;I have developed last.fm module for drupal 6. Using that i can fetch my playlist from the last.fm. I&#039;ll give you the demo first then we will talk about rest. &lt;/p&gt;</description>
 <pubDate>Sat, 17 Oct 2009 06:42:16 -0500</pubDate>
 <dc:creator>oswebsolution</dc:creator>
 <guid isPermaLink="false">comment 39976 at http://www.townx.org</guid>
</item>
<item>
 <title>Re: LastFM</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39937</link>
 <description>&lt;p&gt;I use LastFM regular and love it very much and now it is also for Drupal available - perfect - great work!&lt;/p&gt;</description>
 <pubDate>Wed, 07 Oct 2009 03:46:46 -0500</pubDate>
 <dc:creator>Auto Versicherung günstig</dc:creator>
 <guid isPermaLink="false">comment 39937 at http://www.townx.org</guid>
</item>
<item>
 <title>Me again</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39909</link>
 <description>&lt;p&gt;Ha ha see what I mean, I have just posted a comment about ever one is on about drupal, what the heck I am going to try it now :)&lt;/p&gt;</description>
 <pubDate>Tue, 22 Sep 2009 09:07:40 -0500</pubDate>
 <dc:creator>Annuity Rates</dc:creator>
 <guid isPermaLink="false">comment 39909 at http://www.townx.org</guid>
</item>
<item>
 <title>Posthumous title
　Have you</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39898</link>
 <description>&lt;p&gt;Posthumous title&lt;br /&gt;
　Have you heard Diana&#039;s posthumous title?&lt;br /&gt;
Princess of Walls.   &lt;a href=&quot;http://www.hottiffanyshop.com/Gucci/index.html&quot; target=&quot;_blank&quot;&gt;Gucci Silver&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 19 Sep 2009 05:20:02 -0500</pubDate>
 <dc:creator>red</dc:creator>
 <guid isPermaLink="false">comment 39898 at http://www.townx.org</guid>
</item>
<item>
 <title>Thanks for the update!

Need</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39827</link>
 <description>&lt;p&gt;Thanks for the update!&lt;/p&gt;

&lt;p&gt;Need to register a UK company?&lt;br /&gt;
&lt;a href=&quot;http://www.accounting-on-line.com&quot; title=&quot;www.accounting-on-line.com&quot;&gt;www.accounting-on-line.com&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 22 Aug 2009 18:26:07 -0500</pubDate>
 <dc:creator>JosephCalligan</dc:creator>
 <guid isPermaLink="false">comment 39827 at http://www.townx.org</guid>
</item>
<item>
 <title>Nice post</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39560</link>
 <description>&lt;p&gt;A lot of people are interested in a last.fm module. So I think it&#039;s a good idea to host your work on drupal.org. It will be easier for people to find it and watch the evolution of the project. If you already posted it on drupal.org, please send me the link.&lt;br /&gt;
Thanks and keep up the good work!&lt;/p&gt;</description>
 <pubDate>Fri, 05 Jun 2009 07:30:03 -0500</pubDate>
 <dc:creator>On line casino craps</dc:creator>
 <guid isPermaLink="false">comment 39560 at http://www.townx.org</guid>
</item>
<item>
 <title>That&#039;s a good question.  I</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39526</link>
 <description>&lt;p&gt;That&#039;s a good question.  I always run into compatibility issues, but then again I don&#039;t spend as much time with my Drupal site as I need to.&lt;/p&gt;</description>
 <pubDate>Mon, 01 Jun 2009 21:16:00 -0500</pubDate>
 <dc:creator>Bill</dc:creator>
 <guid isPermaLink="false">comment 39526 at http://www.townx.org</guid>
</item>
<item>
 <title>I only came across Drupal</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39482</link>
 <description>&lt;p&gt;I only came across Drupal recently because I was getting frustrated with some of the limitations with Wordpress. It&#039;s great to see that Drupal is so well supported.&lt;/p&gt;</description>
 <pubDate>Wed, 27 May 2009 10:50:49 -0500</pubDate>
 <dc:creator>Steve - Make Money Online</dc:creator>
 <guid isPermaLink="false">comment 39482 at http://www.townx.org</guid>
</item>
<item>
 <title>... compatible to Drupal 6?</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39212</link>
 <description>&lt;p&gt;Meanwhile Drupal 6 is out - is last.fm compatible to Drupal 6?&lt;/p&gt;</description>
 <pubDate>Tue, 28 Apr 2009 06:29:39 -0500</pubDate>
 <dc:creator>Lastminute Reisen</dc:creator>
 <guid isPermaLink="false">comment 39212 at http://www.townx.org</guid>
</item>
<item>
 <title>Thanks for the Update!</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39138</link>
 <description>&lt;p&gt;This is a great update for Drupal, I just started reading materials about it and is going to try this weekend, will keep you posted.&lt;/p&gt;

&lt;p&gt;thanks for sharing!&lt;/p&gt;</description>
 <pubDate>Fri, 17 Apr 2009 10:29:00 -0500</pubDate>
 <dc:creator>chicago Realtor</dc:creator>
 <guid isPermaLink="false">comment 39138 at http://www.townx.org</guid>
</item>
<item>
 <title>It works for me</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-39093</link>
 <description>&lt;p&gt;It works for me &lt;img src=&quot;thanks&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</description>
 <pubDate>Tue, 07 Apr 2009 08:23:00 -0500</pubDate>
 <dc:creator>betclic</dc:creator>
 <guid isPermaLink="false">comment 39093 at http://www.townx.org</guid>
</item>
<item>
 <title>Drupal 6.0?</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-38927</link>
 <description>&lt;p&gt;Now that Drupal 6.0 is out, will this module work with that? I&#039;m semi-new to Drupal, and started out with 6.0.  Thanks. &lt;/p&gt;</description>
 <pubDate>Thu, 05 Mar 2009 06:35:37 -0600</pubDate>
 <dc:creator>Ryan</dc:creator>
 <guid isPermaLink="false">comment 38927 at http://www.townx.org</guid>
</item>
<item>
 <title>Drupal Last.fm module - now works with Drupal 5!</title>
 <link>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5</link>
 <description>&lt;p&gt;&lt;strong&gt;Another update:&lt;/strong&gt; I noticed today that this module had disabled my site. I&#039;m not sure why, but I think it may be because Last.fm wasn&#039;t responding. I&#039;m still using it, but if you have it on your site and everything goes bad, it might be because Last.fm isn&#039;t available. I manually disabled it in the system table for my Drupal install and my site came back to life, so I know it was this module that caused the problem. I need to do some more debugging before it&#039;s suitable for production, so use at your own risk, or exclude the block from the admin page so at least you can disable the module if it causes problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I&#039;ve just updated this slightly, so that the cached track listing is used if your recent tracks from Last.fm is blank. This avoids you getting an empty listing if you haven&#039;t been listening to music for a while. I also updated it a second time to prevent errors occurring if you get broken &lt;span class=&quot;caps&quot;&gt;XML &lt;/span&gt;back from Last.fm (which happened to me once, and caused my whole site to crash).&lt;/p&gt;

&lt;p&gt;I&#039;ve had a couple of requests for my &lt;a href=&quot;http://last.fm/&quot;&gt;Last.fm&lt;/a&gt; Drupal module, in response to &lt;a href=&quot;http://townx.org/blog/elliot/utterly_pointless_drupal_module&quot;&gt;a previous blog post&lt;/a&gt;. This was also a good opportunity to learn how to write modules for Drupal 5 and learn the new forms &lt;span class=&quot;caps&quot;&gt;API, &lt;/span&gt;which I&#039;ve now done.&lt;/p&gt;

&lt;p&gt;The new version is attached to the bottom of this post. It requires Drupal 5 and &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; 5 with the &lt;span class=&quot;caps&quot;&gt;DOM &lt;/span&gt;extension enabled (this is used for parsing the &lt;span class=&quot;caps&quot;&gt;XML &lt;/span&gt;feed from Last.fm). It won&#039;t check whether the &lt;span class=&quot;caps&quot;&gt;DOM &lt;/span&gt;extension is enabled (it&#039;s not that clever yet), so it could cause issues (like your site breaking) if you try to install it on a system without &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; 5 and/or the &lt;span class=&quot;caps&quot;&gt;DOM &lt;/span&gt;extension.&lt;/p&gt;

&lt;p&gt;Install it as a standard module (drop into the &lt;tt&gt;modules&lt;/tt&gt; directory, enable in &lt;em&gt;Administer &amp;gt; Site building &amp;gt; Modules&lt;/em&gt;). I&#039;ve integrated it with the admin. system (under &lt;em&gt;Administer &amp;gt; Site configuration &amp;gt; Last.fm module settings&lt;/em&gt;), so you&#039;ll need to configure it there before it works. The settings required are:&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;Your Last.fm username.&lt;/li&gt;
&lt;li&gt;The number of tracks you want to show (1-10).&lt;/li&gt;
&lt;li&gt;The period for which you want to cache the list (5 minutes to 1 hour), or no caching. The listing is cached in your Drupal root directory (under the filename &lt;tt&gt;lastfm_cached.html&lt;/tt&gt;) for efficiency. In cases where Last.fm doesn&#039;t respond quickly enough, you will get an error message (rather than it just leaving your site hanging).&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;Then turn on the block with the title &lt;em&gt;Recent tracks&lt;/em&gt; in the block admin. pages. And away you go! As proof it actually works, see the left-hand side of this site, where it&#039;s in action.&lt;/p&gt;</description>
 <comments>http://www.townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comments</comments>
 <category domain="http://www.townx.org/tech">tech</category>
 <category domain="http://www.townx.org/code">code</category>
 <enclosure url="http://www.townx.org/files/lastfm.zip" length="2085" type="application/zip" />
 <pubDate>Mon, 26 Mar 2007 05:06:36 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">625 at http://www.townx.org</guid>
</item>
</channel>
</rss>

