<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://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://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>Don&#039;t I know I need those</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-38117</link>
 <description>&lt;p&gt;Don&#039;t I know I need those modules.&lt;/p&gt;

&lt;p&gt;I turned off the Last.fm module, just because it made my site crash if Last.fm timed out, unless I hacked in some changes to the Drupal &lt;span class=&quot;caps&quot;&gt;HTTP &lt;/span&gt;client code. Which I didn&#039;t fancy maintaining. Glad to hear you&#039;ve done some work on a new module for it. Good luck with it!&lt;/p&gt;</description>
 <pubDate>Thu, 24 Apr 2008 16:21:51 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 38117 at http://townx.org</guid>
</item>
<item>
 <title>Last.fm and Tabbo module</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-37983</link>
 <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;I&#039;ve just finished a &lt;a href=&quot;http://www.muszek.com/last-fm-and-tabbo-module-for-drupal&quot;&gt;Last.fm and Tabbo module&lt;/a&gt; for Drupal 6... I don&#039;t know how much yours exactly works (don&#039;t have a working D5 installation around and your demo is either turned off or malfunctioning), but it seems to be similar (one difference is that mine also supports &lt;a href=&quot;http://www.tabbo.org&quot;&gt;Tabbo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;P.S. &lt;/span&gt; You need some sort of anti-spam measures.  Captcha + reCAPTCHA modules have been working fine for me (one site got literally thousands of spam comments.  I deleted them all and installed those two modules - not even one bastard got through).&lt;/p&gt;</description>
 <pubDate>Thu, 24 Apr 2008 04:33:07 -0500</pubDate>
 <dc:creator>muszek</dc:creator>
 <guid isPermaLink="false">comment 37983 at http://townx.org</guid>
</item>
<item>
 <title>Hello Arp. Are you using PHP</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14229</link>
 <description>&lt;p&gt;Hello Arp. Are you using &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; 4? I developed on &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; 5 and haven&#039;t tested on &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; 4 as I never use it. I get the feeling it might be due to that. In &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; 4, you can&#039;t chain together method invocations on objects, as this module does on the line where the error occurs. If you can, try running it under &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; 5 and see whether the problem goes away. I need to do some work to make it &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; 4 compatible, as I believe Drupal 5 still supports that &lt;span class=&quot;caps&quot;&gt;PHP &lt;/span&gt;version.&lt;/p&gt;</description>
 <pubDate>Sun, 01 Jul 2007 12:41:34 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 14229 at http://townx.org</guid>
</item>
<item>
 <title>Problem with multisite?</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14228</link>
 <description>&lt;p&gt;Hey there,&lt;/p&gt;

&lt;p&gt;Very cool module - thanks for taking the time to work on it.  I&#039;ve only tried it on a multisite install so far and am getting an error:&lt;/p&gt;

&lt;code&gt;Parse error: syntax error, unexpected T_OBJECT_OPERATOR in .../sites/default/modules/lastfm/lastfm.module on line 176&lt;/code&gt;

&lt;p&gt;I realize this is a very early release, so it&#039;s not that big a deal, but should I be getting this error?  I tried moving it to sites/domain.com/modules and got the same error.  I have not tried it in a single Drupal install yet.  Thanks!&lt;/p&gt;</description>
 <pubDate>Sun, 01 Jul 2007 11:34:41 -0500</pubDate>
 <dc:creator>Arp laszlo</dc:creator>
 <guid isPermaLink="false">comment 14228 at http://townx.org</guid>
</item>
<item>
 <title>Sponsorship and/or Development Help</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14205</link>
 <description>&lt;p&gt;Hi Elliot. We&#039;ve got a client that is interested in doing Last.fm/Drupal integration on their site. They would probably sponsor a bunch of fixes/features for this module. So if you&#039;re looking for help/money for developing the modules (and perhaps not having it crash your site!), please &lt;a href=&quot;http://drupal.org/user/17190/contact&quot;&gt;contact me&lt;/a&gt; and I can give you more details.&lt;/p&gt;</description>
 <pubDate>Fri, 15 Jun 2007 06:27:28 -0500</pubDate>
 <dc:creator>Jeff Robbins</dc:creator>
 <guid isPermaLink="false">comment 14205 at http://townx.org</guid>
</item>
<item>
 <title>Hi Jeff. I think that&#039;s a</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14203</link>
 <description>&lt;p&gt;Hi Jeff. I think that&#039;s a good idea, and I&#039;d definitely be willing to do it. Only thing is I&#039;ve got quite a bit on at the moment, so may not get round to it for a week or so. Any tips on the best place to start when thinking about contributing to Drupal?&lt;/p&gt;

&lt;p&gt;The caching idea is also a great one. Looks like I could easily use that instead of my hokey caching to the filesystem. Thanks for the reference and the clear article.&lt;/p&gt;</description>
 <pubDate>Wed, 13 Jun 2007 05:08:21 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 14203 at http://townx.org</guid>
</item>
<item>
 <title>Submitting to drupal.org?</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14201</link>
 <description>&lt;p&gt;Have you considered putting this into &lt;span class=&quot;caps&quot;&gt;CVS &lt;/span&gt;on drupal.org? It&#039;s a module that quite a few others have mentioned a need for, and I&#039;m pretty sure some other folks would be able to pitch in with patches for things like multi-user support. It could take advantage of drupal&#039;s built in caching system pretty easily, too...  (&lt;a href=&quot;http://www.lullabot.com/articles/a_beginners_guide_to_caching_data&quot; title=&quot;http://www.lullabot.com/articles/a_beginners_guide_to_caching_data&quot;&gt;http://www.lullabot.com/articles/a_beginners_guide_to_caching_data&lt;/a&gt;)...&lt;/p&gt;</description>
 <pubDate>Tue, 12 Jun 2007 16:45:37 -0500</pubDate>
 <dc:creator>Jeff Eaton</dc:creator>
 <guid isPermaLink="false">comment 14201 at http://townx.org</guid>
</item>
<item>
 <title>You&#039;re welcome, Artur.</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14159</link>
 <description>&lt;p&gt;You&#039;re welcome, Artur.&lt;/p&gt;</description>
 <pubDate>Fri, 25 May 2007 03:40:58 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 14159 at http://townx.org</guid>
</item>
<item>
 <title>Thanks</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14158</link>
 <description>&lt;p&gt;Thanks a lot.&lt;/p&gt;</description>
 <pubDate>Thu, 24 May 2007 23:04:43 -0500</pubDate>
 <dc:creator>Artur</dc:creator>
 <guid isPermaLink="false">comment 14158 at http://townx.org</guid>
</item>
<item>
 <title>I imagine this is possible,</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14134</link>
 <description>&lt;p&gt;I imagine this is possible, but it&#039;s not something I need or have attempted yet. If you have patches, I&#039;d be happy to incorporate them.&lt;/p&gt;</description>
 <pubDate>Mon, 14 May 2007 14:42:22 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 14134 at http://townx.org</guid>
</item>
<item>
 <title>Is it possible to have it for each user??</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14132</link>
 <description>&lt;p&gt;Basically, I want everyone that signs in to have the option to enter their last.FM username and have their feed display in their homepage &lt;span class=&quot;caps&quot;&gt;AND &lt;/span&gt;in their user&#039;s page. Is this possible?&lt;/p&gt;</description>
 <pubDate>Fri, 11 May 2007 19:08:33 -0500</pubDate>
 <dc:creator>sam</dc:creator>
 <guid isPermaLink="false">comment 14132 at http://townx.org</guid>
</item>
<item>
 <title>It&#039;s here. It only shows up</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14107</link>
 <description>&lt;p&gt;It&#039;s &lt;a href=&quot;http://townx.org/files/lastfm.zip&quot;&gt;here&lt;/a&gt;. It only shows up in the full view of the post.&lt;/p&gt;</description>
 <pubDate>Thu, 12 Apr 2007 18:21:33 -0500</pubDate>
 <dc:creator>elliot</dc:creator>
 <guid isPermaLink="false">comment 14107 at http://townx.org</guid>
</item>
<item>
 <title>where is the code</title>
 <link>http://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comment-14106</link>
 <description>&lt;p&gt;you said: &lt;br /&gt;
&quot;he new version is attached to the bottom of this post. &quot;&lt;/p&gt;

&lt;p&gt;I don&#039;t see it.&lt;/p&gt;</description>
 <pubDate>Thu, 12 Apr 2007 16:10:23 -0500</pubDate>
 <dc:creator>Guest</dc:creator>
 <guid isPermaLink="false">comment 14106 at http://townx.org</guid>
</item>
<item>
 <title>Drupal Last.fm module - now works with Drupal 5!</title>
 <link>http://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://townx.org/blog/elliot/drupal-last-fm-module-now-works-drupal-5#comments</comments>
 <category domain="http://townx.org/tech">tech</category>
 <category domain="http://townx.org/code">code</category>
 <enclosure url="http://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://townx.org</guid>
</item>
</channel>
</rss>
