<?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>boedesign - canadian based web developer eh</title>
	<atom:link href="http://boedesign.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://boedesign.com</link>
	<description>The dabbling of various web technologies by Jordan Boesch</description>
	<lastBuildDate>Tue, 29 Jan 2013 21:53:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>jQuery.map() in 1.6</title>
		<link>http://boedesign.com/blog/2011/05/03/jquery-map-with-object-support/</link>
		<comments>http://boedesign.com/blog/2011/05/03/jquery-map-with-object-support/#comments</comments>
		<pubDate>Tue, 03 May 2011 20:58:33 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=746</guid>
		<description><![CDATA[You can read my post at http://www.learningjquery.com/2011/05/jquery-map-in-16]]></description>
				<content:encoded><![CDATA[<p>You can read my post at <a target="_blank" href="http://www.learningjquery.com/2011/05/jquery-map-in-16">http://www.learningjquery.com/2011/05/jquery-map-in-16</a></p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2011/05/03/jquery-map-with-object-support/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>outerHTML() plugin for jQuery</title>
		<link>http://boedesign.com/blog/2011/03/31/outerhtml-plugin-for-jquery/</link>
		<comments>http://boedesign.com/blog/2011/03/31/outerhtml-plugin-for-jquery/#comments</comments>
		<pubDate>Thu, 31 Mar 2011 15:34:06 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=740</guid>
		<description><![CDATA[I&#8217;ve seen a lot of work-arounds for doing outerHTML() in jQuery. outerHTML() is not part of the spec and therefor is not supported across all browsers. Browsers like Firefox do not support outerHTML. Here is a cross-browser solution that you can use in a jQuery-style kind-of way. The updated gist can be found here. /* [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve seen a lot of work-arounds for doing outerHTML() in jQuery.  outerHTML() is not part of the spec and therefor is not supported across all browsers.  Browsers like Firefox do not support outerHTML.  Here is a cross-browser solution that you can use in a jQuery-style kind-of way.</p>
<p>The updated gist can be found <a href="https://gist.github.com/889005" target="_blank">here</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="color: #E5FFBE;"><span style="color:#494F51;">/* 
 * Full example here: http://jsfiddle.net/jboesch26/3SKsL/1/
 */</span>
&nbsp;
$.<span style="color: #E5FFBE;">fn</span>.<span style="color: #E5FFBE;">outerHTML</span> <span style="color: #aaa;01">=</span> <span style="color: #fff;">function</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#123;</span>
&nbsp;
    <span style="color:#494F51;">// IE, Chrome &amp; Safari will comply with the non-standard outerHTML, all others (FF) will have a fall-back for cloning</span>
    <span style="color: #fff;">return</span> <span style="color: #E5FFBE;01">&#40;</span><span style="color: #aaa;01">!</span><span style="color: #fff;">this</span>.<span style="color: #E5FFBE;">length</span><span style="color: #E5FFBE;01">&#41;</span> <span style="color: #aaa;01">?</span> <span style="color: #fff;">this</span> <span style="color: #aaa;01">:</span> <span style="color: #E5FFBE;01">&#40;</span><span style="color: #fff;">this</span><span style="color: #E5FFBE;01">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #E5FFBE;01">&#93;</span>.<span style="color: #E5FFBE;">outerHTML</span> <span style="color: #aaa;01">||</span> <span style="color: #E5FFBE;01">&#40;</span>
      <span style="color: #fff;">function</span><span style="color: #E5FFBE;01">&#40;</span>el<span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#123;</span>
          <span style="color: #fff;">var</span> div <span style="color: #aaa;01">=</span> document.<span style="color: #E5FFBE;">createElement</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #fff;">'div'</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
          div.<span style="color: #E5FFBE;">appendChild</span><span style="color: #E5FFBE;01">&#40;</span>el.<span style="color: #E5FFBE;">cloneNode</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #fff;">true</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
          <span style="color: #fff;">var</span> contents <span style="color: #aaa;01">=</span> div.<span style="color: #E5FFBE;">innerHTML</span><span style="color: #aaa;01">;</span>
          div <span style="color: #aaa;01">=</span> <span style="color: #fff;">null</span><span style="color: #aaa;01">;</span>
          <span style="color: #fff;">return</span> contents<span style="color: #aaa;01">;</span>
    <span style="color: #E5FFBE;01">&#125;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #fff;">this</span><span style="color: #E5FFBE;01">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #E5FFBE;01">&#93;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
&nbsp;
<span style="color: #E5FFBE;01">&#125;</span></pre></div></div>

<p>Now call it like so, $(&#8216;#myid&#8217;).outerHTML();</p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2011/03/31/outerhtml-plugin-for-jquery/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>YUI Loader + PHP Minify + CakePHP</title>
		<link>http://boedesign.com/blog/2011/01/14/yui-loader-php-minify-cakephp/</link>
		<comments>http://boedesign.com/blog/2011/01/14/yui-loader-php-minify-cakephp/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 19:31:41 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=731</guid>
		<description><![CDATA[I&#8217;ve had my head buried in 7shifts lately, it&#8217;s been fun and exhausting to say the least. One of the obstacles we had to overcome was asset loading. We kicked this problem in the ass, read my full write-up over at the 7shifts developer blog.]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve had my head buried in 7shifts lately, it&#8217;s been fun and exhausting to say the least. One of the obstacles we had to overcome was asset loading.  We kicked this problem in the ass, read my full write-up over at the <a href="http://7shifts.com/blog/yui-loader-managing-custom-javascript-css-dependencies/">7shifts developer blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2011/01/14/yui-loader-php-minify-cakephp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SVN ignore tmp directory in CakePHP</title>
		<link>http://boedesign.com/blog/2010/10/24/svn-ignore-tmp-directory-in-cakephp/</link>
		<comments>http://boedesign.com/blog/2010/10/24/svn-ignore-tmp-directory-in-cakephp/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 20:53:28 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=717</guid>
		<description><![CDATA[This caused me a lot of frustration. Mostly because there is no .svnignore file in SVN like gits .gitignore. I wanted to just ignore the &#8220;app/tmp&#8221; folder in CakePHP recursively. So I tried this&#8230; While on the command line inside my &#8220;app&#8221; directory, I typed: svn propset svn:ignore '*' tmp/* Here is what the output [...]]]></description>
				<content:encoded><![CDATA[<p>This caused me a lot of frustration.  Mostly because there is no .svnignore file in SVN like gits .gitignore.  I wanted to just ignore the &#8220;app/tmp&#8221; folder in CakePHP recursively.  So I tried this&#8230;</p>
<p>While on the command line inside my &#8220;app&#8221; directory, I typed:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="color: #E5FFBE;">svn propset svn:ignore '*' tmp/*</pre></div></div>

<p>Here is what the output was:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="color: #E5FFBE;">property 'svn:ignore' set on 'tmp/cache'
property 'svn:ignore' set on 'tmp/logs'
property 'svn:ignore' set on 'tmp/sessions'
property 'svn:ignore' set on 'tmp/tests'</pre></div></div>

<p>Looks good right? Nope, it&#8217;s not recursive.  It stops at the first level, meaning it didn&#8217;t ignore &#8216;tmp/cache/models&#8217; and &#8216;tmp/cache/persistent&#8217;.</p>
<p>I guess you have to specifically ignore each directory. Here&#8217;s what I ended up doing:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="color: #E5FFBE;">svn propset svn:ignore '*' tmp/cache/models*
svn propset svn:ignore '*' tmp/cache/persistent*
svn propset svn:ignore '*' tmp/sessions*
svn propset svn:ignore '*' tmp/logs*</pre></div></div>

<p>Aaaaannndd it works! If anyone knows a better way of doing this I&#8217;d be more than happy to hear it.</p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2010/10/24/svn-ignore-tmp-directory-in-cakephp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AppEngine Datastore Viewer UI Fix</title>
		<link>http://boedesign.com/blog/2010/10/15/appengine-datastore-viewer-ui-fix/</link>
		<comments>http://boedesign.com/blog/2010/10/15/appengine-datastore-viewer-ui-fix/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 04:20:20 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=710</guid>
		<description><![CDATA[If you&#8217;ve used the Datastore Viewer on Google AppEngine, you know that it can be super annoying and unfriendly. Here are some UX problems it presents: When you write out a GQL query, you have to remember to tick the &#8220;By GQL&#8221; checkbox before clicking &#8220;Run Query&#8221; or it removes your entire query. If you [...]]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;ve used the Datastore Viewer on Google AppEngine, you know that it can be super annoying and unfriendly.  Here are some UX problems it presents:</p>
<ul>
<li>When you write out a GQL query, you have to remember to tick the &#8220;By GQL&#8221; checkbox before clicking &#8220;Run Query&#8221; or it removes your entire query.</li>
<li>If you end up succeeding in running a GQL query, all of the sudden your &#8220;By Type&#8221; dropdown is disabled (greyed-out).</li>
<li>If you search by namespace, the &#8220;By Type&#8221; dropdown is removed completely when the page refreshes.</li>
</ul>
<p>All of these things combined make it annoying to use.  So I&#8217;ve created a little greasmonkey script to fix all of those things.</p>
<p>In Google Chrome, navigate to <a href="http://boedesign.com/misc/appengine_ux_fix.user.js" target="_blank">http://boedesign.com/misc/appengine_ux_fix.user.js</a> and install the script.  Now go visit the Datastore Viewer on appengine &#8211; fixed!</p>
<p>This script only works in Google Chrome at the moment.  Sorry Firefox users!</p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2010/10/15/appengine-datastore-viewer-ui-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>7shifts officially released!</title>
		<link>http://boedesign.com/blog/2010/08/28/7shifts-officially-released/</link>
		<comments>http://boedesign.com/blog/2010/08/28/7shifts-officially-released/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 14:04:55 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=703</guid>
		<description><![CDATA[I would like to announce that the project I&#8217;ve been working on for awhile has been released! It&#8217;s called 7shifts and it&#8217;s an application where part-time employees can check/manage their availability and schedules online. It&#8217;s free to sign up for a trial, so if you&#8217;re a company that employs part-time staff, this could make your [...]]]></description>
				<content:encoded><![CDATA[<p>I would like to announce that the project I&#8217;ve been working on for awhile has been released! </p>
<p>It&#8217;s called <a href="http://7shifts.com">7shifts</a> and it&#8217;s an application where part-time employees can check/manage their availability and schedules online.  It&#8217;s free to sign up for a trial, so if you&#8217;re a company that employs part-time staff, this could make your life a whole lot easier.</p>
<p>You can <a href="http://twitter.com/7shifts">follow 7shifs on twitter</a> as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2010/08/28/7shifts-officially-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My top 3 custom WordPress functions</title>
		<link>http://boedesign.com/blog/2010/07/24/my-top-3-custom-wordpress-functions/</link>
		<comments>http://boedesign.com/blog/2010/07/24/my-top-3-custom-wordpress-functions/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 05:08:27 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=688</guid>
		<description><![CDATA[I&#8217;ve done quite a few sites in WordPress. Come to think of it, it&#8217;s pretty much all I do when it comes to throwing together a CMS-based site. Here are some really handy functions that I&#8217;ve written that I think would be handy for you other programming monkeys. 1. Calling get_bloginfo() from within the WYSIWYG [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve done quite a few sites in WordPress.  Come to think of it, it&#8217;s pretty much all I do when it comes to throwing together a CMS-based site.  Here are some really handy functions that I&#8217;ve written that I think would be handy for you other programming monkeys.</p>
<h3>1. Calling get_bloginfo() from within the WYSIWYG</h3>
<p>
Moving a WP site to another domain can sometimes be annoying, with broken image paths within the content fields etc. Yes, you could use a typical SQL REPLACE to fix all your paths &#8211; that&#8217;s definitely an option.  Wouldn&#8217;t it be nice if you could code your path&#8217;s relatively and it would just work?  Well, I think so. That&#8217;s why I&#8217;ve come up with this convention.
</p>
<p>
You know how you can call <em>get_bloginfo(&#8216;template_directory&#8217;)</em> from a PHP file for the path to your template director? Awesome, but I want that same kind of functionality in the WYSIWYG content editor. Simple, just type {{ template_directory }} or {{ home }} or {{ rss2_url }} in the WYSIWYG.  <a href="http://codex.wordpress.org/Function_Reference/get_bloginfo" target="_blank">A full list of the options can be found here.</a>
</p>
<p>Put the code below in your themes functions.php file</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="color: #E5FFBE;"><span style="color:#494F51;">// Add a filter to make all calls to the_content() run through our little custom filter.</span>
add_filter<span style="color: #E5FFBE;01">&#40;</span><span style="color: #aaa;">'the_content'</span><span style="color: #aaa;01">,</span> <span style="color: #aaa;">'bloginfo_filter_content'</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
&nbsp;
<span style="color:#494F51;">/**
* Handy-dandy find and replaces on things that are typed in the WYSIWYG
* Text betwen {{ }} should be keys for get_bloginfo();
*
* @param {String} $content The post_content passed in
*/</span>
<span style="color: #fff;">function</span> bloginfo_filter_content<span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$content</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#123;</span>
&nbsp;
    <span style="color: #81869F;">$c</span> <span style="color: #aaa;01">=</span> <span style="color: #81869F;">$content</span><span style="color: #aaa;01">;</span>
&nbsp;
    <span style="color: #81869F;">$pattern</span> <span style="color: #aaa;01">=</span> <span style="color: #aaa;">&quot;/{{(.*?)}}/&quot;</span><span style="color: #aaa;01">;</span>
    <span style="color: #fff;">preg_match_all</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$pattern</span><span style="color: #aaa;01">,</span> <span style="color: #81869F;">$content</span><span style="color: #aaa;01">,</span> <span style="color: #81869F;">$matches</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
&nbsp;
    <span style="color: #fff;">if</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$matches</span><span style="color: #E5FFBE;01">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #E5FFBE;01">&#93;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#123;</span>
        <span style="color: #fff;">foreach</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$matches</span><span style="color: #E5FFBE;01">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #E5FFBE;01">&#93;</span> <span style="color: #fff;">as</span> <span style="color: #81869F;">$i</span> <span style="color: #aaa;01">=&gt;</span> <span style="color: #81869F;">$blog_option</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#123;</span>
            <span style="color: #81869F;">$blog_option_clean</span> <span style="color: #aaa;01">=</span> <span style="color: #fff;">strtolower</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #fff;">trim</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$blog_option</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
            <span style="color: #81869F;">$blog_val</span> <span style="color: #aaa;01">=</span> get_bloginfo<span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$blog_option_clean</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
            <span style="color:#494F51;">// If we passed an invalid key argument (doesnt exist), skip over and do nothing</span>
            <span style="color:#494F51;">// Note: invalid keys always default to the blogname key. That's how we check.</span>
            <span style="color: #fff;">if</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$blog_val</span> <span style="color: #aaa;01">==</span> get_bloginfo<span style="color: #E5FFBE;01">&#40;</span><span style="color: #E5FFBE;01">&#41;</span> <span style="color: #aaa;01">&amp;&amp;</span> <span style="color: #81869F;">$blog_option_clean</span> <span style="color: #aaa;01">!=</span> <span style="color: #aaa;">'blogname'</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#123;</span>
                <span style="color: #fff;">continue</span><span style="color: #aaa;01">;</span> 
            <span style="color: #E5FFBE;01">&#125;</span>
            <span style="color: #fff;">else</span> <span style="color: #E5FFBE;01">&#123;</span>
                <span style="color: #81869F;">$c</span> <span style="color: #aaa;01">=</span> <span style="color: #fff;">str_replace</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$matches</span><span style="color: #E5FFBE;01">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #E5FFBE;01">&#93;</span><span style="color: #E5FFBE;01">&#91;</span><span style="color: #81869F;">$i</span><span style="color: #E5FFBE;01">&#93;</span><span style="color: #aaa;01">,</span> <span style="color: #81869F;">$blog_val</span><span style="color: #aaa;01">,</span> <span style="color: #81869F;">$c</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
            <span style="color: #E5FFBE;01">&#125;</span>
        <span style="color: #E5FFBE;01">&#125;</span>
    <span style="color: #E5FFBE;01">&#125;</span>
&nbsp;
    <span style="color: #fff;">return</span> <span style="color: #81869F;">$c</span><span style="color: #aaa;01">;</span>
&nbsp;
<span style="color: #E5FFBE;01">&#125;</span></pre></div></div>

<p>Now whenever you call <a href="http://codex.wordpress.org/Function_Reference/the_content" target="_blank"><em>the_content()</em></a> in your while loop, it will run it through this filter and do any necessary replacements.</p>
<h3>2. List of tags without tag cloud weight</h3>
<p>
It seems kind of odd to me, but WordPress doesn&#8217;t seem to have a function to just list the tags like <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories" target="_blank"><em>wp_list_categories()</em></a> does. Instead it offers <a href="http://codex.wordpress.org/Function_Reference/wp_tag_cloud" target="_blank"><em>wp_tag_cloud()</em></a>, which puts them in an ordered/unordered list but gives them a font-size weight (inline style attribute).  It&#8217;s yucky if you&#8217;re not using it for an actual tag cloud and just want to display the tags in a list.  You <em>could</em> just add a font-size: 11px !important; in your CSS to override any inline font-styles but I&#8217;m not a big fan of the !important declaration.  Here&#8217;s a fix:
</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="color: #E5FFBE;"><span style="color:#494F51;">/**
* We want to list tags in an unordered list, but we don't want the style
* attribute to override our font-sizes that we set in the CSS
*/</span>
<span style="color: #fff;">function</span> list_tags<span style="color: #E5FFBE;01">&#40;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#123;</span>
&nbsp;
    <span style="color: #81869F;">$tags</span> <span style="color: #aaa;01">=</span> wp_tag_cloud<span style="color: #E5FFBE;01">&#40;</span><span style="color: #fff;">array</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #aaa;">'format'</span> <span style="color: #aaa;01">=&gt;</span> <span style="color: #aaa;">'list'</span><span style="color: #aaa;01">,</span> <span style="color: #aaa;">'echo'</span> <span style="color: #aaa;01">=&gt;</span> <span style="color: #fff;">false</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span> 
    <span style="color:#494F51;">// Get rid of that yucky style attribute that contains font-size</span>
    <span style="color: #fff;">return</span> <span style="color: #fff;">preg_replace</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #aaa;">'/style\s*=\s*(\'</span><span style="color: #aaa;01">|</span><span style="color: #aaa;">&quot;).+(\'|&quot;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">/</span>i<span style="color: #aaa;">', '</span><span style="color: #aaa;">', $tags);
&nbsp;
}</span></pre></div></div>

<h3>3. Get child pages from a parents page path</h3>
<p>
I wrote this function just because it&#8217;s short and useful.  Getting all child pages based on a path has never been easier, pass in a path like &#8216;work/people&#8217; or &#8216;people&#8217; and you&#8217;ll get the child pages in an array.
</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="color: #E5FFBE;"><span style="color:#494F51;">/**
* Get an array of child pages based on a parents path
*
* @param {String} $path The path of the page (permalink slug) 
*/</span>
<span style="color: #fff;">function</span> get_child_pages_by_page_path<span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$path</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#123;</span>
&nbsp;
    <span style="color: #81869F;">$page_path</span> <span style="color: #aaa;01">=</span> get_page_by_path<span style="color: #E5FFBE;01">&#40;</span><span style="color: #81869F;">$path</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
    <span style="color: #81869F;">$pages</span> <span style="color: #aaa;01">=</span> get_pages<span style="color: #E5FFBE;01">&#40;</span><span style="color: #fff;">array</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #aaa;">'child_of'</span> <span style="color: #aaa;01">=&gt;</span> <span style="color: #81869F;">$page_path</span><span style="color: #aaa;01">-&gt;</span><span style="color: #E5FFBE;">ID</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
    <span style="color: #fff;">return</span> <span style="color: #81869F;">$pages</span><span style="color: #aaa;01">;</span>
&nbsp;
<span style="color: #E5FFBE;01">&#125;</span></pre></div></div>

<p>That is all.</p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2010/07/24/my-top-3-custom-wordpress-functions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TaxiMe iPhone App Released!</title>
		<link>http://boedesign.com/blog/2010/05/10/taxime-iphone-app-released/</link>
		<comments>http://boedesign.com/blog/2010/05/10/taxime-iphone-app-released/#comments</comments>
		<pubDate>Mon, 10 May 2010 14:40:28 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=678</guid>
		<description><![CDATA[The wait is finally over. For those who use TaxiMe on their iPhone or iPod Touch &#8211; this is for you. As of Friday, May 7th, the TaxiMe iPhone app is now available! For those who aren&#8217;t familiar with TaxiMe, it&#8217;s an app that I had created a year ago that estimates your cab fare [...]]]></description>
				<content:encoded><![CDATA[<p>The wait is finally over.  For those who use <a href="http://www.taxime.ca/">TaxiMe</a> on their iPhone or iPod Touch &#8211; this is for you.  As of Friday, May 7th, the <a href="http://ww.taxime.ca/iphone">TaxiMe iPhone app</a> is now available!</p>
<p>For those who aren&#8217;t familiar with <a href="http://www.taxime.ca/">TaxiMe</a>, it&#8217;s an app that I had created a year ago that estimates your cab fare for various cities across Canada and the US.</p>
<p>The iPhone app comes loaded with cool features that will make your pants drop.  Check out the video, screenshots and more goodies at <a href="http://ww.taxime.ca/iphone">www.taxime.ca/iphone</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2010/05/10/taxime-iphone-app-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick JavaScript Templating</title>
		<link>http://boedesign.com/blog/2010/03/30/quick-javascript-templating/</link>
		<comments>http://boedesign.com/blog/2010/03/30/quick-javascript-templating/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 04:32:00 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=624</guid>
		<description><![CDATA[At some point, all JavaScript developers encounter a situation that involves spitting out a large chunk of HTML to the page. I&#8217;ve seen a lot of ways to do JavaScript templating, from storing it in the JavaScript file itself to having it returned to you from an ajax request. After reading various techniques on JavaScript [...]]]></description>
				<content:encoded><![CDATA[<p>At some point, all JavaScript developers encounter a situation that involves spitting out a large chunk of HTML to the page.  I&#8217;ve seen a lot of ways to do JavaScript templating, from storing it in the JavaScript file itself to having it returned to you from an ajax request. </p>
<p>After reading <a href="http://ejohn.org/blog/javascript-micro-templating/">various</a> <a href="http://github.com/janl/mustache.js/">techniques</a> on JavaScript templating, I decided to take <a href="http://ejohn.org/blog/javascript-micro-templating/">John Resig&#8217;s idea</a> of using script tags in your HTML.  The reason I liked it was because you had your HTML in your HTML file.  No funny stuff, just HTML where it belongs.  I also liked the idea that it cached the templates &#8211; very good stuff. Here is what one of John&#8217;s examples looked like:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="color: #E5FFBE;"><span style="color: #aaa;01">&lt;</span>script type<span style="color: #aaa;01">=</span><span style="color: #fff;">&quot;text/html&quot;</span> id<span style="color: #aaa;01">=</span><span style="color: #fff;">&quot;user_tmpl&quot;</span><span style="color: #aaa;01">&gt;</span>
    <span style="color: #aaa;01">&lt;%</span> <span style="color: #fff;">for</span> <span style="color: #E5FFBE;01">&#40;</span> <span style="color: #fff;">var</span> i <span style="color: #aaa;01">=</span> <span style="color: #cc66cc;">0</span><span style="color: #aaa;01">;</span> i <span style="color: #aaa;01">&lt;</span> users.<span style="color: #E5FFBE;">length</span><span style="color: #aaa;01">;</span> i<span style="color: #aaa;01">++</span> <span style="color: #E5FFBE;01">&#41;</span> <span style="color: #E5FFBE;01">&#123;</span> <span style="color: #aaa;01">%&gt;</span>
        <span style="color: #aaa;01">&lt;</span>li<span style="color: #aaa;01">&gt;&lt;</span>a href<span style="color: #aaa;01">=</span><span style="color: #fff;">&quot;&lt;%=users[i].url%&gt;&quot;</span><span style="color: #aaa;01">&gt;&lt;%=</span>users<span style="color: #E5FFBE;01">&#91;</span>i<span style="color: #E5FFBE;01">&#93;</span>.<span style="color: #E5FFBE;">name</span><span style="color: #aaa;01">%&gt;&lt;/</span>a<span style="color: #aaa;01">&gt;&lt;/</span>li<span style="color: #aaa;01">&gt;</span>
    <span style="color: #aaa;01">&lt;%</span> <span style="color: #E5FFBE;01">&#125;</span> <span style="color: #aaa;01">%&gt;</span>
<span style="color: #aaa;01">&lt;/</span>script<span style="color: #aaa;01">&gt;</span></pre></div></div>

<p>Right off the bat, what do you think?  Does it feel weird?  Does it feel like someone just pissed in your corn flakes?  To be honest, I felt that way when I first saw it.  This could be partly due to the fact that I have <strong>never</strong> used a script tag with a type text/html before.  As John points out, the browser doesn&#8217;t know how to treat it, so these script tags with text/html are ignored, which makes it a perfect cloaking device for sneaking in templates. </p>
<p>I love that it&#8217;s HTML right in the HTML, but I didn&#8217;t like that it still had JavaScript wrapped around it (for loop). In my case, all I want is simple templating with some caching, I don&#8217;t want to perform JavaScript actions.  I would much rather pull in the template and then perform the JavaScript actions within the JavaScript file itself.</p>
<p>Ok, I&#8217;ll get down to the geeky stuff.  Here is what I came up with.  </p>
<p><a class="linkbutton" href="http://gist.github.com/349932">Check out the Gist</a></p>
<h2>Usage</h2>
<h3>HTML</h3>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="color: #E5FFBE;"><span style="color:#494F51;">// The following HTML is in a script tag and will not render out on the page</span>
<span style="color: #aaa;01">&lt;</span>script type<span style="color: #aaa;01">=</span><span style="color: #fff;">&quot;text/html&quot;</span> id<span style="color: #aaa;01">=</span><span style="color: #fff;">&quot;user_tpl&quot;</span><span style="color: #aaa;01">&gt;</span>
    <span style="color: #aaa;01">&lt;</span>div<span style="color: #aaa;01">&gt;</span>
        <span style="color: #aaa;01">&lt;</span>a href<span style="color: #aaa;01">=</span><span style="color: #fff;">&quot;&lt;%= url %&gt;&quot;</span><span style="color: #aaa;01">&gt;&lt;%=</span> user <span style="color: #aaa;01">%&gt;&lt;/</span>a<span style="color: #aaa;01">&gt;</span>
        <span style="color: #aaa;01">&lt;</span>span<span style="color: #aaa;01">&gt;&lt;%=</span> something_in_span <span style="color: #aaa;01">%&gt;&lt;/</span>span<span style="color: #aaa;01">&gt;</span>
    <span style="color: #aaa;01">&lt;/</span>div<span style="color: #aaa;01">&gt;</span>
<span style="color: #aaa;01">&lt;/</span>script<span style="color: #aaa;01">&gt;</span></pre></div></div>

<h3>JavaScript</h3>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="color: #E5FFBE;"><span style="color:#494F51;">// @param 1 - The id/selector of the &lt;script&gt; element holding the HTML template</span>
<span style="color:#494F51;">// @param 2 - The data object containing the replacements</span>
<span style="color:#494F51;">// If you have jQuery you need to pass a jQuery selector</span>
<span style="color:#494F51;">// or else just pass it an id (without #)</span>
<span style="color: #fff;">var</span> tpl <span style="color: #aaa;01">=</span> Template.<span style="color: #E5FFBE;">draw</span><span style="color: #E5FFBE;01">&#40;</span><span style="color: #fff;">'user_tpl'</span><span style="color: #aaa;01">,</span> <span style="color: #E5FFBE;01">&#123;</span> user<span style="color: #aaa;01">:</span> <span style="color: #fff;">'bob'</span><span style="color: #aaa;01">,</span> url<span style="color: #aaa;01">:</span> <span style="color: #fff;">'http://cornflakes.com'</span> <span style="color: #E5FFBE;01">&#125;</span><span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span>
<span style="color: #fff;">alert</span><span style="color: #E5FFBE;01">&#40;</span>tpl<span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span> <span style="color:#494F51;">// outputs </span>
<span style="color:#494F51;">/*
&lt;div&gt;
        &lt;a href=&quot;'http://cornflakes.com&quot;&gt;bob&lt;/a&gt;
        &lt;span&gt;&lt;%= something_in_span %&gt;&lt;/span&gt;
&lt;/div&gt;
*/</span></pre></div></div>

<p>Oops, we forgot to run a replacement for <%= something_in_span %> &#8211; no problem.  We can re-template the same string, by calling the <em>append</em> method.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="color: #E5FFBE;">tpl <span style="color: #aaa;01">=</span> Template.<span style="color: #E5FFBE;">append</span><span style="color: #E5FFBE;01">&#40;</span>tpl<span style="color: #aaa;01">,</span> <span style="color: #E5FFBE;01">&#123;</span> something_in_span<span style="color: #aaa;01">:</span> <span style="color: #fff;">'Hi im text inside a span'</span> <span style="color: #E5FFBE;01">&#125;</span><span style="color: #E5FFBE;01">&#41;</span>
<span style="color: #fff;">alert</span><span style="color: #E5FFBE;01">&#40;</span>tpl<span style="color: #E5FFBE;01">&#41;</span><span style="color: #aaa;01">;</span> <span style="color:#494F51;">// outputs</span>
<span style="color:#494F51;">/* 
&lt;div&gt;
        &lt;a href=&quot;'http://cornflakes.com&quot;&gt;bob&lt;/a&gt;
        &lt;span&gt;Hi im text inside a span&lt;/span&gt;
&lt;/div&gt;
*/</span></pre></div></div>

<p>There are a <a href="https://developer.mozilla.org/en/JavaScript_templates">lot of templating scripts</a> out there and by no means is this the all-in-one solution.  This is just my approach to making something that&#8217;s lightweight, easy to use and utilizes caching.</p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2010/03/30/quick-javascript-templating/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Delegate and Undelegate in jQuery 1.4.2</title>
		<link>http://boedesign.com/blog/2010/03/05/using-delegate-and-undelegate-in-jquery-1-4-2/</link>
		<comments>http://boedesign.com/blog/2010/03/05/using-delegate-and-undelegate-in-jquery-1-4-2/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 14:13:51 +0000</pubDate>
		<dc:creator>Jordan Boesch</dc:creator>
				<category><![CDATA[index]]></category>

		<guid isPermaLink="false">http://boedesign.com/?p=618</guid>
		<description><![CDATA[View the article at http://www.learningjquery.com/2010/03/using-delegate-and-undelegate-in-jquery-1-4-2]]></description>
				<content:encoded><![CDATA[<p>View the article at <a href="http://www.learningjquery.com/2010/03/using-delegate-and-undelegate-in-jquery-1-4-2">http://www.learningjquery.com/2010/03/using-delegate-and-undelegate-in-jquery-1-4-2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://boedesign.com/blog/2010/03/05/using-delegate-and-undelegate-in-jquery-1-4-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
