<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marktastic &#187; Wordpress</title>
	<atom:link href="http://www.marktastic.com/category/web/wordpress-web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marktastic.com</link>
	<description>It&#039;s not just Mark, it&#039;s Marktastic!</description>
	<lastBuildDate>Mon, 12 Apr 2010 14:00:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<image>
  <link>http://www.marktastic.com</link>
  <url>http://www.marktastic.com/wp-content/themes/marktastic/images/favicon16.ico</url>
  <title>Marktastic</title>
</image>
		<item>
		<title>How to Automatically Download Audio from &#8220;The Morning After&#8221; on KSLG 1380 AM in St. Louis</title>
		<link>http://www.marktastic.com/2009/02/how-to-automatically-download-audio-from-the-morning-after-on-kslg-1380-am-in-st-louis/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-automatically-download-audio-from-the-morning-after-on-kslg-1380-am-in-st-louis</link>
		<comments>http://www.marktastic.com/2009/02/how-to-automatically-download-audio-from-the-morning-after-on-kslg-1380-am-in-st-louis/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 17:00:13 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Radio]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[1380]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[doug vaughn]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[jim hayes]]></category>
		<category><![CDATA[kslg]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[St. Louis]]></category>
		<category><![CDATA[the morning after]]></category>
		<category><![CDATA[tim mckernan]]></category>

		<guid isPermaLink="false">http://www.marktastic.com/?p=326</guid>
		<description><![CDATA[
I am a large fan of the radio program &#8220;The ITD Morning After&#8221; on 1380 AM in St. Louis. 1380 AM has a terribly weak frequency. To compensate, the audio content from each show is put up daily on www.insidestl.com. (Sidenote, I&#8217;m a believer that every radio program ought to be available online. This would [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-346" title="525header-morningafter" src="http://www.marktastic.com/wp-content/uploads/2009/02/525header-morningafter.jpg" alt="525header-morningafter" width="525" height="92" /></p>
<p>I am a large fan of the radio program &#8220;The ITD Morning After&#8221; on 1380 AM in St. Louis. 1380 AM has a terribly weak frequency. To compensate, the audio content from each show is put up daily on <a href="http://www.insidestl.com" target="_blank">www.insidestl.com</a>. (Sidenote, I&#8217;m a believer that every radio program ought to be available online. This would be great for archival purposes, higher audience loyalty and to allow their audience to listen at their convenience, but I digress.)</p>
<p>When I first started listening, insidestl.com was running on <a href="http://www.wordpress.org" target="_blank">WordPress</a> and it had a podcast and I gave little thought to the daily task of downloading the audio files to get them on my <a href="http://www.marktastic.com/wp-content/uploads/2008/11/zune_30_gb_digital_media_player_black.jpg" target="_blank" rel="lightbox[326]">Zune</a> (yes, I&#8217;m one of the 5 people that has a Zune). I used an app called <a href="http://www.feedreader.com/" target="_blank">FeedReader</a> was able to download all the audio files from the site&#8217;s main RSS feed. Then the site transitioned to a DotNetNuke (DNN) platform that will referred to as the ITX debacle.<span id="more-326"></span></p>
<p>The ITX debacle removed functionality and ultimately left a lot of folks (message boarders namely) wishing they could go back to the old system. I preferred the old system, but only because the new version of the site has not provided a podcast. The audio files are still uploaded each day, but it has required me to download them manually.</p>
<p>Post ITX Debacle, I&#8217;ve gotten around having to download the audio files individually using the  <a href="http://www.downthemall.net/" target="_blank">DownloadThemAll</a> (DTA) FireFox add-on. That has worked okay; it provides a single button click to download all files and I didn&#8217;t have to put too much thought into it. But I still had to think about it and remember each day to use DTA to get the files, which was just too much.</p>
<p>Now short of continuing to wish that <a href="http://www.insidestl.com" target="_blank">www.insidestl.com</a> would provide a podcast, I started looking for an automatic method to download the content. A short search led me <a href="http://lifehacker.com/software/top/geek-to-live--mastering-wget-161202.php" target="_blank">here</a>, which subsequently led me <a href="http://www.veen.com/jeff/archives/000573.html" target="_blank">here</a>.</p>
<p>The end result? I have a fully automatic method for downloading audio from insidstl.com</p>
<p>Here&#8217;s how to do it:</p>
<ol>
<li>Download WGET from <a href="http://xoomer.virgilio.it/hherold/wget-1.10.2b.zip" target="_blank">here</a>.</li>
<li>Extract the file you downloaded in step 1 to c:\wget on your hard drive.</li>
<li>Create a file called <strong>sites.txt </strong>file in c:\wget. Edit it to contain:<code> <a class="linkification-ext" title="Linkification: http://www.insidestl.com/ITDMorningAfter/tabid/88/Default.aspx" href="http://www.insidestl.com/ITDMorningAfter/tabid/88/Default.aspx">http://www.insidestl.com/ITDMorningAfter/tabid/88/Default.aspx</a></code><a href="http://www.marktastic.com/wp-content/uploads/2009/02/sites.txt" target="_blank"><br />
Or download sites.txt from here.</a></li>
<li>Create a file called <strong>insidestl.cmd</strong> file in c:\wget<br />
Edit it to contain:<br />
<code><br />
c:<br />
cd \wget<br />
wget -r -l2 -H -t1 -nd -A.mp3 -erobots=off -i c:\wget\sites.txt<br />
</code><br />
<a href="http://www.marktastic.com/wp-content/uploads/2009/02/insidestl.txt" target="_blank">Or download insidestl.txt here</a>. (Rename it to insidestl.cmd after downloading.)</li>
<li>Create a new scheduled task that executes <strong>insidestl.cmd</strong> at the time of your liking. Audio files are usually uploaded by 11:00 am in my experience, but I scheduled mine for 3pm.</li>
</ol>
<p>You now have a fully automatic method to download that day&#8217;s audio with no thought or action required. This will download the files to c:\wget directory. If you&#8217;d prefer the files to end up in a different directory, modify step 5 above to include a move command to your preferred directory.</p>
<p>For more help with WGET, click <a href="http://www.gnu.org/software/wget/manual/wget.html" target="_blank">here</a></p>
<p>For those of you looking for quality sports talk in the morning, look elsewhere. If you are, however, looking for 3 hours of daily grabass, &#8220;The Morning After&#8221; might be for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marktastic.com/2009/02/how-to-automatically-download-audio-from-the-morning-after-on-kslg-1380-am-in-st-louis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Use Google Spreadsheets as a Data Source in WordPress (Part 2)</title>
		<link>http://www.marktastic.com/2008/11/how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-2</link>
		<comments>http://www.marktastic.com/2008/11/how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-2/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 15:00:59 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[execphp]]></category>
		<category><![CDATA[google spreadsheet]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpexec]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[simplepie]]></category>
		<category><![CDATA[sniplets]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marktastic.com/?p=240</guid>
		<description><![CDATA[This post is the second installment of How to user Google Spreadsheets as a Data Source in WordPress. Click Here for Part 1.
Step 5 &#8211; Build the SimplePie function call and process the result
There are tons of ways to customize and modify what I&#8217;m about to demonstrate; for much more info, visit the SimplePie Documentation [...]]]></description>
			<content:encoded><![CDATA[<p>This post is the second installment of How to user Google Spreadsheets as a Data Source in WordPress. <a href="http://www.marktastic.com/2008/11/how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-1">Click Here for Part 1</a>.<span id="more-240"></span></p>
<h3>Step 5 &#8211; Build the SimplePie function call and process the result</h3>
<p>There are tons of ways to customize and modify what I&#8217;m about to demonstrate; for much more info, visit the <a href="http://simplepie.org/wiki/plugins/wordpress/simplepie_plugin_for_wordpress/start" target="_blank">SimplePie Documentation Page</a>. For PHP help, <a href="http://www.w3schools.com/PHP/" target="_blank">visit this site</a>.</p>
<p>The first thing we need to do is make a call to the SimplePie function using the feed for our spreadsheet that we determined in step #2 and store the result in an Array.</p>
<blockquote><p><code>$gsRSSArray = array(SimplePieWP('<a class="linkification-ext" title="Linkification: http://spreadsheets.google.com/feeds/cells/pYpgiAA4C958k2u5UzDJYJw/od6/public/basic?min-row=1&amp;min-col=8&amp;max-row=4&amp;max-col=8" href="http://spreadsheets.google.com/feeds/cells/pYpgiAA4C958k2u5UzDJYJw/od6/public/basic?min-row=1&amp;min-col=8&amp;max-row=4&amp;max-col=8">http://spreadsheets.google.com/feeds/cells/pYpgiAA4C958k2u5UzDJYJw/od6/public/basic?min-row=1&amp;min-col=8&amp;max-row=4&amp;max-col=8</a>', array('enable_order_by_date' =&gt; false)));</code></p></blockquote>
<p>Now we have our data in an array to be used. But I found SimplePie inserts some quirky html into the array. This includes wrapping the array in a div and putting line breaks between each array element. To eliminate this extra markup, we are going to dump the array out to a variable (one character at a time), strip some of the markup and reform an array.</p>
<p>First we clear the variable to hold all the characters</p>
<blockquote><p><code>unset ($RSSParseString);</code></p></blockquote>
<p>Then we dump the array into the variable one character at a time</p>
<blockquote><p><code>foreach ($gsRSSArray as $key=&gt;$value) { $RSSParseString = $value; }</code></p></blockquote>
<p>And then we create our new Array based on the &lt;br /&gt; markup</p>
<blockquote><p><code>$RSSParseArray = explode('&lt;br /&gt;', $RSSParseString);</code></p></blockquote>
<p>At this point, you now have an array of your data without any &lt;br /&gt; characters in it. Though a lot of different options are available for processing and use of the data, I needed to save it and display it at any given time. To do so, I stored each value in a Session Level variable and did so using a Switch Case.</p>
<blockquote><p><code>foreach ($RSSParseArray as $key=&gt;$value)<br />
switch($key) {<br />
case 1:<br />
$_SESSION['gsPrincipalDue'] = $value;<br />
break;<br />
case 2:<br />
$_SESSION['gsInterestDue'] = $value;<br />
break;<br />
case 3:<br />
$_SESSION['gsPaymentDue'] = $value;<br />
break;<br />
}</code></p></blockquote>
<p>Your first array element might have a <code>&lt;div id="simplepie"&gt;</code> in it. To eliminate that, Add this line to your first case:</p>
<blockquote><p><code>$tmp = trim(substr($value,strlen("&lt;div class='simplepie'&gt;$"), strlen($value)));</code></p></blockquote>
<p>My example data is numeric and I want to format it in a standard currency format ($X,XXX.XX). To do so in each case, store each array value in a tmp variable and add the following lines.</p>
<p>Extract the only the digits from the Array value and trim any excess characters from the string.</p>
<blockquote><p><code>$tmp = trim(substr($value,strlen("$"),strlen($value)));</code></p></blockquote>
<p>Convert the string to a number and format it to two decimal places.</p>
<blockquote><p><code>$tmp = number_format((float)$tmp,2);</code></p></blockquote>
<p>Store the result in a session variable and put a dollar sign back in front of it.</p>
<blockquote><p><code>$_SESSION['sessionVariableName'] = '$' . $tmp;</code></p></blockquote>
<p>Putting it all together and we get:</p>
<blockquote><p><code>&lt;?php<br />
$gsRSSArray = array(SimplePieWP('<span class="linkification-ext"><span class="linkification-ext"><span class="linkification-ext"><a class="linkification-ext" title="Linkification: http://spreadsheets.google.com/feeds/cells/pYpgiAA4C958k2u5UzDJYJw/od6/public/basic?min-row=1&amp;min-col=8&amp;max-row=4&amp;max-col=8" href="http://spreadsheets.google.com/feeds/cells/pYpgiAA4C958k2u5UzDJYJw/od6/public/basic?min-row=1&amp;min-col=8&amp;max-row=4&amp;max-col=8">http://spreadsheets.google.com/feeds/cells/pYpgiAA4C958k2u5UzDJYJw/od6/public/basic?min-row=1&amp;min-col=8&amp;max-row=4&amp;max-col=8</a></span></span></span>', array('enable_order_by_date' =&gt; false)));</code></p>
<p><code>unset ($RSSParseString);</code></p>
<p><code>foreach ($gsRSSArray as $key=&gt;$value) { $RSSParseString = $value; }</code></p>
<p><code>$RSSParseArray = explode('&lt;br /&gt;', $RSSParseString);</code></p>
<p><code>foreach ($RSSParseArray as $key=&gt;$value)<br />
{<br />
switch($key) {<br />
case 1:</code></p>
<p><code>$tmp = trim(substr($value,strlen("$"),strlen($value)));<br />
$tmp = number_format((float)$tmp,2);<br />
$_SESSION['gsPrincipalDue'] = '$' . $tmp;<br />
unset($tmp);<br />
break;<br />
case 2:<br />
$tmp = trim(substr($value,strlen("$"),strlen($value)));<br />
$tmp = number_format((float)$tmp,2);<br />
$_SESSION['gsInterestDue'] = '$' . $tmp;<br />
unset($tmp);<br />
break;<br />
case 3:<br />
$tmp = trim(substr($value,strlen("$"),strlen($value)));<br />
$tmp = number_format((float)$tmp,2);<br />
$_SESSION['gsPaymentDue'] = '$' . $tmp;<br />
unset($tmp);<br />
break;<br />
}<br />
}<br />
?&gt;</code></p></blockquote>
<p>You could create as many cases as cells that you are receiving through the SimplePie array and could further customize the processing steps to your liking.</p>
<p>So now that we have our Session Variables populated, what do we do with it?</p>
<h3>Step 6 &#8211; Install and Activate the PHP Execution Plugin of Your Choice</h3>
<p>Since we have our data as we want it stored in Session variables, the only thing left to do is to display the contents of each variable where needed. This will be done using a php echo command.</p>
<p>There are many methods to execute inline PHP code. I chose the <a href="http://priyadi.net/archives/2005/03/02/wordpress-php-exec-plugin/" target="_blank">PHPExec</a> plugin. The <a href="http://wordpress.org/extend/plugins/exec-php/" target="_blank">ExecPHP</a> plugin does the same thing. And <a href="http://urbangiraffe.com/plugins/sniplets/" target="_blank">Sniplets</a> are intriguing (in fact in this demo, that&#8217;s what I&#8217;m using).</p>
<p>The PHPExec code is:</p>
<blockquote><p><code>&lt;phpexec&gt;&lt;?php echo $_SESSION['YOUR VARIABLE NAME'];?&gt;&lt;/phpexec&gt;</code></p></blockquote>
<h3>The Final Result:</h3>
<blockquote>
<h4>[sniplet AmParse]</h4>
</blockquote>
<h3>So Where Do I Put this Code?</h3>
<p>What I did was create a section in the header.php in my theme and inserted the function calls there. That way each page load on my site would read and store the Spreadsheet data in the Session variables. This is overkill, but I had 7 different cells to display without wanting to generate unique code for each cell.</p>
<p>I also found that trying to build the entire thing using PHPExec was hairy at best and using the Visual Editor to compose pages would delete my code. It got to be very frustrating. ExecPHP does the same thing. There are ways around this, but I haven&#8217;t explored them fully. Storing your code in the header.php (or another template file) bypasses this code deletion. You still have to echo the Session variables and those can still disappear due to the visual editor issues, but its much simpler to recreate an echo statement than it is to recreate all of the above code.</p>
<p>While creating this demo, I discovered the Sniplets plugin. It allows you to compartmentalize your code in Sniplets. You could create a sniplet for each cell you want to work with and use their markup to return the result where you need it. For this example, I used the above code, but echoed the results instead of storing them in Session variables. The Switch Case in my Sniplet looks like this:</p>
<blockquote><p><code>switch($key) {<br />
case 1:<br />
$tmp = trim(substr($value,strlen("$"),strlen($value)));<br />
$tmp = number_format((float)$tmp,2);<br />
echo 'Principal Due: $' . $tmp . '&lt;br /&gt;';<br />
unset($tmp);<br />
break;<br />
case 2:<br />
</code><code>$tmp = trim(substr($value,strlen("$"),strlen($value)));</code><br />
<code> $tmp = number_format((float)$tmp,2);</code><br />
<code> echo 'Interest Due: $' . $tmp . '&lt;br /&gt;';</code><br />
<code> unset($tmp);</code><br />
<code>break;<br />
case 3:<br />
</code><code> </code><code> $tmp = trim(substr($value,strlen("$"),strlen($value)));<br />
</code><code> </code><code> $tmp = number_format((float)$tmp,2);<br />
</code><code> </code><code> echo 'Payment Due: $' . $tmp;<br />
</code><code> </code><code> unset($tmp);<br />
</code><code> </code><code> break;<br />
}</code></p></blockquote>
<p>Sniplets thus does a couple of things for us. First, Sniplets solves the code retention issue that PHPExec and ExecPHP have when you view a page in the visual editor as there is no php code to insert into a page or a post. This plugin also bypasses the need to store the results of each case in Session variables.</p>
<p>There might be some more upfront work to create all the Sniplets you&#8217;d need, so I&#8217;m not sure it saves any development time. Regardless of any time savings, it makes more sense to use this compartmentalized approach versus trying to force your php inline into your pages and posts and having to modify template files. I&#8217;ll be modifying my technique to use Sniplets.</p>
<p><strong>Summary</strong></p>
<p>All in all, this is a solution that works to get data from Google Spreadsheets and insert it inline into your pages and posts. It needs some refinement. I don&#8217;t claim to be a programmer, so some of the code is probably not as efficient as it could be, but it works and that&#8217;s what matters most.</p>
<p>If you have questions or would like to share ways to improve this method, please leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.marktastic.com/2008/11/how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To: Use Google Spreadsheets as a Data Source in WordPress (Part 1)</title>
		<link>http://www.marktastic.com/2008/11/how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-1/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-1</link>
		<comments>http://www.marktastic.com/2008/11/how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-1/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 15:00:54 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[google spreadsheet]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[simplepie]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.marktastic.com/?p=202</guid>
		<description><![CDATA[This is the first in a two post series that will walk you through how to insert content from Google Spreadsheets Inline into WordPress pages.
Background
Recently, I was converting a site from ASP to WordPress. This site details a mortgage loan and its amortization schedule. The amortization schedule is built with Google Spreadsheets. I found it [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first in a two post series that will walk you through how to insert content from Google Spreadsheets Inline into WordPress pages.</p>
<p><strong>Background</strong></p>
<p>Recently, I was converting a site from ASP to WordPress. This site details a mortgage loan and its amortization schedule. The amortization schedule is built with Google Spreadsheets. I found it much easier to work with the amortization data in Google Spreadsheets as opposed to storing it in a MySQL database, as I have no experience working with Databases and can do a lot more with Spreadsheets.</p>
<p>As such, I needed a way to pull data from the Google Spreadsheet and display it as needed in a given web page. In the ASP version of the site, I used a script from <a href="http://bytescout.com/" target="_blank">Bytescout</a>, which pulled data through the RSS feed of spreadsheet. This worked really well and I hoped to replicate it in WordPress.<span id="more-202"></span></p>
<p>I looked for a similar solution in the form of a wordpress plugin. I tried:</p>
<ul>
<li><a href="http://www.iconophobia.com/wordpress/?page_id=55" target="_blank">inlineRSS</a> &#8211; I ran into issues getting feed data without a barrage of errors.</li>
<li><a href="http://wordpress.org/extend/plugins/inline-google-docs/" target="_blank">Inline Google Docs</a> &#8211; I got this to work successfully, but it did more than I was looking for. It showed the entire sheet without any options to only pull in specific cells.</li>
<li><a href="http://wordpress.org/extend/plugins/inlinefeed/" target="_blank">inlineFeed</a> &#8211; I know I tried this, but it didn&#8217;t work, though I can&#8217;t remember more than that.</li>
</ul>
<p>Ultimately, none of those worked, and I was thinking I would have to start learning MySQL and become a database expert. Then I found <a href="http://simplepie.org/" target="_blank">SimplePie</a>. Keep reading for how to integrate your Google Spreadsheet data into WordPress pages.</p>
<p><img class="alignnone size-full wp-image-207" title="logo_simplepie_horizontal" src="http://www.marktastic.com/wp-content/uploads/2008/11/logo_simplepie_horizontal.png" alt="" width="180" height="45" /></p>
<h3>Step 1 &#8211; Create your spreadsheet in Google Spreadsheets</h3>
<p>For this example, I&#8217;ll be using <a href="http://spreadsheets.google.com/ccc?key=pYpgiAA4C958k2u5UzDJYJw" target="_blank">this spreadsheet</a>. You can use any Google Spreadsheet you&#8217;d like. You will need to isolate the data you are looking to return in it&#8217;s own cell. By this I mean that if you want to do some data manipulation of any of your data, store the result in its own cell. Your spreadsheet will handle the calculation, RSS will deliver the result.</p>
<h3>Step 2 &#8211; Determine the RSS Feed for your spreadsheet.</h3>
<p>After you have your sheet created to your liking, we have to figure out the feed for that spreadsheet.</p>
<p>Google uses the following format for the spreadsheet feeds:</p>
<blockquote><p><a class="linkification-ext" title="Linkification: http://spreadsheets.google.com/feeds/list/" href="http://spreadsheets.google.com/feeds/list/">http://spreadsheets.google.com/feeds/list/</a><span style="color: #ff0000;">&lt;DOCUMENT ID&gt;</span>/od6/public/basic</p></blockquote>
<p>In our example, the document ID is: pYpgiAA4C958k2u5UzDJYJw. We obtain that by looking at the address bar of our spreadsheet:</p>
<blockquote><p><a href="http://www.marktastic.com/wp-content/uploads/2008/11/spreadsheet_key.png" rel="lightbox[202]"><img class="alignnone size-full wp-image-204" title="spreadsheet_key" src="http://www.marktastic.com/wp-content/uploads/2008/11/spreadsheet_key.png" alt="" width="405" height="22" /></a></p></blockquote>
<p>To obtain specific cell data from your spreadsheet, use this format for the feed:</p>
<blockquote><p><a class="linkification-ext" title="Linkification: http://spreadsheets.google.com/feeds/" href="http://spreadsheets.google.com/feeds/">http://spreadsheets.google.com/feeds/</a><span style="color: #ff0000;"><strong>CELLS</strong></span>/&lt;DOCUMENT ID&gt;/od6/public/basic</p></blockquote>
<p>To further restrict what cells get pulled over, you can add the following variables to the feed address:</p>
<ul>
<li>min-row</li>
<li>min-col</li>
<li>max-row</li>
<li>max-col</li>
</ul>
<p>Using our example spreadsheet to obtain the values for Total Principal Due, Total Interest Due and Total Payment Due (Cells H1 to H3) through the RSS feed would be:</p>
<ul>
<li>min-row=1</li>
<li>min-col=8</li>
<li>max-row=4</li>
<li>max-col=8</li>
</ul>
<p>Putting this all together, the feed for the cells in our example is:</p>
<blockquote><p><a class="linkification-ext" title="Linkification: http://spreadsheets.google.com/feeds/cells/pYpgiAA4C958k2u5UzDJYJw/od6/public/basic?min-row=1&amp;min-col=8&amp;max-row=4&amp;max-col=8" href="http://spreadsheets.google.com/feeds/cells/pYpgiAA4C958k2u5UzDJYJw/od6/public/basic?min-row=1&amp;min-col=8&amp;max-row=4&amp;max-col=8">http://spreadsheets.google.com/feeds/cells/pYpgiAA4C958k2u5UzDJYJw/od6/public/basic?min-row=1&amp;min-col=8&amp;max-row=4&amp;max-col=8</a></p></blockquote>
<p><strong><span style="color: #ff0000;">UPDATE (4/22/09)</span></strong> &#8211; In the URL mentioned above, you see an <strong>od6</strong>. I recently added a new spreadsheet I wished to publish and had to change that to <strong>od7</strong>. Just an FYI in case you are running into problems.</p>
<h3>Step 3 &#8211; Install and Activate the <a href="http://wordpress.org/extend/plugins/simplepie-core/" target="_blank">Simple Pie Core</a> Plugin</h3>
<blockquote>
<h4>About this Plugin</h4>
<p>This plugin does absolutely nothing except load the core SimplePie library so that all other plugins that utilize SimplePie can all share the same up-to-date version. It also helps minimize potential conflicts between SimplePie-powered plugins.</p></blockquote>
<h3>Step 4 &#8211; Install and Activate the <a href="http://wordpress.org/extend/plugins/simplepie-plugin-for-wordpress/" target="_blank">Simple Pie Plugin for WordPress </a></h3>
<blockquote>
<h4>About this Plugin</h4>
<p>This is the official plugin from the SimplePie team. It relies on the <a href="http://wordpress.org/extend/plugins/simplepie-core/">SimplePie Core</a> plugin, and includes several features:</p>
<ul>
<li>A configuration pane under the Options tab in the WordPress software.</li>
<li>&#8220;Multifeeds&#8221; support (merging and sorting multiple feeds together).</li>
<li>MUCH better control over the plugin&#8217;s output.</li>
<li>Simple, easy-to-use tags for nearly every piece of data that SimplePie can output</li>
<li>Support for multiple templates</li>
<li>Global configuration of default values for several configuration options</li>
<li>Ability to override the defaults for any given feed &#8212; including giving a feed it&#8217;s own output template.</li>
<li>Ability to post-process feed data (e.g. stripping out all content except for images).</li>
<li>Support for internationalized domain names.</li>
<li>Support for short descriptions is configurable.</li>
<li>Support for PHP 4.x and 5.x.</li>
<li>And much more!</li>
</ul>
</blockquote>
<p>Both of the plugins are required to build any code using SimplePie.</p>
<p><a href="http://www.marktastic.com/2008/11/how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-2/" target="_self">Click here for Part 2!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.marktastic.com/2008/11/how-to-use-google-spreadsheets-as-a-data-source-in-wordpress-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
