<?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>Chris Schuld&#039;s Blog &#187; Web Development</title>
	<atom:link href="http://chrisschuld.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisschuld.com</link>
	<description>personal musings on the composition of software</description>
	<lastBuildDate>Mon, 30 Aug 2010 03:48:50 +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>The non-breakable Dash / Hyphen</title>
		<link>http://chrisschuld.com/2010/02/the-non-breakable-dash-hyphen/</link>
		<comments>http://chrisschuld.com/2010/02/the-non-breakable-dash-hyphen/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 03:21:40 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=313</guid>
		<description><![CDATA[In HTML you may find that the dash / hyphen character is a breakable character and if you are attempting to create a region where line breaking is not desired you may need a non-breakable space character. Here it is: &#38;#8209;]]></description>
			<content:encoded><![CDATA[<p>In HTML you may find that the dash / hyphen character is a breakable character and if you are attempting to create a region where line breaking is not desired you may need a non-breakable space character.</p>
<p><strong>Here it is:  &amp;#8209;</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2010/02/the-non-breakable-dash-hyphen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing everything BUT Images in a WordPress Post</title>
		<link>http://chrisschuld.com/2009/11/removing-everything-but-images-in-a-wordpress-post/</link>
		<comments>http://chrisschuld.com/2009/11/removing-everything-but-images-in-a-wordpress-post/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 20:58:45 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=287</guid>
		<description><![CDATA[A while back I wrote an article on Removing Images from a WordPress Post. Sebastian asked an interesting question; he wanted to remove everything but the images. This is actually pretty straightforward; here is how you do it: &#160; . . . &#60;?php $beforeEachImage = &#34;&#60;div&#62;&#34;; $afterEachImage = &#34;&#60;/div&#62;&#34;; preg_match_all&#40;&#34;/(&#60;img [^&#62;]*&#62;)/&#34;,get_the_content&#40;&#41;,$matches,PREG_PATTERN_ORDER&#41;; for&#40; $i=0; isset&#40;$matches&#91;1&#93;&#41; &#38;&#38; [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I wrote an article on <a href="http://chrisschuld.com/2008/08/removing-images-from-a-wordpress-post/">Removing Images from a WordPress</a> Post.  Sebastian asked an interesting question; he wanted to remove everything but the images.  This is actually pretty straightforward; here is how you do it:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
.
.
.
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
           <span style="color: #000088;">$beforeEachImage</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;div&gt;&quot;</span><span style="color: #339933;">;</span>
           <span style="color: #000088;">$afterEachImage</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
           <span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/(&lt;img [^&gt;]*&gt;)/&quot;</span><span style="color: #339933;">,</span>get_the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #000088;">$matches</span><span style="color: #339933;">,</span>PREG_PATTERN_ORDER<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
           <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                 <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$beforeEachImage</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$matches</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$afterEachImage</span><span style="color: #339933;">;</span>
           <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
.
.
.</pre></div></div>

<p>Keep in mind this code needs to be in the <a href="http://codex.wordpress.org/The_Loop">WordPress Loop</a> and you can control what is around each image using the variables <strong>beforeEachImage</strong> and <strong>afterEachImage</strong> above.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/11/removing-everything-but-images-in-a-wordpress-post/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Browser.php updated to v1.6</title>
		<link>http://chrisschuld.com/2009/11/browser-php-updated-to-v1-6/</link>
		<comments>http://chrisschuld.com/2009/11/browser-php-updated-to-v1-6/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 18:04:56 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=284</guid>
		<description><![CDATA[Version 1.6 of Browser.php has been released with a lot of updates: http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/]]></description>
			<content:encoded><![CDATA[<p>Version 1.6 of Browser.php has been released with a lot of updates: <a href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/">http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/11/browser-php-updated-to-v1-6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Opera 10&#8242;s User Agent</title>
		<link>http://chrisschuld.com/2009/11/opera-10s-user-agent/</link>
		<comments>http://chrisschuld.com/2009/11/opera-10s-user-agent/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 17:10:01 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=278</guid>
		<description><![CDATA[For those of you who detect Opera 10&#8242;s user agent, the Opera team has provide some &#8220;fun&#8221; for all of us. In my Browser project I started getting feedback that it was broken. At the 10,000&#8242; level, it was defintely broken because the Browser project was returning version 9.8 for Opera version 10. This is [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who detect Opera 10&#8242;s user agent, the Opera team has provide some &#8220;fun&#8221; for all of us.  In my B<a href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/">rowser project</a> I started getting feedback that it was broken.  At the 10,000&#8242; level, it was defintely broken because the <a href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/">Browser project</a> was returning version 9.8 for Opera version 10.</p>
<p>This is because the Opera dev team decided to leave the version 9.8 user agent string the same and tack on version 10 to end of the string.  You can <a href="http://dev.opera.com/articles/view/opera-ua-string-changes/">read more about it on their blog</a>.</p>
<p>For those of you using my <a href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/">Browser project</a> have no fear; the new version (1.6+) handles the oddity!</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/11/opera-10s-user-agent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving a WordPress Install from one Domain (A) to another Domain (B)</title>
		<link>http://chrisschuld.com/2009/10/moving-a-wordpress-install-from-one-domain-a-to-another-domain-b/</link>
		<comments>http://chrisschuld.com/2009/10/moving-a-wordpress-install-from-one-domain-a-to-another-domain-b/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 18:07:22 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=266</guid>
		<description><![CDATA[From time to time I had have to move one installation of WordPress from one domain (let&#8217;s call it domain A) to a new domain (let&#8217;s call it domain B). Because WordPress embeds the domain all over the data schema (not faulting; simply disclosing) you have to make a lot of dB changes for the [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time I had have to move one installation of WordPress from one domain (<em>let&#8217;s call it domain A</em>) to a new domain (<em>let&#8217;s call it domain B</em>).  Because WordPress embeds the domain all over the data schema (not faulting; simply disclosing) you have to make a lot of dB changes for the updated site location to function.  Here is the quick and dirty way to move the data:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> post_content <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>post_content<span style="color: #66cc66;">,</span><span style="color: #ff0000;">&quot;[OLD_DOMAIN]&quot;</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">&quot;[NEW_DOMAIN]&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_posts <span style="color: #993333; font-weight: bold;">SET</span> guid <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>guid<span style="color: #66cc66;">,</span><span style="color: #ff0000;">&quot;[OLD_DOMAIN]&quot;</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">&quot;[NEW_DOMAIN]&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_options <span style="color: #993333; font-weight: bold;">SET</span> option_value <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>option_value<span style="color: #66cc66;">,</span><span style="color: #ff0000;">&quot;[OLD_DOMAIN]&quot;</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">&quot;[NEW_DOMAIN]&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">UPDATE</span> wp_postmeta <span style="color: #993333; font-weight: bold;">SET</span> meta_value <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>meta_value<span style="color: #66cc66;">,</span><span style="color: #ff0000;">&quot;[OLD_DOMAIN]&quot;</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">&quot;[NEW_DOMAIN]&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Finally, for the final bit of trickery if you are using <a href="http://wordpress.org/extend/plugins/wp-super-cache/">Advanced Caching</a> on the site there is a great place where the localized PATH is hard coded.  Edit your new and updated path on file <strong>advanced-cache.php</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> wp-content<span style="color: #000000; font-weight: bold;">/</span>advanced-cache.php</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/10/moving-a-wordpress-install-from-one-domain-a-to-another-domain-b/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Browser.php updated to v1.5</title>
		<link>http://chrisschuld.com/2009/04/browserphp-updated-to-v15/</link>
		<comments>http://chrisschuld.com/2009/04/browserphp-updated-to-v15/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 15:52:28 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=236</guid>
		<description><![CDATA[In the Browser.php project John pointed out (in the comments) a terrible typo in the source. I imagine no one has encountered this before as it only effects v1 or v1.5 of Internet Explorer. Typo updated and version 1.5 of Browser.php released: http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/]]></description>
			<content:encoded><![CDATA[<p>In the Browser.php project John pointed out (<em>in the comments</em>) a terrible typo in the source.  I imagine no one has encountered this before as  it only effects v1 or v1.5 of Internet Explorer.</p>
<p>Typo updated and version 1.5 of Browser.php released: <a href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/">http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/04/browserphp-updated-to-v15/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Removing Images in a WordPress Post (Revisited)</title>
		<link>http://chrisschuld.com/2009/04/removing-images-in-a-wordpress-post-revisited/</link>
		<comments>http://chrisschuld.com/2009/04/removing-images-in-a-wordpress-post-revisited/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 06:17:47 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=230</guid>
		<description><![CDATA[A while back I wrote a semi-popular post on removing images from a WordPress post &#8212; today I am revisiting it. The original solution used the_content() and the output buffer to remove the images out of the post. Now that I have used WordPress a bit longer and candidly had to use the solution again [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I wrote a semi-popular post on <a href="http://chrisschuld.com/2008/08/removing-images-from-a-wordpress-post/">removing images from a WordPress post</a> &#8212; today I am revisiting it.  The original solution used <a href="http://codex.wordpress.org/Template_Tags/the_content">the_content()</a> and the <a href="http://us2.php.net/outcontrol">output buffer</a> to remove the images out of the post.  Now that I have used <a href="http://wordpress.org/">WordPress</a> a bit longer and candidly had to use the solution again and thought &#8220;<em>what was I thinking</em>&#8221; I thought I would share the cleaner solution:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/&amp;lt;img[^&amp;gt;]+./'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>get_the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/04/removing-images-in-a-wordpress-post-revisited/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Browser.php updated to v1.4</title>
		<link>http://chrisschuld.com/2009/04/browserphp-updated-to-v1-4/</link>
		<comments>http://chrisschuld.com/2009/04/browserphp-updated-to-v1-4/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 16:57:28 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=228</guid>
		<description><![CDATA[I released v1.4 of the Browser.php project today to address a few features suggested by readers. This new release adds support for GoogleBot, Yahoo! Slurp, and the W3C Validator. Check out version 1.4: http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/]]></description>
			<content:encoded><![CDATA[<p>I released v1.4 of the Browser.php project today to address a few features suggested by readers.  This new release adds support for <a href="http://en.wikipedia.org/wiki/Googlebot">GoogleBot</a>, <a href="http://help.yahoo.com/l/us/yahoo/search/webcrawler/">Yahoo! Slurp</a>, and the <a href="http://validator.w3.org/">W3C Validator</a>.</p>
<p>Check out version 1.4: <a href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/">http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/04/browserphp-updated-to-v1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser.php updated to v1.3</title>
		<link>http://chrisschuld.com/2009/03/browser-php-updated-to-v1-3/</link>
		<comments>http://chrisschuld.com/2009/03/browser-php-updated-to-v1-3/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 16:28:03 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=221</guid>
		<description><![CDATA[Based on a comment on the Browser.php page I added support for the iPod today. I opted to place both the iPhone and iPod as browsers even though they are likely using the same instance of Safari. Additionally I added support for the iPod and iPhone as platforms. Thanks for the comments; enjoy!]]></description>
			<content:encoded><![CDATA[<p>Based on a comment on the <a href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/">Browser.php</a> page I added support for the iPod today.  I opted to place both the iPhone and iPod as browsers even though they are likely using the same instance of Safari.  Additionally I added support for the iPod and iPhone as platforms.  Thanks for the comments; enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2009/03/browser-php-updated-to-v1-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Browser.php to version 1.2</title>
		<link>http://chrisschuld.com/2008/12/updated-browserphp-to-version-12/</link>
		<comments>http://chrisschuld.com/2008/12/updated-browserphp-to-version-12/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 14:45:42 +0000</pubDate>
		<dc:creator>Chris Schuld</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://chrisschuld.com/?p=187</guid>
		<description><![CDATA[The browser detection project in php (Browser.php) has been updated to version 1.2 based on suggestions I received in the comments. The new version is available for download in the project pages. Thanks to all those who have emailed and commented on the script.]]></description>
			<content:encoded><![CDATA[<p>The browser detection project in php (<a href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/">Browser.php</a>) has been updated to version 1.2 based on suggestions I received in the comments.  The new version is <a href="http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/">available for download</a> in the project pages.</p>
<p>Thanks to all those who have emailed and commented on the script.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisschuld.com/2008/12/updated-browserphp-to-version-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
