<?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>Pressible Development &#187; Eric Buth</title>
	<atom:link href="http://development.pressible.org/author/eric/feed" rel="self" type="application/rss+xml" />
	<link>http://development.pressible.org</link>
	<description>The design, code, and so on of the Pressible developers.</description>
	<lastBuildDate>Thu, 02 Sep 2010 19:21:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Symlink Fix for the XML Sitemap Feed Plugin</title>
		<link>http://development.pressible.org/eric/xml-sitemap-feed-plugin</link>
		<comments>http://development.pressible.org/eric/xml-sitemap-feed-plugin#comments</comments>
		<pubDate>Thu, 04 Feb 2010 20:28:03 +0000</pubDate>
		<dc:creator>Eric Buth</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[feeds]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[symlinks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[XML sitemap]]></category>
		<category><![CDATA[__FILE__]]></category>

		<guid isPermaLink="false">http://development.pressible.org/?p=106</guid>
		<description><![CDATA[I posted a fix for RavanH&#8216;s XML Sitemap Feed plugin that allows it to function behind symlinks and thus be deployed via Capistrano. The change is minor, and the modified code is up on GitHub. For further explanation of the problem, check out this previous post: Problems Detecting WordPress MU in Plugins with PHP’s __FILE__.]]></description>
			<content:encoded><![CDATA[<p>I posted a fix for <a title="RavanH on WordPress.org" href="http://wordpress.org/extend/plugins/profile/ravanh" target="_self">RavanH</a>&#8216;s <a title="XML Sitemap Feed on WordPress.org" href="http://wordpress.org/extend/plugins/xml-sitemap-feed/" target="_self">XML Sitemap Feed</a> plugin that allows it to function behind symlinks and thus be deployed via <a title="Capistrano" href="http://www.capify.org/index.php/Capistrano" target="_self">Capistrano</a>. The change is minor, and the modified code is <a title="xml-sitemap-feed on GitHub" href="http://github.com/edlab/xml-sitemap-feed" target="_self">up on GitHub</a>. For further explanation of the problem, check out this previous post: <a title="http://development.pressible.org/eric/detecting-wpmu" href="Problems Detecting WordPress MU in Plugins with PHP’s __FILE__" target="_self">Problems Detecting WordPress MU in Plugins with PHP’s __FILE__</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://development.pressible.org/eric/xml-sitemap-feed-plugin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video</title>
		<link>http://development.pressible.org/eric/video</link>
		<comments>http://development.pressible.org/eric/video#comments</comments>
		<pubDate>Fri, 15 Jan 2010 20:39:27 +0000</pubDate>
		<dc:creator>Eric Buth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[pressible test]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://edlab.pressible.org/?p=106</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="600" height="475"><param name="movie" value="http://www.youtube.com/v/xvT64nK0Raw&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/xvT64nK0Raw&#038;fs=1" type="application/x-shockwave-flash" width="600" height="475" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><object width="600" height="338"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7671867&#038;server=vimeo.com&#038;show_title=1&#038;show_byline=1&#038;show_portrait=1&#038;color=00ADEF&#038;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=7671867&#038;server=vimeo.com&#038;show_title=1&#038;show_byline=1&#038;show_portrait=1&#038;color=00ADEF&#038;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="600" height="338"></embed></object></p>
<p><embed src="http://blip.tv/play/hJgggb3ZCAI" type="application/x-shockwave-flash" width="480" height="235" allowscriptaccess="always" allowfullscreen="true"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://development.pressible.org/eric/video/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ignite Talk at WordCamp Boston 2010</title>
		<link>http://development.pressible.org/eric/ignite-wordcamp-boston-2010</link>
		<comments>http://development.pressible.org/eric/ignite-wordcamp-boston-2010#comments</comments>
		<pubDate>Wed, 13 Jan 2010 19:00:20 +0000</pubDate>
		<dc:creator>Eric Buth</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Boston]]></category>
		<category><![CDATA[Ignite]]></category>
		<category><![CDATA[WordCamp]]></category>
		<category><![CDATA[WordCamp Boston]]></category>

		<guid isPermaLink="false">http://development.pressible.org/?p=88</guid>
		<description><![CDATA[The votes are in, and it looks like I&#8217;m going to get to give a presentation as part of WordCamp Boston&#8216;s Ignite event. Thanks to all who voted! The proposal I gave the organizers: “Yo dawg, I heard you like publishing platforms…” Originally described in 4-year-old post on the Daily WTF, the “inner-platform effect” was [...]]]></description>
			<content:encoded><![CDATA[<p>The <a title="Vote now for Ignite WordCamp!" href="http://wordcampboston.com/2010/01/11/vote-now-for-ignite-wordcamp/" target="_self">votes</a> are <a title="The Inaugural Ignite WordCamp Lineup" href="http://wordcampboston.com/2010/01/13/the-inaugural-ignite-wordcamp-lineup/" target="_self">in</a>, and it looks like I&#8217;m going to get to give a presentation as part of <a title="WordCamp Boston 2010" href="http://wordcampboston.com/">WordCamp Boston</a>&#8216;s <a title="Ignite WordCamp" href="http://wordcampboston.com/program/ignite/">Ignite event</a>. Thanks to all who voted!</p>
<p>The proposal I gave the organizers:</p>
<blockquote><p><strong>“Yo dawg, I heard you like publishing platforms…”</strong></p>
<p>Originally described in 4-year-old post on the Daily WTF, the “inner-platform effect” was extremely well captured by the Xzibit “Yo Dawg” meme of this past year. The WordPress community (and really all developers) are constantly struggling with Pimp-My-Ride-type over integration problems. This is a 5 minute intervention for the plugin writers and platform builders among us.</p></blockquote>
<p>I&#8217;ll post the slides once I have them, which might not be until the day of the event.</p>
]]></content:encoded>
			<wfw:commentRss>http://development.pressible.org/eric/ignite-wordcamp-boston-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problems Detecting WordPress MU in Plugins with PHP&#8217;s __FILE__</title>
		<link>http://development.pressible.org/eric/detecting-wpmu</link>
		<comments>http://development.pressible.org/eric/detecting-wpmu#comments</comments>
		<pubDate>Tue, 05 Jan 2010 16:43:34 +0000</pubDate>
		<dc:creator>Eric Buth</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[reCAPTCHA]]></category>
		<category><![CDATA[symlinks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[WPMU]]></category>
		<category><![CDATA[__FILE__]]></category>

		<guid isPermaLink="false">http://development.pressible.org/?p=23</guid>
		<description><![CDATA[I&#8217;m a fan of symlink-type deployment scripts such as Capistrano, which is in heavy use in Pressible. It&#8217;s not perfect, but it&#8217;s how we deploy most of our non-MU code (plugins, themes, etc.). The basic premise of these scripts is that code is copied from your SCM system into a staging directory, and once everything [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a fan of symlink-type deployment scripts such as <a href="http://www.capify.org/index.php/Capistrano">Capistrano</a>, which is in heavy use in <a href="http://pressible.org">Pressible</a>. It&#8217;s not perfect, but it&#8217;s how we deploy most of our non-MU code (plugins, themes, etc.). The basic premise of these scripts is that code is copied from your SCM system into a staging directory, and once everything checks out, a symlink is replaced to make the new code active. Any web server pointed at said code will then always be accessing a path that includes at least one symlink.</p>
<p>If you are using such a script, problems can arise in PHP when using the magical constant <code>__FILE__</code>, which reports the absolute path to the current file. <code>__FILE__</code> will actually contain the &#8220;true&#8221; location of the file regardless of whether or not it was accessed via a symlink. (There is some discussion about whether or not this is a bug or a feature of PHP.)</p>
<p>For many applications in WordPress this isn&#8217;t terribly consequential. The important exception is plugins that need to detect whether or not they are running as a site-wide plugin under WordPress MU. One common method of doing that is the following (taken from the <a href="http://wordpress.org/extend/plugins/wp-recaptcha/">WP reCAPTCHA</a> plugin):</p>
<pre>if (basename(dirname(__FILE__)) == "mu-plugins")</pre>
<p>The plugin expects wp_recaptcha.php to be at the root level of your mu-plugins directory and therefore that <code>dirname(__FILE__)</code> will return the MU-identifying information. The problem is that if wp_recaptcha.php is a symlink to a deploy location, this method becomes unreliable. For instance, we might have deployed our version of the plugin to <code>/deploy/wp_recaptcha/current/wp_recaptcha.php</code></p>
<p>The solution is to avoid using <code>__FILE__</code> for this purpose until it is &#8220;fixed&#8221;. A workaround that we came up with is to use the following conditional instead:</p>
<pre>if(is_dir(WP_CONTENT_DIR . '/mu-plugins'))</pre>
<p>After determining that MU is running the plugin, you can check if it is installed site-wide with the following additional check:</p>
<pre>if(is_file(WP_CONTENT_DIR . '/mu-plugins/wp_recaptcha.php'))</pre>
<p>If you know of a simpler or faster way we&#8217;d be very interested in hearing about it, as we perform this check at the beginning of almost all of the plugins we use. Much of this may not be necessary once MU is phased out in WordPress 3.0, so this is probably good enough for the time being; still, I&#8217;d rather not have to check two files at startup if at all possible.</p>
<p>Our fork of the WP reCAPTCHA plugin that contains this fix is over at <a href="http://github.com/edlab/wp-recaptcha">GitHub</a> and has since been pulled into <a href="http://github.com/blaenk/wp-recaptcha/">the repository of record</a>. <a href="http://github.com/blaenk">Blaenk Denum</a>, the developer managing the plugin, has said he&#8217;s working on refactoring the whole thing, so again this is just a temporary fix.</p>
]]></content:encoded>
			<wfw:commentRss>http://development.pressible.org/eric/detecting-wpmu/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UMW Secrets</title>
		<link>http://development.pressible.org/eric/umw-secrets</link>
		<comments>http://development.pressible.org/eric/umw-secrets#comments</comments>
		<pubDate>Fri, 20 Nov 2009 20:42:58 +0000</pubDate>
		<dc:creator>Eric Buth</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PostSecret]]></category>
		<category><![CDATA[UWM]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://pressible.org/edlab/?p=16</guid>
		<description><![CDATA[One of the sites in the UWM WordPress set is a PostSecret-style blog.]]></description>
			<content:encoded><![CDATA[<p>One of the sites in the UWM WordPress set is a <a href="http://secret.umwblogs.org/">PostSecret-style blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://development.pressible.org/eric/umw-secrets/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
