<?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>Beutelevision &#187; Blogging</title>
	<atom:link href="http://beutelevision.com/blog2/topics/blogging/feed/" rel="self" type="application/rss+xml" />
	<link>http://beutelevision.com/blog2</link>
	<description>by Thomas Beutel</description>
	<lastBuildDate>Fri, 14 Oct 2011 19:13:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='beutelevision.com' port='80' path='/blog2/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Redirect from within a Wordpress admin page</title>
		<link>http://beutelevision.com/blog2/2010/03/19/redirect-from-within-wordpress-admi/</link>
		<comments>http://beutelevision.com/blog2/2010/03/19/redirect-from-within-wordpress-admi/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 04:11:01 +0000</pubDate>
		<dc:creator>Thomas Beutel</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://beutelevision.com/blog2/?p=201</guid>
		<description><![CDATA[I was trying to perform a redirect to generate a CSV file from within a Wordpress admin page using the wp_redirect( ) function, but the problem was that I would always get the dreaded &#8220;Cannot modify header information &#8211; headers already sent&#8221; message. This is because admin plugins are simply hooks that are performed within [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to perform a redirect to generate a CSV file from within a Wordpress admin page using the wp_redirect( ) function, but the problem was that I would always get the dreaded &#8220;Cannot modify header information &#8211; headers already sent&#8221; message. This is because admin plugins are simply hooks that are performed within the framework of the admin system.</p>
<p>The solution was to use a Javascript redirect. The Javascript attaches an event listener to listen for the &#8220;load&#8221; event. When the admin page is finished loading, a page containing the CSV data is loaded. That page has a Content-Type of application/csv, so it downloads immediately, leaving the admin page open (at least in Safari 4).</p>
<p>In my Wordpress admin panel (this is a fragment of a plugin):<br />
<code>   // setup Javascript redirect<br />
     $location='/wp/csv-output/?year='.$year.'&amp;month='.$month;<br />
 ?&gt;<br />
 &lt;script&gt;<br />
 function addListener(element, event, listener, bubble) {<br />
  if(element.addEventListener) {<br />
    if(typeof(bubble) == "undefined") bubble = false;<br />
    element.addEventListener(event, listener, bubble);<br />
  } else if(this.attachEvent) {<br />
    element.attachEvent("on" + event, listener);<br />
  }<br />
 }<br />
 addListener(this, "load", function() { window.location="&lt;?php echo $location ?&gt;" });<br />
 addListener(document, "load", function() { window.location="&lt;?php echo $location ?&gt;" });<br />
 &lt;/script&gt;</code><br />
And in my CSV page (again, just a fragment):<br />
<code>   ob_end_clean();<br />
   header("Content-type: application/csv");<br />
   header("Content-Disposition: attachment; filename=contact_data_$year_$month.csv");<br />
   header("Pragma: no-cache");<br />
   header("Expires: 0");</code><br />
I found the javascript code <a href="http://answers.google.com/answers/threadview?id=510976">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://beutelevision.com/blog2/2010/03/19/redirect-from-within-wordpress-admi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RSSCloud: No need to adjust your firewall</title>
		<link>http://beutelevision.com/blog2/2009/09/08/rsscloud-no-need-to-adjust-your-firewall/</link>
		<comments>http://beutelevision.com/blog2/2009/09/08/rsscloud-no-need-to-adjust-your-firewall/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 05:01:59 +0000</pubDate>
		<dc:creator>Thomas Beutel</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[rsscloud]]></category>

		<guid isPermaLink="false">http://beutelevision.com/blog2/?p=173</guid>
		<description><![CDATA[I&#8217;ve been following the recent development of RSSCloud with interest&#8230; I think it has the potential to replace Twitter in the long term, although I suspect that Twitter might also evolve in the direction of RSSCloud.
One misconception about RSSCloud is the supposed need for the cloud to notify the desktop or mobile reader of an [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been following the recent development of <a href="http://rsscloud.org">RSSCloud</a> with interest&#8230; I think it has the potential to replace Twitter in the long term, although I suspect that Twitter might also evolve in the direction of RSSCloud.</p>
<p>One misconception about RSSCloud is the supposed need for the cloud to notify the desktop or mobile reader of an update. This would seem to mean that you would have to adjust your firewall to accept inbound connections to your computer/mobile device.</p>
<p>While the <a href="http://rsscloud.org/walkthrough.html">implementor&#8217;s guide</a> shows that the cloud does notify the aggregator, the aggregator doesn&#8217;t have to be the same as the reader. As the guide <a href="http://rsscloud.org/walkthrough.html#theAggregator">suggests</a>, the aggregator can also be in the cloud, with the reader opening an outbound connection to the aggregator, in the same way AIM or Skype or Jabber clients do, using protocols like XMPP. No need to adjust your firewall.</p>
<p>For that matter, Twitter clients do the same thing, using <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-friends_timeline">HTTP REST calls</a>. The only difference is Twitter limits the number of <a href="http://apiwiki.twitter.com/Rate-limiting">API calls per hour</a> (currently 150 requests per hour, or 2.5 requests per min&#8211;close enough to realtime for me), while there are no limits with XMPP. The tradeoff is arguably one of simplicity &#8211; is your client easier to implement with one or the other?</p>
<p>Hopefully the folks working on RSSCloud are developing an example of a cloud aggregator and an associated protocol. My vote would be for the protocol to be REST-based, but I could be convinced otherwise.</p>
]]></content:encoded>
			<wfw:commentRss>http://beutelevision.com/blog2/2009/09/08/rsscloud-no-need-to-adjust-your-firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Write the Damn Book!</title>
		<link>http://beutelevision.com/blog2/2008/09/12/write-the-damn-book/</link>
		<comments>http://beutelevision.com/blog2/2008/09/12/write-the-damn-book/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 19:20:10 +0000</pubDate>
		<dc:creator>Thomas Beutel</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Writing]]></category>

		<guid isPermaLink="false">http://beutelevision.com/blog2/?p=110</guid>
		<description><![CDATA[My friend Mary Reynolds Thompson hosts teleclasses on writing at WriteTheDamnBook.com. Mary&#8217;s coaching has helped many writers actually finish the book that they started. 
Coming up is a teleclass on blogging by expert blogger Britt Bravo, creator of the Changeblogger Network. Blogging has become an important element of writing books. Some writers even field test [...]]]></description>
			<content:encoded><![CDATA[<p>My friend Mary Reynolds Thompson hosts <a href="http://www.writethedamnbook.com/teleclass.html">teleclasses on writing</a> at <a href="http://www.writethedamnbook.com">WriteTheDamnBook.com</a>. Mary&#8217;s coaching has helped many writers actually finish the book that they started. </p>
<p>Coming up is a teleclass on blogging by expert blogger Britt Bravo, creator of the <a href="http://changeblogger.ning.com/">Changeblogger Network</a>. Blogging has become an important element of writing books. Some writers even field test their work with their blog readers and find that by tapping their reader&#8217;s extensive wisdom, they can reinforce their writing with more information and better examples.</p>
]]></content:encoded>
			<wfw:commentRss>http://beutelevision.com/blog2/2008/09/12/write-the-damn-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

