<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: My Recent Tunes Code</title>
	<atom:link href="http://www.command-tab.com/2005/03/22/my-recent-tunes-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/</link>
	<description>Technology and Mac geekery. One part exuberance, two parts obsession.</description>
	<pubDate>Sun, 20 Jul 2008 15:48:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Collin</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-124</link>
		<dc:creator>Collin</dc:creator>
		<pubDate>Tue, 29 Mar 2005 00:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-124</guid>
		<description>&lt;div id="quote"&gt;Hmmm. I wonder if I can get this to work at .mac :-\&lt;/div&gt;

Unfortunately, no.  Apple's .Mac doesn't provide PHP or MySQL.  I really wish they would, but $100 per year only works out to $8.30 per month - about the cheapest you'll find a web host that supports both.  I hear that Apple is planning some .Mac enhancements for the Tiger release, though it's likely it won't be what you're looking for to run this code.</description>
		<content:encoded><![CDATA[<div id="quote">Hmmm. I wonder if I can get this to work at .mac :-\</div>
<p>Unfortunately, no.  Apple&#8217;s .Mac doesn&#8217;t provide PHP or MySQL.  I really wish they would, but $100 per year only works out to $8.30 per month - about the cheapest you&#8217;ll find a web host that supports both.  I hear that Apple is planning some .Mac enhancements for the Tiger release, though it&#8217;s likely it won&#8217;t be what you&#8217;re looking for to run this code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeffrey J. Hoover</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-123</link>
		<dc:creator>Jeffrey J. Hoover</dc:creator>
		<pubDate>Mon, 28 Mar 2005 22:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-123</guid>
		<description>Hmmm. I wonder if I can get this to work at .mac :-\</description>
		<content:encoded><![CDATA[<p>Hmmm. I wonder if I can get this to work at .mac :-\</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Collin</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-122</link>
		<dc:creator>Collin</dc:creator>
		<pubDate>Mon, 28 Mar 2005 02:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-122</guid>
		<description>You can always just run it manually by visiting cover_update.php in a web browser.</description>
		<content:encoded><![CDATA[<p>You can always just run it manually by visiting cover_update.php in a web browser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-121</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 28 Mar 2005 02:00:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-121</guid>
		<description>thanks for the quick reply - but I think this is all a bit over my head..might just have to stick to the standard output from RecentTunes for now 'til there's an installer for this (or I learn more).</description>
		<content:encoded><![CDATA[<p>thanks for the quick reply - but I think this is all a bit over my head..might just have to stick to the standard output from RecentTunes for now &#8217;til there&#8217;s an installer for this (or I learn more).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Collin</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-120</link>
		<dc:creator>Collin</dc:creator>
		<pubDate>Mon, 28 Mar 2005 01:49:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-120</guid>
		<description>&lt;div id="quote"&gt;I can get the db to update if I add to display a Ã¢â‚¬Ëœrequire' on cover_update, but that's clearly not the right way (display doesn't work)Ã¢â‚¬Â¦how do I set up a cron job to update the cover? (yes, I'm a noob)&lt;/div&gt;

What I did was to set up a cron job that calls 'curl' to retrieve cover_update.php from the server.  Not really the best way - it is possible to call a script from the command line.</description>
		<content:encoded><![CDATA[<div id="quote">I can get the db to update if I add to display a Ã¢â‚¬Ëœrequire&#8217; on cover_update, but that&#8217;s clearly not the right way (display doesn&#8217;t work)Ã¢â‚¬Â¦how do I set up a cron job to update the cover? (yes, I&#8217;m a noob)</div>
<p>What I did was to set up a cron job that calls &#8216;curl&#8217; to retrieve cover_update.php from the server.  Not really the best way - it is possible to call a script from the command line.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-119</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 28 Mar 2005 01:44:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-119</guid>
		<description>I'm having trouble with this step:

2. Set up a cron job to periodically run cover_update.php to insert the song details as well as the urls from amazon and itunes music store into the mysql database

I can get the db to update if I add to display a 'require' on cover_update, but that's clearly not the right way (display doesn't work)...how do I set up a cron job to update the cover?  (yes, I'm a noob)

thanks - this is really awesome (and it'll be more awesome once I get it working)</description>
		<content:encoded><![CDATA[<p>I&#8217;m having trouble with this step:</p>
<p>2. Set up a cron job to periodically run cover_update.php to insert the song details as well as the urls from amazon and itunes music store into the mysql database</p>
<p>I can get the db to update if I add to display a &#8216;require&#8217; on cover_update, but that&#8217;s clearly not the right way (display doesn&#8217;t work)&#8230;how do I set up a cron job to update the cover?  (yes, I&#8217;m a noob)</p>
<p>thanks - this is really awesome (and it&#8217;ll be more awesome once I get it working)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Collin</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-118</link>
		<dc:creator>Collin</dc:creator>
		<pubDate>Sun, 27 Mar 2005 21:58:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-118</guid>
		<description>I'd like to work in &lt;a href="http://www.alistapart.com/articles/sprites/" rel="nofollow"&gt;CSS "sprite" rollovers&lt;/a&gt; for the link buttons so they don't flash really quick when you hover over them for the first time (while the image draws in once). A List Apart's method seems to work better than just swapping the background image for that div tag.</description>
		<content:encoded><![CDATA[<p>I&#8217;d like to work in <a href="http://www.alistapart.com/articles/sprites/" rel="nofollow">CSS &#8220;sprite&#8221; rollovers</a> for the link buttons so they don&#8217;t flash really quick when you hover over them for the first time (while the image draws in once). A List Apart&#8217;s method seems to work better than just swapping the background image for that div tag.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: viduka</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-115</link>
		<dc:creator>viduka</dc:creator>
		<pubDate>Sat, 26 Mar 2005 09:23:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-115</guid>
		<description>Wow! That was an impressively quick reply!

Thanks for that last tip about Word Press, it would have really stumped me for a while. I've now got it working thanks to those extra hints, just a couple of things I did that weren't mentioned that might help someone else:

1. Told Recent tunes to export current track as track.html
2. Changed the urls in display.php and coverupdate.php to my website and path.
3. Changed the references from wp-content/themes/command-tab/ to where I had put the files on my webserver.
4. And the usual make sure your permissions are set on your mysql database. :)

Now I just have to integrate it in to my blog and I will be promoting music like there is no tomorrow. Thanks for your work Collin, I'll be clicking quite a few google ads for this! </description>
		<content:encoded><![CDATA[<p>Wow! That was an impressively quick reply!</p>
<p>Thanks for that last tip about Word Press, it would have really stumped me for a while. I&#8217;ve now got it working thanks to those extra hints, just a couple of things I did that weren&#8217;t mentioned that might help someone else:</p>
<p>1. Told Recent tunes to export current track as track.html<br />
2. Changed the urls in display.php and coverupdate.php to my website and path.<br />
3. Changed the references from wp-content/themes/command-tab/ to where I had put the files on my webserver.<br />
4. And the usual make sure your permissions are set on your mysql database. :)</p>
<p>Now I just have to integrate it in to my blog and I will be promoting music like there is no tomorrow. Thanks for your work Collin, I&#8217;ll be clicking quite a few google ads for this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Collin</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-114</link>
		<dc:creator>Collin</dc:creator>
		<pubDate>Sat, 26 Mar 2005 08:45:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-114</guid>
		<description>I exported the table structure, which you can get &lt;a href="http://www.command-tab.com/files/my-recent-tunes/tracks_table.txt" rel="nofollow"&gt;here&lt;/a&gt;.  And yes, it is required before any code is run.  Eventually, I'd like to make a quick little "5-minute" installer that can create the database and/or table, much like the WordPress installation.

Your steps are all correct except for #4, somewhat.  It will fill up on it's own, and limit itself to the value set for &lt;span class="code"&gt;$cleanLimit&lt;/span&gt; in &lt;span class="code"&gt;cover_update.php&lt;/span&gt;.  It's safe to include it right away, as it won't print out anything until there is at least one song in the database.

My Recent Tunes template for the Current Track is:
&lt;span class="code"&gt;^p&#38;&#38;&#38;&#38;&#38;^a&#38;&#38;&#38;&#38;&#38;^t&#38;&#38;&#38;&#38;&#38;^r&lt;/span&gt;
I know that using 5 ampersands is a janky way to accomplish it, and that things would be better off formatting it using XML if possible (Recent Tunes does allow for a header and footer, so it might be doable, thought maybe not UTF-8...)  Consider this a beta release, hehe.

One last thing... the big if block, &lt;span class="code"&gt;if(!is_search() &#38;&#38; !is_single() &#38;&#38; !is_day() &#38;&#38; !is_month())&lt;/span&gt; shouldn't be in &lt;span class="code"&gt;display.php&lt;/span&gt; unless you're copying the code into your WordPress sidebar.  Functions like &lt;span class="code"&gt;is_search()&lt;/span&gt; don't exist outside of WordPress.  So you can either use &lt;span class="code"&gt;display.php&lt;/span&gt; however you want and remove that if block, or keep it and paste everything inside  into your WordPress sidebar code.  I just didn't want five tunes showing up on the sidebar if the content of the page might be rather short compared to the sidebar.  It's totally up to you, though.</description>
		<content:encoded><![CDATA[<p>I exported the table structure, which you can get <a href="http://www.command-tab.com/files/my-recent-tunes/tracks_table.txt" rel="nofollow">here</a>.  And yes, it is required before any code is run.  Eventually, I&#8217;d like to make a quick little &#8220;5-minute&#8221; installer that can create the database and/or table, much like the WordPress installation.</p>
<p>Your steps are all correct except for #4, somewhat.  It will fill up on it&#8217;s own, and limit itself to the value set for <span class="code">$cleanLimit</span> in <span class="code">cover_update.php</span>.  It&#8217;s safe to include it right away, as it won&#8217;t print out anything until there is at least one song in the database.</p>
<p>My Recent Tunes template for the Current Track is:<br />
<span class="code">^p&amp;&amp;&amp;&amp;&amp;^a&amp;&amp;&amp;&amp;&amp;^t&amp;&amp;&amp;&amp;&amp;^r</span><br />
I know that using 5 ampersands is a janky way to accomplish it, and that things would be better off formatting it using XML if possible (Recent Tunes does allow for a header and footer, so it might be doable, thought maybe not UTF-8&#8230;)  Consider this a beta release, hehe.</p>
<p>One last thing&#8230; the big if block, <span class="code">if(!is_search() &amp;&amp; !is_single() &amp;&amp; !is_day() &amp;&amp; !is_month())</span> shouldn&#8217;t be in <span class="code">display.php</span> unless you&#8217;re copying the code into your WordPress sidebar.  Functions like <span class="code">is_search()</span> don&#8217;t exist outside of WordPress.  So you can either use <span class="code">display.php</span> however you want and remove that if block, or keep it and paste everything inside  into your WordPress sidebar code.  I just didn&#8217;t want five tunes showing up on the sidebar if the content of the page might be rather short compared to the sidebar.  It&#8217;s totally up to you, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: viduka</title>
		<link>http://www.command-tab.com/2005/03/22/my-recent-tunes-code/#comment-113</link>
		<dc:creator>viduka</dc:creator>
		<pubDate>Sat, 26 Mar 2005 08:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.command-tab.com/index.php/my-recent-tunes-code/#comment-113</guid>
		<description>I'm looking forward to using this, but as a non php programmer I just have a couple of requests to make this a bit easier for me and others. Geez, we want it on a plate don't we! :)

Would you be able to export the structure of your mysql table as I assume the php file requires this to exist before it works?

Secondly, could you post your recent tunes template for the current track?  This is because I'm not sure if the php script expects the artist, title, album, time and rating to be in a specific order.

After playing with this a little bit, am I correct in assuming that this is how it works:
1. Export the recent tune html file to web server using recent tunes inbuilt export function
2. Set up a cron job to periodically run cover_update.php to insert the song details as well as the urls from amazon and itunes music store into the mysql database
3. When someone visits my website a php include will call the display.php to read the data from the database and make  my tunes list look extremely pretty.

Therefore, the things I need to do to get it to work is:
1. create mysql table
2. edit dbconnect.php to add user,password,database and host details
3. edit cover_update.php with my amazon associates id
4. fill the database with at least 10 songs before putting it up on the website???

Have I missed anything? 

This has to be the best looking tunes tool I have seen and would love to get it working.</description>
		<content:encoded><![CDATA[<p>I&#8217;m looking forward to using this, but as a non php programmer I just have a couple of requests to make this a bit easier for me and others. Geez, we want it on a plate don&#8217;t we! :)</p>
<p>Would you be able to export the structure of your mysql table as I assume the php file requires this to exist before it works?</p>
<p>Secondly, could you post your recent tunes template for the current track?  This is because I&#8217;m not sure if the php script expects the artist, title, album, time and rating to be in a specific order.</p>
<p>After playing with this a little bit, am I correct in assuming that this is how it works:<br />
1. Export the recent tune html file to web server using recent tunes inbuilt export function<br />
2. Set up a cron job to periodically run cover_update.php to insert the song details as well as the urls from amazon and itunes music store into the mysql database<br />
3. When someone visits my website a php include will call the display.php to read the data from the database and make  my tunes list look extremely pretty.</p>
<p>Therefore, the things I need to do to get it to work is:<br />
1. create mysql table<br />
2. edit dbconnect.php to add user,password,database and host details<br />
3. edit cover_update.php with my amazon associates id<br />
4. fill the database with at least 10 songs before putting it up on the website???</p>
<p>Have I missed anything? </p>
<p>This has to be the best looking tunes tool I have seen and would love to get it working.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
