<?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>Geek the Freak Out! It&#039;s Joseph Hinson! &#187; Tips</title>
	<atom:link href="http://geekoutwith.me/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://geekoutwith.me</link>
	<description>Doing right by the internet since I learned how.</description>
	<lastBuildDate>Mon, 30 Aug 2010 17:42:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to add multiple pages at once with WordPress</title>
		<link>http://geekoutwith.me/2010/06/how-to-add-multiple-pages-at-once-with-wordpress/</link>
		<comments>http://geekoutwith.me/2010/06/how-to-add-multiple-pages-at-once-with-wordpress/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 20:45:59 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp_insert_posts]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1259</guid>
		<description><![CDATA[Ok folks, this will be short. If you want to add several pages at once, I created a little script for you.
Here it is:
&#60;?php
 include ('wp-blog-header.php');
 $newPages = array(
 'Page 1' =&#62; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et d&#8230;]]></description>
			<content:encoded><![CDATA[<p>Ok folks, this will be short. If you want to add several pages at once, I created a little script for you.</p>
<h3>Here it is:</h3>
<pre>&lt;?php
 <span style="background-color: #ffff99;">include ('wp-blog-header.php');</span>
 <span style="background-color: #ccffcc;">$newPages = array(</span>
 'Page 1' =&gt; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
 'Page 2' =&gt; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
 'Page 3' =&gt; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
 'Page 4' =&gt; 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
 );
 <span style="background-color: #ccffff;">foreach($newPages as $pagename =&gt; $content) :</span>

 $postarr = array(
 'post_title'         =&gt;     $pagename,
 'post_content'         =&gt;     $content,
 'post_status'        =&gt;    'publish', <span style="background-color: #99ccff;">// can be changed to 'draft', 'publish', 'pending', or 'future'</span>
 'post_author'        =&gt;    1, <span style="background-color: #99ccff;">// post author 1 is admin, can be changed to the ID of the post author</span>
 'post_type'            =&gt;    'page', <span style="background-color: #99ccff;">// can also use 'post' here.</span>
// 'post_parent'            =&gt;    '22', <span style="background-color: #99ccff;">// (completely optional) you can assign a parent ID to create child pages.</span>
 );
<span style="background-color: #ffcc99;"> wp_insert_post($postarr); ?&gt;</span>
<span style="background-color: #ffffff;"> &lt;p&gt;Added &lt;?php echo $pagename?&gt;.&lt;/p&gt;</span>
 &lt;?php endforeach; ?&gt;</pre>
<h3>And here&#8217;s how it works:</h3>
<ol>
<li>the <span style="background-color: #ffff99;">include wp_blog_header()</span> is pulling in the file wp_blog_header.php, which gets all the important data from your WordPress blog, allowing you to access the database (<strong>very important</strong>).</li>
<li>the <span style="background-color: #ccffcc;">$newpages</span> variable is storing an array that is created in the next 4 lines.</li>
<li> The <span style="background-color: #ccffff;">foreach</span> cycles through the array, assigning $pagename to the left side of the = and $content to the right, so whatever you put to the left side of the = will be your page title, whatever you put to the right side will be your content (<em>simple enough</em>).</li>
<li>The <a href="http://codex.wordpress.org/Function_Reference/wp_insert_post"><span style="background-color: #ffcc99;">function wp_insert_post()</span> </a>is called, passing the parameter of the array that was created in <span style="background-color: #ccffcc;">step 2</span>.</li>
</ol>
<p>That&#8217;s it, your new pages have been added. Be very careful not to reload the page, or navigate to this page again, or it will duplicate the pages, which can be quite frustrating to straighten out. But that&#8217;s it. It really is that easy. You can also see my <span style="background-color: #99ccff;">comments in blue.</span></p>
<p>I might make a plugin that you can drop into a site to enable users to frame out a site with the pages needed and whatnot. Maybe I&#8217;ll make that my next project, anyway, hopefully you found it useful, if you&#8217;d like to download the php file, you can get it below:</p>
<p><a href="http://geekoutwith.me/wp-content/uploads/2010/06/insertposts.php_.zip">insertposts.php</a></p>
<p>Put this file in your root directory (so like: http://geekoutwith.me/insertposts.php). If you put it somewhere else, you&#8217;ll have to change the path of the include for <span style="background-color: #ffff99;">wp-blog-header.php</span></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/06/how-to-add-multiple-pages-at-once-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Quickly Create Reusable Color Palettes in TextMate</title>
		<link>http://geekoutwith.me/2010/06/how-to-quickly-create-reusable-color-palettes-in-textmate/</link>
		<comments>http://geekoutwith.me/2010/06/how-to-quickly-create-reusable-color-palettes-in-textmate/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 17:32:00 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Geek Out]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1256</guid>
		<description><![CDATA[Below is a quick video tutorial of using Mac OS&#8217; built-in color picker to create color palletes for use in your CSS documents.

]]></description>
			<content:encoded><![CDATA[<p>Below is a quick video tutorial of using Mac OS&#8217; built-in color picker to create color palletes for use in your CSS documents.</p>
<p><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='560' height='345'><param name='movie' value='http://screenr.com/Content/assets/screenr_1116090935.swf' /><param name='flashvars' value='i=81776' /><param name='allowFullScreen' value='true' /><embed src='http://screenr.com/Content/assets/screenr_1116090935.swf' flashvars='i=81776' allowFullScreen='true' width='560' height='345' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/06/how-to-quickly-create-reusable-color-palettes-in-textmate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoshop Screencast: Creating Torn Edges</title>
		<link>http://geekoutwith.me/2010/05/photoshop-tip-creating-torn-edges/</link>
		<comments>http://geekoutwith.me/2010/05/photoshop-tip-creating-torn-edges/#comments</comments>
		<pubDate>Fri, 28 May 2010 19:39:57 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[distressed]]></category>
		<category><![CDATA[grunge]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[torn edges]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1251</guid>
		<description><![CDATA[I was recently working on a project and came up with a decently automated solution for creating grunge torn edges in photoshop&#8230;and here it is:

]]></description>
			<content:encoded><![CDATA[<p>I was recently working on a project and came up with a decently automated solution for creating grunge torn edges in photoshop&#8230;and here it is:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="345" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="i=74050" /><param name="allowFullScreen" value="true" /><param name="src" value="http://screenr.com/Content/assets/screenr_1116090935.swf" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="345" src="http://screenr.com/Content/assets/screenr_1116090935.swf" allowfullscreen="true" flashvars="i=74050"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/05/photoshop-tip-creating-torn-edges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoshop Screencast: How to use the defringe tool</title>
		<link>http://geekoutwith.me/2010/05/photoshop-screencast-how-to-use-the-defringe-tool/</link>
		<comments>http://geekoutwith.me/2010/05/photoshop-screencast-how-to-use-the-defringe-tool/#comments</comments>
		<pubDate>Thu, 27 May 2010 17:49:54 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[defringe]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1249</guid>
		<description><![CDATA[I was working on an email blast for a client when I remembered how effective the defringe tool is, and though I don&#8217;t explain it too thoroughly in this screencast, it might be helpful for you.

]]></description>
			<content:encoded><![CDATA[<p>I was working on an email blast for a client when I remembered how effective the defringe tool is, and though I don&#8217;t explain it too thoroughly in this screencast, it might be helpful for you.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="560" height="345" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="i=63357" /><param name="allowFullScreen" value="true" /><param name="src" value="http://screenr.com/Content/assets/screenr_1116090935.swf" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="560" height="345" src="http://screenr.com/Content/assets/screenr_1116090935.swf" allowfullscreen="true" flashvars="i=63357"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/05/photoshop-screencast-how-to-use-the-defringe-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using CSS Media Queries</title>
		<link>http://geekoutwith.me/2010/04/using-css-media-queries/</link>
		<comments>http://geekoutwith.me/2010/04/using-css-media-queries/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 00:34:44 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Adventures]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[media queries]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1024</guid>
		<description><![CDATA[I wanted my website to be a little easier to read in the iPhone. I knew there was a new CSS3 property called Media Queries. This allows you to discriminate based on window size. So, in the header, as I would normally pull in a stylesheet, I can say:
And that will pull in a stylesheet for the iPhone, mine look&#8230;]]></description>
			<content:encoded><![CDATA[<p>I wanted my website to be a little easier to read in the iPhone. I knew there was a new CSS3 property called Media Queries. This allows you to discriminate based on window size. So, in the header, as I would normally pull in a stylesheet, I can say:</p>
<p>And that will pull in a stylesheet for the iPhone, mine looks like this:</p>
<pre>#content-right {
display: none;
}
#pagewrapper {
	width: 640px;
}
</pre>
<p>So, in an iPhone at this moment, my site looks like this:</p>
<p><img class="alignnone size-large wp-image-1025" title="geekoutwith.me screen capture 2010-4-27-20-25-18" src="http://geekoutwith.me/wp-content/uploads/2010/04/geekoutwith.me-screen-capture-2010-4-27-20-25-18-e1272414791132-477x490.png" alt="" width="477" height="490" /></p>
<p>It really is that easy. I hope to share more about CSS Media Queries in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/04/using-css-media-queries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first guest post at buildinternet.com</title>
		<link>http://geekoutwith.me/2010/04/my-first-guest-post-at-buildinternet-com/</link>
		<comments>http://geekoutwith.me/2010/04/my-first-guest-post-at-buildinternet-com/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 15:29:55 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Embeddable Players Series]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=1019</guid>
		<description><![CDATA[I wrote the third part of the embeddable mp3 players series over at buildinternet.com. Those guys graciously allowed me to geek out on their blog. Since they get way more traffic than I do, I think more people will find it useful.
You can see how they make me look good here:
http://buildinternet.com/2&#8230;]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I wanted to add an mp3 to my daughter&#8217;s baby book blog (built on WordPress). At first I thought to install a plugin, but it seemed a bit much for my needs. After trying a few things, I eventually settled on a nice theme-integrated method that uses a google flash-based mp3 player. I&#8217;ll elaborate on that in part 2. This post has a nice list of embeddable flash mp3 players:</p>
<p><a href="http://www.labnol.org/internet/design/html-embed-mp3-songs-podcasts-music-in-blogs-websites/2232/" target="_blank">How to Embed MP3 Audio Files In Web Pages With Google or Yahoo! Flash Player</a></p>
<p>Using this method, you can paste the embed code into your post or page. In the next post, I&#8217;ll go into some detail about a neat way to use this method in your WordPress theme.</p>
<div class="related-tags"><h3>Other Posts in this Series</h3><ul><li><a href="http://geekoutwith.me/2010/04/my-first-guest-post-at-buildinternet-com/">My first guest post at buildinternet.com</a></li><li><a href="http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-2/">Using embeddable mp3 players &#8211; Part 2</a></li><li><a href="http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-1/">Using embeddable mp3 players &#8211; Part 1</a></li></ul></div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">
<h1>How to Embed MP3 Audio Files In Web Pages With Google or Yahoo! Flash Player</h1>
</div>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Helpful WordPress Shortcode &#8211; showthumbs</title>
		<link>http://geekoutwith.me/2010/04/helpful-wordpress-shortcode-showthumbs/</link>
		<comments>http://geekoutwith.me/2010/04/helpful-wordpress-shortcode-showthumbs/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 03:22:29 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Adventures]]></category>
		<category><![CDATA[Geek Out]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[shortcode]]></category>

		<guid isPermaLink="false">http://geekoutwith.me/?p=980</guid>
		<description><![CDATA[I was working on my daughter&#8217;s blog, which might be the most robust blog I&#8217;ve built, because it is my testing grounds for new features to add to WordPress sites/blogs. Tonight I added a neat kind of functionality, something I&#8217;d like to share.
Shortcode to show thumbnails.
Here&#&#8230;]]></description>
			<content:encoded><![CDATA[<p>I was working on my daughter&#8217;s blog, which might be the most robust blog I&#8217;ve built, because it is my testing grounds for new features to add to WordPress sites/blogs. Tonight I added a neat kind of functionality, something I&#8217;d like to share.</p>
<h3>Shortcode to show thumbnails.</h3>
<p>Here&#8217;s how it works.</p>
<ol>
<li>Upload a bunch of images to a specific post, title the images whatever you like.</li>
<li>Click &#8220;Save All Changes&#8221;. And Close. <span style="color: #333333;">With this shortcode, there&#8217;s no need to &#8220;Insert Into Posts&#8221;. That will just waste time</span>.</li>
<li>Add the shortcode <code>[showposts]</code> to the content. It will drop in the thumbnails where you add the shortcode. The thumbnails will show in floated list format, side by side, with a 10px margin on the right and bottom (see the screenshot at the bottom).</li>
</ol>
<pre>// [showthumbs]
function showthumbs_func($atts, $content = null) { ?&gt;
 &lt;style type="text/css" media="screen"&gt;
 ul.photo-thumbs {
 margin: 0;
 padding: 0;
 }
 li.thumb {
 list-style: none;
 margin: 0;
 padding: 0;
 float: left;
 line-height: 0;
 margin-right: 10px;
 margin-bottom: 10px;
 }
 li.thumb.clr {
 clear: both;
 float: none;
 margin: 0;
 }
 &lt;/style&gt;
 &lt;?php
 extract(shortcode_atts(array(
 "showthumbs" =&gt; ''
 ), $atts));
 global $post;
 $pics = get_children( 'numberposts=-1&amp;post_type=attachment&amp;post_mime_type=image&amp;post_parent='.$post-&gt;ID );
 $return='&lt;ul class="photo-thumbs"&gt;';
 foreach($pics as $pic) :
 $image = wp_get_attachment_image_src($pic-&gt;ID, 'large');
 $return.='&lt;li class="thumb"&gt;&lt;a rel="slideshow" href="'. $image[0].'"&gt;'.wp_get_attachment_image($pic-&gt;ID, array(75,75)).'&lt;/a&gt;&lt;/li&gt;';
 endforeach;
 $return.='&lt;li class="thumb clr"&gt;&lt;/li&gt;&lt;/ul&gt;';
 return $return;
}
add_shortcode("showthumbs", "showthumbs_func");
</pre>
<p>All you have to do to make this work is drop it in your WordPress functions.php file, located at root/wp-content/themes/your-theme/functions.php &#8211; if one doesn&#8217;t exist. Create one and wrap the code above in <code>PHP</code> tags.</p>
<p>I&#8217;m using colorbox to create a slideshow between them, all you have to do to accomplish this is install colorbox, and add this line to your head:</p>
<pre>&lt;script type="text/javascript"&gt;
 jQuery(document).ready(function() {
  jQuery("a[rel='slideshow']").colorbox({preload: true, slideshowSpeed: '2500', slideshow:true});
 });
&lt;/script&gt;
</pre>
<h3>Screenshot:</h3>
<p><img class="alignnone size-large wp-image-983" title="Baby Pictures of my wife and I" src="http://geekoutwith.me/wp-content/uploads/2010/04/Screen-shot-2010-04-06-at-11.32.56-PM-489x165.png" alt="" width="489" height="165" /></p>
<p>If you want to see this as a plug-in, leave a comment and let me know. I&#8217;ll do it. For real.</p>
<p><script type="text/javascript">// <![CDATA[
	$(document).ready(function() {
		$("a[rel='slideshow']").colorbox({preload: true, slideshow: true});
	});
// ]]&gt;</script></p>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/04/helpful-wordpress-shortcode-showthumbs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Textmate WordPress Bundle</title>
		<link>http://geekoutwith.me/2010/02/updated-textmate-wordpress-bundle/</link>
		<comments>http://geekoutwith.me/2010/02/updated-textmate-wordpress-bundle/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 21:49:35 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[textmate snippets]]></category>

		<guid isPermaLink="false">http://geekitopia.com/?p=894</guid>
		<description><![CDATA[Well, I&#8217;ve finally updated the WordPress bundle from the previous release. In this bundle I&#8217;ve included some fairly neat snippets. Almost all of them are wrapped in the  brackets. Below is a screenshot of what snippets the bundle contains.


Why are these snippets helpful?
Textmate sni&#8230;]]></description>
			<content:encoded><![CDATA[<p><span style="background-color: #ffff99;">It should be said here that there is a <a href="http://geekoutwith.me/2010/02/updated-textmate-wordpress-bundle/">newer version of this bundle</a>. The following version of the bundle has a few snippets that have errors.</span></p>
<p>If this helps you, then good. I put a WordPress Textmate bundle I use for work on my <!--intlink id="445" type="post" text="Downloads page."--> If you use Textmate, just download, then double click to install. It&#8217;s not very big yet&#8230;but I&#8217;ll update it as I add functionality&#8230;or you can if you like.</p>
<p><a href="http://josephhinson.com/wp-content/uploads/2009/09/WordPress-Text-Mate-Bundle.zip">WordPress Textmate Bundle (Version 0.5)</a></p>
<h3>Misc Snippets (by tab trigger)</h3>
<ul>
<li>theloop – the loop with tab stops at appropriate places</li>
<li>bloginfo – the template tag bloginfo with tab stop to fill in parameter</li>
<li>wig_sidebar – Dynamic sidebar with tab stop inside if statement – tab twice to ignore.</li>
<li>themeinfo – Stylesheet header with tab stops (CSS)</li>
<li>wt_get_depth – spits out the function wt_get_depth, which can be used to determine where you are in relation to the root&#8230;powerful little function.</li>
<li>page_template – page template with appropriate tab stops.</li>
<li>onpage – includes conditional to check if user is on a specific page. Best used in nav menu.</li>
<li>is_page – if statement that checks to see if a specific page is being used.</li>
</ul>
<h3>Template Tag snippets</h3>
<ul>
<li>get_sidebar – template tag get_sidebar(); with open and close PHP brackets.</li>
<li>the_excerpt – the_excerpt();</li>
<li>the_title – the_title();</li>
<li>the_content – template tag, the content</li>
<li>the_permalink – template tag, the_permalink();</li>
</ul>
<p>Also, Here&#8217;s how you can get to the snippets, in case you want to make changes or see them before using them:</p>
<div id="attachment_691" class="wp-caption alignnone" style="width: 495px"><a href="http://josephhinson.com/wp-content/uploads/2009/09/Picture-7.png"><img class="size-full wp-image-691" title="Edit Snippets" src="http://josephhinson.com/wp-content/uploads/2009/09/Picture-7.png" alt="From the menu, Bundles &gt; Bundle Editor &gt; Edit Snippets" width="485" height="196" /></a><p class="wp-caption-text">From the menu, Bundles &gt; Bundle Editor &gt; Edit Snippets</p></div>
<div id="attachment_690" class="wp-caption alignnone" style="width: 500px"><a href="http://josephhinson.com/wp-content/uploads/2009/09/snippet-overview.jpg"><img class="size-large wp-image-690" title="Textmate Snippets overview" src="http://josephhinson.com/wp-content/uploads/2009/09/snippet-overview-490x332.jpg" alt="Snippets are very easy to modify from this window." width="490" height="332" /></a><p class="wp-caption-text">Snippets are very easy to modify from this window.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2009/09/textmate-wordpress-bundle-released-as-small-as-it-is/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using embeddable mp3 players &#8211; Part 2</title>
		<link>http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-2/</link>
		<comments>http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-2/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 14:00:28 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Geek Out]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Embeddable Players Series]]></category>

		<guid isPermaLink="false">http://geekitopia.com/?p=827</guid>
		<description><![CDATA[In this tutorial, I cover how to use custom fields to embed an mp3 into your website (without installing a plugin).]]></description>
			<content:encoded><![CDATA[<p>Obviously, if you&#8217;re not going to post mp3s to your site very often, the easy solution is to paste the embed code into your individual post or page using HTML mode, but you might have a need to embed an mp3 on a regular basis. This tutorial will show how to use the embeddable player mentioned in my <!--intlink id="824" type="post" text="previous post"--> in combination with custom fields in order to display <em>one mp3</em> at a time.</p>
<p>So, here&#8217;s how it works.</p>
<h3>Step 1: The Custom Field (from the Add New Post page)</h3>
<p>The first thing you have to do in order to set this up is to add a custom field. To do so, go to the bottom of the page, and in the &#8220;Custom Field&#8221; section, click the &#8220;<span style="color: #3366ff;">Enter New</span>&#8220;. In the &#8220;Name&#8221; field, enter your name (no, not your actual name, the name for the field). This can be anything you like. This name will serve as the &#8220;<em>key</em>&#8221; to the custom field (covered later). For my example, I&#8217;m going to name the custom field &#8220;mp3&#8243;. For the value, I will use the path to my mp3, for example: http://mysite.com/mysongsfolder/mp3-i-want-to-play.mp3.</p>
<h3>Step 2: The Code</h3>
<p>With your favorite text editor (mine is Textmate), open the single.php file, and insert the custom field code you&#8217;ll need. You can read about custom fields in the <a href="http://codex.wordpress.org/Using_Custom_Fields">WordPress codex</a>, but here&#8217;s a quick example of how you can use the custom field in your theme:</p>
<pre>&lt;?php <span style="background-color: #ffff99;">echo </span>get_post_meta(<span style="background-color: #ccffff;">$post-&gt;ID</span>, <span style="background-color: #ffcc99;">$key</span>, <span style="background-color: #cc99ff;">true</span>); ?&gt;</pre>
<h4>Now to explain some stuff.</h4>
<ul>
<li><span style="background-color: #ffff99;">echo</span> is tells the value to print (to spit out on the page).</li>
<li><span style="background-color: #ccffff;">$post-&gt;ID</span> is using the ID of the post that your in.</li>
<li><span style="background-color: #ffcc99;">$key</span> is the name of the custom field (in my example, it will be mp3)</li>
<li><span style="background-color: #cc99ff;">true</span> tells WordPress that there actually is something in the custom field, in order for anything to appear, it needs to be &#8220;true&#8221;.</li>
</ul>
<p>This code will spit out exactly what is in your &#8220;value&#8221; field. If that&#8217;s what we wanted to accomplish, we&#8217;d be done. But if we left it like this, all we&#8217;d get is:</p>
<p>http://mysite.com/mysongsfolder/mp3-i-want-to-play.mpg</p>
<p>And that would look dumb and not do anything. We want action!</p>
<h4>Let&#8217;s take the embed code for the Google reader player and make it do something.</h4>
<p>The google embed looks like this:</p>
<pre>&lt;embed type="application/x-shockwave-flash"
src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=<strong>MP3_FILE_URL</strong>"
width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff"
wmode="window" flashvars="playerMode=embedded" /&gt;</pre>
<p>In this example, the &#8220;MP3_FILE_URL&#8221; will be replaced with our custom field code. Like so:</p>
<pre>&lt;embed type="application/x-shockwave-flash"
src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=<span style="background-color: #ffff99;">&lt;?php echo get_post_meta($post-&gt;ID, 'mp3', true); ?&gt;</span>"
width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff"
wmode="window" flashvars="playerMode=embedded" /&gt;</pre>
<p>There are a few things to note here:</p>
<ul>
<li>The $key has been replaced by whatever you added in the custom fields area for &#8220;Name&#8221;, wrapped in single quotes.</li>
<li>Be sure that echo is include, otherwise the value won&#8217;t show up.</li>
</ul>
<p>The only problem with this method is that if you don&#8217;t enter anything for the custom field &#8220;mp3&#8243;, no mp3 will be embedded. That said, we&#8217;re going to do two things to make this work better:</p>
<ol>
<li>We&#8217;re going to create a variable so that we don&#8217;t have to keep typing &lt;?php echo get_post_meta(&#8230;); ?&gt; over and over again.</li>
<li>We&#8217;re going to check to see if something is actually in the field using the PHP function empty().</li>
</ol>
<p>And here&#8217;s how that&#8217;s done:</p>
<pre>&lt;?php
<span style="background-color: #ffff99;">$mp3 = get_post_meta($post-&gt;ID, 'mp3', true);</span>
<span style="background-color: #ffcc99;">if (!empty($mp3)) : ?&gt;</span>
 &lt;embed type="application/x-shockwave-flash"
 src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl=<span style="background-color: #ff99cc;">&lt;?php echo $mp3; ?&gt;</span>"
 width="400" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff"
 wmode="window" flashvars="playerMode=embedded" /&gt;
<span style="background-color: #cc99ff;">&lt;?php endif; ?&gt;</span></pre>
<p>What&#8217;s going on here?</p>
<ol>
<li><span style="background-color: #ffff99;">Line 2</span> is setting the variable $mp3 to the value of the custom field.</li>
<li><span style="background-color: #ffcc99;">Line 3</span> is checking to see if the value of &#8216;mp3&#8242; is NOT empty (that&#8217;s what the exclamation point stands for). Then closing the PHP brackets to allow for HTML code.</li>
<li><span style="background-color: #ff99cc;">Line 5</span> is printing (or spitting out) the exact value of &#8216;mp3&#8242; into the embed code.</li>
<li><span style="background-color: #cc99ff;">Line 8</span> is starting up the PHP code again, and ending the if statement started in <span style="background-color: #ffcc99;">Line 3</span>.</li>
</ol>
<p>What all this does is tells WordPress, &#8220;Hey, if something&#8217;s in the custom field &#8220;mp3&#8243;, spit that out into the embed code, if not, don&#8217;t even mess with the embed code because we don&#8217;t need it.</p>
<p>And that&#8217;s how you do it. You can put this code above or below the_content(); but it needs to be in the loop.</p>
<div class="related-tags"><h3>Other Posts in this Series</h3><ul><li><a href="http://geekoutwith.me/2010/04/my-first-guest-post-at-buildinternet-com/">My first guest post at buildinternet.com</a></li><li><a href="http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-2/">Using embeddable mp3 players &#8211; Part 2</a></li><li><a href="http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-1/">Using embeddable mp3 players &#8211; Part 1</a></li></ul></div>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using embeddable mp3 players &#8211; Part 1</title>
		<link>http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-1/</link>
		<comments>http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-1/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 03:18:51 +0000</pubDate>
		<dc:creator>Joseph</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Embeddable Players Series]]></category>
		<category><![CDATA[mp3]]></category>

		<guid isPermaLink="false">http://geekitopia.com/?p=824</guid>
		<description><![CDATA[A few weeks ago I wanted to add an mp3 to my daughter&#8217;s baby book blog (built on WordPress). At first I thought to install a plugin, but it seemed a bit much for my needs. After trying a few things, I eventually settled on a nice theme-integrated method that uses a google flash-based mp3 player. I&#&#8230;]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I wanted to add an mp3 to my daughter&#8217;s baby book blog (built on WordPress). At first I thought to install a plugin, but it seemed a bit much for my needs. After trying a few things, I eventually settled on a nice theme-integrated method that uses a google flash-based mp3 player. I&#8217;ll elaborate on that in part 2. This post has a nice list of embeddable flash mp3 players:</p>
<p><a href="http://www.labnol.org/internet/design/html-embed-mp3-songs-podcasts-music-in-blogs-websites/2232/" target="_blank">How to Embed MP3 Audio Files In Web Pages With Google or Yahoo! Flash Player</a></p>
<p>Using this method, you can paste the embed code into your post or page. In the next post, I&#8217;ll go into some detail about a neat way to use this method in your WordPress theme.</p>
<div class="related-tags"><h3>Other Posts in this Series</h3><ul><li><a href="http://geekoutwith.me/2010/04/my-first-guest-post-at-buildinternet-com/">My first guest post at buildinternet.com</a></li><li><a href="http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-2/">Using embeddable mp3 players &#8211; Part 2</a></li><li><a href="http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-1/">Using embeddable mp3 players &#8211; Part 1</a></li></ul></div>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">
<h1>How to Embed MP3 Audio Files In Web Pages With Google or Yahoo! Flash Player</h1>
</div>
]]></content:encoded>
			<wfw:commentRss>http://geekoutwith.me/2010/01/using-embeddable-mp3-players-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
