<?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 Bratlien</title>
	<atom:link href="http://chrisbratlien.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisbratlien.com</link>
	<description>writes code (so you don&#039;t have to)</description>
	<lastBuildDate>Thu, 29 Jul 2010 01:06:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>DJ Cobra</title>
		<link>http://chrisbratlien.com/2010/07/28/dj-cobra/</link>
		<comments>http://chrisbratlien.com/2010/07/28/dj-cobra/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 01:04:21 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Hidden]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=574</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[
]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2010/07/28/dj-cobra/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<postDateGMT>2010-07-29 01:04:21</postDateGMT>
	</item>
		<item>
		<title>Code Snippets</title>
		<link>http://chrisbratlien.com/2010/06/19/code-snippets/</link>
		<comments>http://chrisbratlien.com/2010/06/19/code-snippets/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 04:24:02 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Hidden]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=551</guid>
		<description><![CDATA[Not sure if something like this already exists in WP function get_post_ids_satisfying_taxonomy_terms&#40;$taxterms&#41; &#123; &#160; $first_pass = true; &#160; foreach&#40;$taxterms as $taxonomy =&#62; $term_slug&#41; &#123; $the_term = get_term_by&#40;'slug',$term_slug,$taxonomy&#41;; //pp($the_term); $object_ids = get_objects_in_term&#40;$the_term-&#62;term_id,Array&#40;$taxonomy&#41;&#41;; &#160; if &#40;$first_pass&#41; &#123; $results = $object_ids; $first_pass = false; &#125; else &#123; //accumulate the post ids which satisfy all taxonomy =&#62; term pairs [...]]]></description>
			<content:encoded><![CDATA[<p>Not sure if something like this already exists in WP</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> get_post_ids_satisfying_taxonomy_terms<span style="color: #009900;">&#40;</span><span style="color: #000088;">$taxterms</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000088;">$first_pass</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$taxterms</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$taxonomy</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$term_slug</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$the_term</span> <span style="color: #339933;">=</span> get_term_by<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'slug'</span><span style="color: #339933;">,</span><span style="color: #000088;">$term_slug</span><span style="color: #339933;">,</span><span style="color: #000088;">$taxonomy</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">//pp($the_term);</span>
    <span style="color: #000088;">$object_ids</span> <span style="color: #339933;">=</span> get_objects_in_term<span style="color: #009900;">&#40;</span><span style="color: #000088;">$the_term</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">term_id</span><span style="color: #339933;">,</span><span style="color: #990000;">Array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$taxonomy</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$first_pass</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$object_ids</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$first_pass</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>    <span style="color: #666666; font-style: italic;">//accumulate the post ids which satisfy all taxonomy =&gt; term pairs (AND, not OR)</span>
      <span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_intersect</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$results</span><span style="color: #339933;">,</span><span style="color: #000088;">$object_ids</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
  <span style="color: #000088;">$results</span> <span style="color: #339933;">=</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$results</span><span style="color: #009900;">&#41;</span> ? <span style="color: #990000;">Array</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$results</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//the post__in query_var gets ignored on an empty array, so return an invalid post id in an array</span>
&nbsp;
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$results</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This snippet will change all categories above 3 to be sub-categories of 3</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span>ABSPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'wp-admin/includes/taxonomy.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    pp<span style="color: #009900;">&#40;</span>get_categories<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'hide_empty=0'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span>get_categories<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'hide_empty=0'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$c</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">term_id</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>      
        <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> wp_insert_category<span style="color: #009900;">&#40;</span>
          <span style="color: #990000;">Array</span><span style="color: #009900;">&#40;</span>
          <span style="color: #0000ff;">'cat_ID'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$c</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">term_id</span><span style="color: #339933;">,</span>
          <span style="color: #0000ff;">'category_parent'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span>
          <span style="color: #0000ff;">'cat_name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$c</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">name</span>
          <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        pp<span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2010/06/19/code-snippets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<postDateGMT>2010-06-20 04:24:02</postDateGMT>
	</item>
		<item>
		<title>WordPress plugin: Query Tester</title>
		<link>http://chrisbratlien.com/2010/05/26/wordpress-plugin-query-tester/</link>
		<comments>http://chrisbratlien.com/2010/05/26/wordpress-plugin-query-tester/#comments</comments>
		<pubDate>Wed, 26 May 2010 14:07:13 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=544</guid>
		<description><![CDATA[@fienen came up with a good idea for a WordPress plugin today. He wants to be able to type in a sample parameter string for query_posts and see which posts will result, given that string. I decided that&#8217;s something I want too so I don&#8217;t have to hack up a template on the fly if [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/fienen">@fienen</a> came up with a good idea for a WordPress plugin today. He wants to be able to type in a sample parameter string for query_posts and see which posts will result, given that string. I decided that&#8217;s something I want too so I don&#8217;t have to hack up a template on the fly if I don&#8217;t want to.</p>
<p>Here&#8217;s a quick and dirty plugin which should do the trick. It installs itself into Dashboard > Settings > Query Tester<br />
<a href='http://chrisbratlien.com/wp-content/uploads/2010/05/query-tester.zip'>query-tester</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2010/05/26/wordpress-plugin-query-tester/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<postDateGMT>2010-05-26 14:07:13</postDateGMT>
	</item>
		<item>
		<title>Prettier PHP Debug Messages</title>
		<link>http://chrisbratlien.com/2010/05/20/prettier-php-debug-messages/</link>
		<comments>http://chrisbratlien.com/2010/05/20/prettier-php-debug-messages/#comments</comments>
		<pubDate>Fri, 21 May 2010 04:30:45 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=495</guid>
		<description><![CDATA[(prettier than what I&#8217;ve been doing, at least) Hmm, let&#8217;s see. Trying to figure out a bug in my WordPress template. I need to know what the current post looks like. So I&#8217;ll go to the template and put in print_r&#40;$post&#41;; which produces That&#8217;s helpful, but a little hard to read. So let&#8217;s create a [...]]]></description>
			<content:encoded><![CDATA[<p>(prettier than what I&#8217;ve been doing, at least)</p>
<p>Hmm, let&#8217;s see. Trying to figure out a bug in my WordPress template. I need to know what the current post looks like. So I&#8217;ll go to the template and put in</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>which produces</p>
<p><a href="http://chrisbratlien.com/wp-content/uploads/2010/05/Picture-21.png" rel="lightbox[495]"><img src="http://chrisbratlien.com/wp-content/uploads/2010/05/Picture-21-300x156.png" alt="" title="Picture 21" width="300" height="156" class="alignnone size-medium wp-image-519" /></a></p>
<p>That&#8217;s helpful, but a little hard to read. So let&#8217;s create a Pretty Print function and put some preformat tags around the output.</p>
<p>(in my theme&#8217;s functions.php)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pp'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">function</span> pp<span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;pre&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/pre&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And so now if I call this in my template</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  pp<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>we get</p>
<p><a href="http://chrisbratlien.com/wp-content/uploads/2010/05/Picture-23.png" rel="lightbox[495]"><img src="http://chrisbratlien.com/wp-content/uploads/2010/05/Picture-23-300x281.png" alt="" title="Picture 23" width="300" height="281" class="alignnone size-medium wp-image-520" /></a></p>
<p>A little better. So that&#8217;s been my Pretty Print function for quite a while. But sometimes the debug messages are unreadable due to their position in the template where I call pp(). Maybe there are theme colors hiding the messages, or possibly an overflow: hidden CSS rule blocks some of them. </p>
<p>So I decided to make another version which will collect all of the calls to pp() and put them in one visible spot. It will allow scrolling, and CSS styling.</p>
<p>(in my theme&#8217;s functions.php)</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;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pp'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">function</span> pp<span style="color: #009900;">&#40;</span><span style="color: #000088;">$obj</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
    <span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$obj</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">true</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>
    &lt;script type=&quot;text/javascript&quot;&gt;
      var obj = <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$data</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>;
      var logger = document.getElementById('bsdLogger');
      if (!logger) {
        logger = document.createElement('div');
        logger.id = 'bsdLogger';
        document.body.appendChild(logger);
      }
      ////console.log(obj);
      var pre = document.createElement('pre');
      pre.innerHTML = obj;
      logger.appendChild(pre);
    &lt;/script&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>So now in my template, I debug all sorts of nonsense</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> the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> pp<span style="color: #009900;">&#40;</span><span style="color: #990000;">Array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'apples'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'oranges'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            pp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'HAHA'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">?&gt;</span>
            &lt;table style=&quot;border: 2px solid red;&quot;&gt;
              &lt;tr&gt;&lt;td&gt;What's this?&lt;/td&gt;&lt;td&gt;a table in the middle of nowhere?&lt;/td&gt;&lt;/tr&gt;
            &lt;/table&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span>
            pp<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Mix with some CSS to taste and you get</p>
<p><a href="http://chrisbratlien.com/wp-content/uploads/2010/05/Picture-25.png" rel="lightbox[495]"><img src="http://chrisbratlien.com/wp-content/uploads/2010/05/Picture-25-300x268.png" alt="" title="Picture 25" width="300" height="268" class="alignnone size-medium wp-image-521" /></a><br />
Notice that even though there&#8217;s a random table happening between debug calls, the debug messages still gather into their designated spot.</p>
<p>I think I&#8217;ll see how that suits me for a while. True, it obscures part of the content, but if I&#8217;m asking for a debug message in the first place, that&#8217;s primarily what I want to see. When I remove the pp() calls in the code, the message box goes away again.</p>
<p>If there are better ways of doing this, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2010/05/20/prettier-php-debug-messages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<postDateGMT>2010-05-21 04:30:45</postDateGMT>
	</item>
		<item>
		<title>Relative Site URL on Content Save</title>
		<link>http://chrisbratlien.com/2010/05/16/relative-site-url-on-content-save/</link>
		<comments>http://chrisbratlien.com/2010/05/16/relative-site-url-on-content-save/#comments</comments>
		<pubDate>Sun, 16 May 2010 05:48:09 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=481</guid>
		<description><![CDATA[Another post for WordPress admins, building on an earlier WordPress Tip: Bloginfo as a Shortcode Having a shortcode is great, but why not automate the insertion of the shortcode into the content box? That&#8217;s what I&#8217;ve done here. (To use this code, add it to your theme&#8217;s functions.php file) function bsdrelative_content_replace_url&#40;$content&#41; &#123; return str_replace&#40;get_bloginfo&#40;'url'&#41;,'',$content&#41;; &#125; [...]]]></description>
			<content:encoded><![CDATA[<p>Another post for WordPress admins, building on an earlier <a href="http://chrisbratlien.com/2010/02/23/wordpress-tip-bloginfo-as-a-shortcode/">WordPress Tip: Bloginfo as a Shortcode</a></p>
<p>Having a shortcode is great, but why not automate the insertion of the shortcode into the content box? That&#8217;s what I&#8217;ve done here.</p>
<p>(To use this code, add it to your theme&#8217;s functions.php file)</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> bsdrelative_content_replace_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
  <span style="color: #b1b100;">return</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'[url]'</span><span style="color: #339933;">,</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'content_save_pre'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'bsdrelative_content_replace_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> bsdrelative_url_shortcode<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">return</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;bsdrelative_url_shortcode&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>There&#8217;s a reason I&#8217;m using a shortcode rather just replacing http://site.com/the/link with /the/link and it&#8217;s that the latter assumes that the site is installed at the DocumentRoot of the webserver. Not a safe assumption. Often times, I&#8217;m developing a new website for a client under a subfolder such as a http://clientsite.com/staging or http://clientsite.com/dev while the current to-be-replaced site remains at the root level. </p>
<p>I&#8217;ve also made this available as a <a target="_blank" href='http://wordpress.org/extend/plugins/relative-site-url-on-content-save/'>WordPress Plugin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2010/05/16/relative-site-url-on-content-save/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<postDateGMT>2010-05-16 05:48:09</postDateGMT>
	</item>
		<item>
		<title>WordPress Tip: bloginfo as a shortcode</title>
		<link>http://chrisbratlien.com/2010/02/23/wordpress-tip-bloginfo-as-a-shortcode/</link>
		<comments>http://chrisbratlien.com/2010/02/23/wordpress-tip-bloginfo-as-a-shortcode/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 22:34:48 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=450</guid>
		<description><![CDATA[I often need to help move a client&#8217;s redesigned website into WordPress at a new webhost. During this process, the client&#8217;s domain must remain pointing to the old website so there is no interruption in traffic. Repointing the domain becomes one of the last steps of the process. WordPress addresses a potential problem here with [...]]]></description>
			<content:encoded><![CDATA[<p>I often need to help move a client&#8217;s redesigned website into WordPress at a new webhost. During this process, the client&#8217;s domain must remain pointing to the old website so there is no interruption in traffic. Repointing the domain becomes one of the last steps of the process. </p>
<p>WordPress addresses a potential problem here with a Template tag called <a href="http://codex.wordpress.org/Template_Tags/bloginfo">bloginfo</a>. Inside my theme&#8217;s templates, I use bloginfo(&#8216;url&#8217;) rather than hardcoding my site&#8217;s URL. The actual URL is maintained in the Dashboard under Settings > General > WordPress address (URL).  bloginfo(&#8216;template_url&#8217;) adds the current theme path to the URL. Often when programming, computing a value gives you more flexibility than hardcoding a value. </p>
<p>Another area where I would like to have this flexibility is inside the actual content of the post. If I upload an image using the Media Uploader, it immediately computes the URL for the image. But I don&#8217;t want to have to come back later after the domain has been repointed to edit the URLs in the post. Can&#8217;t I have the same delayed computation that bloginfo(&#8216;url&#8217;) provides, but inside the content?</p>
<h3>Solution 1: Shortcodes for your URLs</h3>
<p>Edit your theme&#8217;s functions.php</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> my_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">return</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;my_url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> my_template_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">return</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;template_url&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;my_template_url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> my_images_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$atts</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">return</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_url'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/images'</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;images_url&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;my_images_url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Using this shortcode, I can upload the image, insert the image into the post, and then modify the URL to use the shortcode. I don&#8217;t have to return to edit the URL later.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;[images_url]/chunky.jpg&quot;</span> <span style="color: #339933;">/&gt;</span></pre></div></div>

<h3>Solution 2: Shortcode for bloginfo itself</h3>
<p>I found this solution at <a target="_blank" href="http://http://blue-anvil.com/archives/8-fun-useful-shortcode-functions-for-wordpress/">Blue Anvil</a></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> bloginfo_shortcode<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$atts</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">extract</span><span style="color: #009900;">&#40;</span>shortcode_atts<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'key'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$atts</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #000088;">$key</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
add_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'bloginfo'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'bloginfo_shortcode'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Demo</h3>
<p><a href="http://chrisbratlien.com/wp-content/uploads/2010/02/chunky-e1266723693872.jpg" rel="lightbox[450]"><img src="http://chrisbratlien.com/wp-content/uploads/2010/02/chunky-e1266723693872-225x300.jpg" alt="" title="chunky" width="225" height="300" class="alignnone size-medium wp-image-462" /></a></p>
<p>That was uploaded with the Media Uploader, and here&#8217;s the final markup</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;[bloginfo key='url']/wp-content/uploads/2010/02/chunky-e1266723693872.jpg&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;[bloginfo key='url']/wp-content/uploads/2010/02/chunky-e1266723693872-225x300.jpg&quot;</span> 
alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span> title<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;chunky&quot;</span> width<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;225&quot;</span> height<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;300&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;alignnone size-medium wp-image-462&quot;</span> <span style="color: #339933;">/&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2010/02/23/wordpress-tip-bloginfo-as-a-shortcode/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<postDateGMT>2010-02-23 22:34:48</postDateGMT>
	</item>
		<item>
		<title>CodeIgniter Tip: Body class tags</title>
		<link>http://chrisbratlien.com/2010/02/18/codeigniter-tip-wordpress-like-body-class-tags/</link>
		<comments>http://chrisbratlien.com/2010/02/18/codeigniter-tip-wordpress-like-body-class-tags/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 06:34:14 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=431</guid>
		<description><![CDATA[WordPress 2.8 came out with the body_class() function which allows you to hang your per-page (or per-whatever) CSS off of dynamically generated class attributes on the body HTML tag. I&#8217;m going to show you how to have some of that flexibility when using the CodeIgniter PHP framework. CodeIgniter URLs often take the form of http://my-cool-website.com/account/change-password, [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 2.8 came out with the body_class() function which allows you to hang your per-page (or per-whatever) CSS off of dynamically generated class attributes on the body HTML tag. I&#8217;m going to show you how to have some of that flexibility when using the CodeIgniter PHP framework. </p>
<p>CodeIgniter URLs often take the form of http://my-cool-website.com/account/change-password, where account is the controller and change-password is the function. I want CodeIgniter to automatically put a CSS class &#8220;account-change-password&#8221; on the body tag whenver a user visits that page.</p>
<p>Step 1. Edit  controllers/application.php</p>
<p>Application is the superclass of all of my other controllers, including the Account controller. Here we add 2 variables and populate them in the Application() constructor.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Application <span style="color: #000000; font-weight: bold;">extends</span> Controller <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$controller</span><span style="color: #339933;">;</span>
  <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$function</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> Application<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	  parent<span style="color: #339933;">::</span><span style="color: #004000;">Controller</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	  <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">controller</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uri</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rsegment</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// The Controller</span>
          <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">function</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">uri</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">rsegment</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// The Function</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Step 2. Edit the body tag in your layout template</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;body class=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">controller</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>-<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">function</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;</pre></div></div>

<p>now you&#8217;re ready to make up some CSS such as</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #6666ff;">.account-change-password</span>  <span style="color: #cc00cc;">#main-content</span> ul <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>So now your page elements can have alternate CSS targeted to which controller-function page is currently displaying.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2010/02/18/codeigniter-tip-wordpress-like-body-class-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<postDateGMT>2010-02-18 06:34:14</postDateGMT>
	</item>
		<item>
		<title>Catch the Sign</title>
		<link>http://chrisbratlien.com/2010/02/04/catch-the-sign/</link>
		<comments>http://chrisbratlien.com/2010/02/04/catch-the-sign/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 10:16:01 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=424</guid>
		<description><![CDATA[Catch the Sign is a pitching system for baseball and softball. It is used to encrypt the pitch calling between the coach and the catcher. The project required me to generate custom PDFs with random placement of the user&#8217;s unique pitches or plays in a grid. One main goal was to keep the user interface [...]]]></description>
			<content:encoded><![CDATA[<p>Catch the Sign is a pitching system for baseball and softball. It is used to encrypt the pitch calling between the coach and the catcher. The project required me to generate custom PDFs with random placement of the user&#8217;s unique pitches or plays in a grid. One main goal was to keep the user interface easy to use, so I chose to implement the dynamic AJAX parts with jQuery. The Always Creative design team provided the right look for the application.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2010/02/04/catch-the-sign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<postDateGMT>2010-02-04 10:16:01</postDateGMT>
	</item>
		<item>
		<title>Playing the Guitar in 20 Questions</title>
		<link>http://chrisbratlien.com/2009/09/25/playing-the-guitar-in-20-questions/</link>
		<comments>http://chrisbratlien.com/2009/09/25/playing-the-guitar-in-20-questions/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 16:45:26 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[guitar]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[music theory]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=367</guid>
		<description><![CDATA[Check out this web page I wrote to help a player visualize and follow along with the process explained in the video below. If you color code each chord you build, you&#8217;re left with a good study guide for practicing. If you have a guitar, I hope you&#8217;ll take a few minutes and try out [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://chrisbratlien.com/js-music-theory/fretboard.html"><img class="alignnone size-full wp-image-368" title="fretboard-triads" src="http://chrisbratlien.com/wp-content/uploads/2009/09/fretboard-triads.png" alt="fretboard-triads" width="712" height="159" /></a></p>
<p>Check out this <a href="http://chrisbratlien.com/js-music-theory/fretboard.html">web page</a> I wrote to help a player visualize and follow along with the process explained in the video below. If you color code each chord you build, you&#8217;re left with a good study guide for practicing.</p>
<p>If you have a guitar, I hope you&#8217;ll take a few minutes and try out the page. Let me know if you find it useful or not.</p>
<p>A while back I found this video which shows how to harmonize a maj7 chord over the major scale.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/GJrcsWQBpNI&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="340" src="http://www.youtube.com/v/GJrcsWQBpNI&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>This exercise can be done with any chord and any scale that chord belongs to. As the chord walks up the scale, its sound retains some familiarity yet it also has to squeeze and stretch along each degree in order to remain in key. A reason you would do this exercise is to find other chords to consider for a progression.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2009/09/25/playing-the-guitar-in-20-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<postDateGMT>2009-09-25 16:45:26</postDateGMT>
	</item>
		<item>
		<title>Paul Davis and the catchy chorus</title>
		<link>http://chrisbratlien.com/2009/02/16/paul-davis-and-the-catchy-chorus/</link>
		<comments>http://chrisbratlien.com/2009/02/16/paul-davis-and-the-catchy-chorus/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 16:11:55 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[80s]]></category>
		<category><![CDATA[ask youtube]]></category>
		<category><![CDATA[cool night]]></category>
		<category><![CDATA[paul davis]]></category>
		<category><![CDATA[sweet life]]></category>

		<guid isPermaLink="false">http://chrisbratlien.com/?p=343</guid>
		<description><![CDATA[Take a few minutes to mellow out to the late Paul Davis. One evening as &#8220;Sweet Life&#8221; came up in my Pandora queue, someone insisted it was a rip-off of Paul Davis&#8217;s &#8220;Cool Night&#8221;. After asking YouTube, we sorted it out. They&#8217;re both from Paul Davis.  Listen to the chorus of both and you&#8217;ll see [...]]]></description>
			<content:encoded><![CDATA[<p>Take a few minutes to mellow out to the late <a href="http://en.wikipedia.org/wiki/Paul_Davis_(singer)">Paul Davis</a>.  One evening as &#8220;Sweet Life&#8221; came up in my Pandora queue, someone insisted it was a rip-off of Paul Davis&#8217;s &#8220;Cool Night&#8221;.  After asking YouTube, we sorted it out.  They&#8217;re both from Paul Davis.  Listen to the chorus of both and you&#8217;ll see how easy they are to confuse.</p>
<p>First, <strong>&#8220;Sweet Life&#8221;</strong><br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/tZR1YPRim_Y&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/tZR1YPRim_Y&#038;hl=en&#038;fs=1#t=0m59s" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_c10f32a7-3b4a-4a3d-bd61-a0e690e41a94"  WIDTH="234px" HEIGHT="60px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fchrisb-20%2F8014%2Fc10f32a7-3b4a-4a3d-bd61-a0e690e41a94&#038;Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fchrisb-20%2F8014%2Fc10f32a7-3b4a-4a3d-bd61-a0e690e41a94&#038;Operation=GetDisplayTemplate" id="Player_c10f32a7-3b4a-4a3d-bd61-a0e690e41a94" quality="high" bgcolor="#ffffff" name="Player_c10f32a7-3b4a-4a3d-bd61-a0e690e41a94" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="60px" width="234px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Fchrisb-20%2F8014%2Fc10f32a7-3b4a-4a3d-bd61-a0e690e41a94&#038;Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT></p>
<p>and now <strong>&#8220;Cool Night&#8221;</strong><br />
<object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/yHN3X6tFqAw&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yHN3X6tFqAw&#038;hl=en&#038;fs=1#t=0m49s" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object></p>
<p>I tried to use YouTube&#8217;s <a href="http://www.youtube.com/blog?entry=blWIBM1jE-w">deep linking</a> to cue up the chorus but it seems to not always work.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisbratlien.com/2009/02/16/paul-davis-and-the-catchy-chorus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<postDateGMT>2009-02-16 16:11:55</postDateGMT>
	</item>
	</channel>
</rss>
