<?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>aaron vanderzwan &#187; Hints / Tips</title>
	<atom:link href="http://www.aaronvanderzwan.com/blog/category/hints-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aaronvanderzwan.com/blog</link>
	<description>Smile... It&#039;ll make you feel better.</description>
	<lastBuildDate>Tue, 31 Jan 2012 21:47:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>WordPress 3.1 Custom Columns in List View</title>
		<link>http://www.aaronvanderzwan.com/blog/2011/03/wordpress-3-1-custom-columns-in-list-view/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-3-1-custom-columns-in-list-view</link>
		<comments>http://www.aaronvanderzwan.com/blog/2011/03/wordpress-3-1-custom-columns-in-list-view/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 17:11:17 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hints / Tips]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.aaronvanderzwan.com/blog/?p=293</guid>
		<description><![CDATA[So this got me for a minute. You manage your custom columns in WordPress using add_filter. First you have to add them: add_filter('manage_posts_columns', 'add_new_columns'); function add_new_columns($columns) { $columns['thumb'] = __('Thumb'); return $columns; } &#8230;etc. Then you populate them (in my case, add post type to any column named &#8216;thumb&#8217;): add_action( 'manage_posts_custom_column', 'manage_columns' ); function manage_columns($column_name, [...]]]></description>
			<content:encoded><![CDATA[<p>So this got me for a minute.  You manage your custom columns in WordPress using add_filter.  </p>
<p>First you have to add them:<br />
<code>	add_filter('manage_posts_columns', 'add_new_columns');<br />
	function add_new_columns($columns) {<br />
		$columns['thumb'] = __('Thumb');<br />
		return $columns;<br />
	}</code></p>
<p>&#8230;etc.</p>
<p>Then you populate them (in my case, add post type to any column named &#8216;thumb&#8217;):<br />
<code>	add_action( 'manage_posts_custom_column', 'manage_columns' );<br />
	function manage_columns($column_name, $post_id) {<br />
		switch ($column_name) {<br />
			case 'thumb':<br />
				if(has_post_thumbnail($post_id)){<br />
					echo get_the_post_thumbnail($post_id,array(50,50));<br />
				}else{<br />
					echo '<em>No Featured Image</em>';<br />
				}<br />
				break;<br />
			default:<br />
				break;<br />
		}<br />
	}</code></p>
<h3>This is what got me</h3>
<p>If your post types are hierarchical, then WordPress considers them &#8216;pages&#8217;.  If that is the case you have to use:</p>
<p><code>	add_action( 'manage_pages_custom_column', 'manage_columns' );</code></p>
<p>This will add the action to all hierarchical post types (pages) instead of all non-hierarchical post types (posts).  If you want to target your custom post types only, hierarchical or not, you can do so using:</p>
<p><code>	add_action( 'manage_{custom-post-type}_posts_custom_column', 'manage_columns' );</code></p>
<h3>I know we are moving fast, so&#8230; a quick rundown:</h3>
<p>Global non-hierarchical post types (posts) use:<br />
<code>add_action( 'manage_posts_custom_column', 'manage_columns' );</code></p>
<p>Global hierarchical post types (pages) use:<br />
<code>add_action( 'manage_pages_custom_column', 'manage_columns' );</code></p>
<p>Specific post types hierarchical or non-hierarchical (custom post types) use:<br />
<code>add_action( 'manage_{custom-post-type}_posts_custom_column', 'manage_columns' );</code></p>
<p>Hope that saves someone a few minutes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2011/03/wordpress-3-1-custom-columns-in-list-view/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CHMOD Files and Directories Recursively (Mac OS X)</title>
		<link>http://www.aaronvanderzwan.com/blog/2010/11/chmod-files-and-directories-recursively-mac-os-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=chmod-files-and-directories-recursively-mac-os-x</link>
		<comments>http://www.aaronvanderzwan.com/blog/2010/11/chmod-files-and-directories-recursively-mac-os-x/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 16:17:37 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hints / Tips]]></category>

		<guid isPermaLink="false">http://www.aaronvanderzwan.com/blog/?p=286</guid>
		<description><![CDATA[In terminal, first cd into the directory you want to chmod. To CHMOD only directories to 755: find . -type d -exec chmod 755 {} \; To CHMOD only php files to 644: find . -type f -name '*.php' -exec chmod 644 {} \; This worked well to figure out permissions for my local WordPress [...]]]></description>
			<content:encoded><![CDATA[<p>In terminal, first cd into the directory you want to chmod.</p>
<p>To CHMOD only directories to 755:</p>
<blockquote><p><code>find . -type d -exec chmod 755 {} \;</code></p></blockquote>
<p>To CHMOD only php files to 644:</p>
<blockquote><p><code>find . -type f -name '*.php' -exec chmod 644 {} \;</code></p></blockquote>
<p>This worked well to figure out permissions for my local WordPress install.  I did have to specficially give my uploads directory write access, but it cleaned up all of the other files and folders.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2010/11/chmod-files-and-directories-recursively-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Enable Mod_Rewrite on Leopard 10.6.5</title>
		<link>http://www.aaronvanderzwan.com/blog/2010/11/enable-mod_rewrite-on-leopard/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=enable-mod_rewrite-on-leopard</link>
		<comments>http://www.aaronvanderzwan.com/blog/2010/11/enable-mod_rewrite-on-leopard/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 15:38:29 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hints / Tips]]></category>

		<guid isPermaLink="false">http://www.aaronvanderzwan.com/blog/?p=284</guid>
		<description><![CDATA[I was having a bit of trouble figuring this out. This seemed to do the trick. (if you don&#8217;t have Textmate, use &#8216;vim&#8217; or &#8216;pico&#8217; instead of the &#8216;mate&#8217; commands) In terminal: sudo mate /private/etc/apache2/httpd.conf Find &#8220;&#60;Directory />&#8221; block. Make sure it looks like this: Options FollowSymLinks AllowOverride All Order allow,deny Allow from all Find [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a bit of trouble figuring this out.  This seemed to do the trick.<br />
(if you don&#8217;t have Textmate, use &#8216;vim&#8217; or &#8216;pico&#8217; instead of the &#8216;mate&#8217; commands)</p>
<p>In terminal:</p>
<blockquote><p><code>sudo mate /private/etc/apache2/httpd.conf</code></p></blockquote>
<p>Find &#8220;&lt;Directory />&#8221; block.  Make sure it looks like this:</p>
<blockquote><p>    <code>Options FollowSymLinks<br />
    AllowOverride All<br />
    Order allow,deny<br />
    Allow from all</code></p></blockquote>
<p>Find &#8220;LoadModule rewrite_module libexec/apache2/mod_rewrite.so&#8221;<br />
Make sure there isn&#8217;t a # in front of it.  (If libexec/apache2/mod_rewrite.so is different in your httpd.conf, don&#8217;t change it to mine.  Apparently this differs across different OS X installs.)</p>
<p>Finally, and this was what took me so long to figure out&#8230;<br />
Add the following to the first line of your .htaccess file:</p>
<blockquote><p><code>Options +FollowSymLinks</code></p></blockquote>
<p><strong>or</strong></p>
<p>In my case, I had a conf file written to /etc/apache2/users/ automatically, so when I found it did:</p>
<blockquote><p><code>sudo mate /etc/apache2/users/<em>username</em>.conf</code></p></blockquote>
<p>This file for me looks like:</p>
<blockquote><p><code><Directory "/Users/<em>username</em>/Sites/"><br />
    Options Indexes FollowSymLinks MultiViews<br />
    AllowOverride All<br />
    Order allow,deny<br />
    Allow from all<br />
</Directory></code></p></blockquote>
<p>Note: Remember to change <em>username</em> to your actual username.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2010/11/enable-mod_rewrite-on-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Absolute Positioning with jQuery</title>
		<link>http://www.aaronvanderzwan.com/blog/2010/10/dynamic-absolute-positioning-with-jquery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dynamic-absolute-positioning-with-jquery</link>
		<comments>http://www.aaronvanderzwan.com/blog/2010/10/dynamic-absolute-positioning-with-jquery/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 16:38:22 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hints / Tips]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.aaronvanderzwan.com/blog/?p=278</guid>
		<description><![CDATA[I had to build a website recently that used fixed positioning on most items except for a content area that scrolled. The fixed items (or absolutely positioned ones) still needed to shift when the page re-sized if content would roll to the next line. So I had to come up with a clever way to [...]]]></description>
			<content:encoded><![CDATA[<p>I had to build a website recently that used fixed positioning on most items except for a content area that scrolled.   The fixed items (or absolutely positioned ones) still needed to shift when the page re-sized if content would roll to the next line.  So I had to come up with a clever way to handle dynamic absolutely positioned elements.  The following is what I came up with.  It just loops through each child of the body.  On each child, it finds the previous item (without a &#8216;skip&#8217; class) and calculates that item&#8217;s top css attribute plus it&#8217;s height.</p>
<p>&lt;script type=&#8221;text/javascript&#8221; charset=&#8221;utf-8&#8243;><br />
$(function(){<br />
&nbsp;&nbsp;jQuery(window).resize(function(){<br />
&nbsp;&nbsp;&nbsp;&nbsp;jQuery(&#8216;body&#8217;).children().each(function(){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var $this = jQuery(this);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var $prev = jQuery(this).prevAll().not(&#8216;.skip&#8217;).first();<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if($prev.length > 0){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var newTop = $prev.outerHeight(true) + parseFloat($prev.css(&#8216;top&#8217;));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jQuery(this).css({top:newTop+&#8217;px&#8217;});<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />
&nbsp;&nbsp;&nbsp;&nbsp;});<br />
&nbsp;&nbsp;});<br />
&nbsp;&nbsp;jQuery(window).trigger(&#8216;resize&#8217;);<br />
});<br />
&lt;/script></p>
<p>Check out the demo:<br />
<a href="http://www.aaronvanderzwan.com/playground/dynamic_absolutes/index.html" target="_blank">http://www.aaronvanderzwan.com/playground/dynamic_absolutes/index.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2010/10/dynamic-absolute-positioning-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery: RegExp for all occurances; Wrap all &#169; and &#174; with HTML</title>
		<link>http://www.aaronvanderzwan.com/blog/2010/03/jquery-regexp-for-all-occurances-treat-all-and-with-specific-css/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-regexp-for-all-occurances-treat-all-and-with-specific-css</link>
		<comments>http://www.aaronvanderzwan.com/blog/2010/03/jquery-regexp-for-all-occurances-treat-all-and-with-specific-css/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 20:33:45 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Hints / Tips]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[reg]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://www.aaronvanderzwan.com/blog/?p=246</guid>
		<description><![CDATA[This script will find all &#169; and &#174; on a page and wrap them a span around them with a &#8220;copy&#8221; or &#8220;reg&#8221; class accordingly. &#60;style> .copy, .reg {font-size:xx-small;vertical-align:text-top;} &#60;/style> &#60;script> $(function(){ var copy = new RegExp(&#8216;\u00a9&#8242;,&#8217;g'); var reg = new RegExp(&#8216;\u00ae&#8217;,'g&#8217;); var newBody = $(&#8216;body&#8217;).html().replace(copy, &#8216;&#60;span class=&#8221;copy&#8221;>&#38;copy;&#60;/span>&#8217;).replace(reg, &#8216;&#60;span class=&#8221;reg&#8221;>&#38;reg;&#60;/span>&#8217;); $(&#8216;body&#8217;).html(newBody); }); &#60;/script>]]></description>
			<content:encoded><![CDATA[<p>This script will find all &copy; and &reg; on a page and wrap them a span around them with a &#8220;copy&#8221; or &#8220;reg&#8221; class accordingly.</p>
<blockquote class="code"><p>&lt;style><br />
			.copy, .reg {font-size:xx-small;vertical-align:text-top;}<br />
		&lt;/style></p>
<p>		&lt;script><br />
			$(function(){<br />
				var copy = new RegExp(&#8216;\u00a9&#8242;,&#8217;g');<br />
				var reg = new RegExp(&#8216;\u00ae&#8217;,'g&#8217;);<br />
		   	var newBody = $(&#8216;body&#8217;).html().replace(copy, &#8216;&lt;span class=&#8221;copy&#8221;>&amp;copy;&lt;/span>&#8217;).replace(reg, &#8216;&lt;span class=&#8221;reg&#8221;>&amp;reg;&lt;/span>&#8217;);<br />
		   	$(&#8216;body&#8217;).html(newBody);<br />
			});<br />
		&lt;/script></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2010/03/jquery-regexp-for-all-occurances-treat-all-and-with-specific-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forward Emails from Gmail to Google Wave</title>
		<link>http://www.aaronvanderzwan.com/blog/2009/11/forward-emails-from-gmail-to-google-wave/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=forward-emails-from-gmail-to-google-wave</link>
		<comments>http://www.aaronvanderzwan.com/blog/2009/11/forward-emails-from-gmail-to-google-wave/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 17:22:39 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Hints / Tips]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://aaronvanderzwan.com/blog/?p=226</guid>
		<description><![CDATA[Don&#8217;t do it! (yet) With getting a new Google Wave account, I wanted to forward my Gmail emails to my Google Wave account. I saw that my Google Wave account was [username]@googlewave.com so I figured I could do it. I went into Gmail. Followed Settings > Forward and set up Gmail to pass all of [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://aaronvanderzwan.com/blog/wp-content/uploads/2009/11/icons.jpg" alt="icons" title="icons" class="alignnone size-full wp-image-227" /></p>
<p><strong>Don&#8217;t do it! (yet)</strong></p>
<p>With getting a new <a href="http://wave.google.com/help/wave/about.html#video" target="_blank">Google Wave</a> account, I wanted to forward my Gmail emails to my Google Wave account.  I saw that my Google Wave account was [username]@googlewave.com so I figured I could do it.  I went into Gmail.  Followed Settings > Forward and set up Gmail to pass all of my emails on to google wave.</p>
<p>I left it on for a day or so, and maybe that was my big mistake.   I have been getting emails every 20-30 minutes that have been telling me they cannot send my emails to Google Wave, and that they will retry for the next 2 days.  They have a subject line of &#8216;Delivery Status Notification (Failure)&#8217;.  Obviously I turned off my forwarding, however now, 3 days later, they are still coming in every 20-30 minutes telling me that the email failed.</p>
<p>So moral of the story.  Don&#8217;t automatically forward your emails to Google Wave (yet!) and also, don&#8217;t leave that forward on any longer than you have to.  Google Wave is not ready for it yet and it will get REALLY annoying.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2009/11/forward-emails-from-gmail-to-google-wave/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Old Browse Pane Layout in iTunes 9</title>
		<link>http://www.aaronvanderzwan.com/blog/2009/09/old-browse-pane-layout-in-itunes-9/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=old-browse-pane-layout-in-itunes-9</link>
		<comments>http://www.aaronvanderzwan.com/blog/2009/09/old-browse-pane-layout-in-itunes-9/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 13:52:23 +0000</pubDate>
		<dc:creator>Aaron Vanderzwan</dc:creator>
				<category><![CDATA[Hints / Tips]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://aaronvanderzwan.com/blog/?p=219</guid>
		<description><![CDATA[Okay. So &#8216;Browse&#8217; has been rolled into something called &#8216;Column Browser&#8217;. If you want to get iTunes 9 to have the same pane layout as the old, default, &#8216;Browse&#8217; option, you can. Here is what you are going to want to do: 1) Turn on Column Browser: View > Show Column Browser 2) Show Albums [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://aaronvanderzwan.com/blog/wp-content/uploads/2009/09/itunes.jpg" alt="itunes old browse layout" title="itunes old browse layout" class="alignnone size-full wp-image-220" /><br />
Okay.  So &#8216;Browse&#8217; has been rolled into something called &#8216;Column Browser&#8217;.  If you want to get iTunes 9 to have the same pane layout as the old, default, &#8216;Browse&#8217; option, you can.  Here is what you are going to want to do:</p>
<p>1) Turn on Column Browser: <strong>View > Show Column Browser</strong><br />
2) Show Albums as well as artists: <strong>View > Column Browser > Albums</strong><br />
3) Show Genres as well as albums and artists: <strong>View > Column Browser > Genres</strong><br />
4) Setup Column Browser to show up above your song lists: <strong>View > Column Browser > On Top</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aaronvanderzwan.com/blog/2009/09/old-browse-pane-layout-in-itunes-9/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

