﻿<?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>Grimmdude &#187; Tutorials</title>
	<atom:link href="http://www.grimmdude.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.grimmdude.com</link>
	<description>Jammin &#039;till the jammin&#039;s through.</description>
	<lastBuildDate>Fri, 06 Jan 2012 23:09:41 +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>menuFlip &#8211; jQuery Plugin for Flipping Navigation</title>
		<link>http://www.grimmdude.com/jquery-menuflip/</link>
		<comments>http://www.grimmdude.com/jquery-menuflip/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 18:25:17 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[flipping]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[menus]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=2063</guid>
		<description><![CDATA[menuFlip is a jQuery plugin for adding a &#8216;flipping&#8217; effect to text based navigational menu items when hovered over without needing to use background images, which can be a pain.<a href="http://www.grimmdude.com/jquery-menuflip/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p>menuFlip is a jQuery plugin for adding a &#8216;flipping&#8217; effect to text based navigational menu items when hovered over without needing to use background images, which can be a pain.</p>
<h2>Menu Example</h2>
<ul id="flip_nav">
<li><a href=#>Home</a></li>
<li><a href=#>Web</a></li>
<li><a href=#>Blog</a></li>
<li><a href=#>Contact</a></li>
</ul>
<h2>HTML</h2>
<p>All you need is this simple markup.</p>
<pre><code>&lt;ul id="flip_nav"&gt;
	&lt;li&gt;&lt;a href="/home"&gt;Home&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/web"&gt;Web&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/blog"&gt;Blog&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="/contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</code></pre>
<h2>Calling the Plugin</h2>
<pre><code>$(function() {
	$('#flip_nav').menuFlip();
});</code></pre>
<h2>CSS</h2>
<p>No extra CSS is required for this plugin to function, but you&#8217;ll probably want to define a width for the <code>ul</code> or float the <code>li</code> elements to the left so they are inline.  Also, the flipped items have a class of <code>flipped_item</code> so you can style that puppy as you like.  Here&#8217;s an example of the CSS for the above example:</p>
<pre><code>ul#flip_nav li {
	float:left;
	text-align:center;
	margin:0px 10px 0px 0px;
}

/*this defines the styling of the new flipped menu item*/
ul#flip_nav a.flipped_item {
	background-color:#000000;
	color: #ffffff;
}</code></pre>
<p>You can download this plugin from the <a href="https://github.com/grimmdude/jQuery-menuFlip" title="jQuery menuFlip Plugin" target="_blank">GitHub repository here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/jquery-menuflip/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Bouncing Ball Using Raphaël Javascript Library</title>
		<link>http://www.grimmdude.com/bouncing-ball-using-raphael-javascript-library/</link>
		<comments>http://www.grimmdude.com/bouncing-ball-using-raphael-javascript-library/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 02:58:54 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[raphael]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=2038</guid>
		<description><![CDATA[Today&#8217;s personal project was to create a simple bouncing ball using the Raphaël JavaScript library.  This is such a powerful library, if you&#8217;re not familiar with it you should check<a href="http://www.grimmdude.com/bouncing-ball-using-raphael-javascript-library/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s personal project was to create a simple bouncing ball using the <a title="Raphaël" href="http://raphaeljs.com/index.html" target="_blank">Raphaël</a> JavaScript library.  This is such a powerful library, if you&#8217;re not familiar with it you should check it out.</p>
<h2>The Ball</h2>
<p>Lots of hang time.</p>
<div style="text-align:center;" id="bouncy_ball"></div>
<h2>The Code</h2>
<p>This short script creates and animates the ball and the shadow.  When placed in the <code>&lt;head&gt;</code> of the document the bouncy ball animation will be inserted into a <code>&lt;div id="bouncy_ball"&gt;&lt;/div&gt;</code>.  Remember to include the latest versions of Raphaël and jQuery in the <code>&lt;head&gt;</code> of the document <em>before</em> this script.</p>
<pre><code>&lt;script&gt;
$(document).ready(function() {
	var paper = Raphael(document.getElementById("bouncy_ball"), 100, 200);
	var bouncy_ball = paper.circle(30, 115, 10).attr("gradient", "r#293df7-#1e2dbd");
	var bouncy_shadow = paper.ellipse(30, 120, 8, 8).attr({fill: "#484643", stroke:"none"}).toBack();
	function bounce_up() {
		bouncy_ball.animate({cy: 115}, 500, '&lt;', bounce_drop);
		bouncy_shadow.animate({rx:8,ry:8,fill:"#484643"}, 500, '&lt;');
	}	
	function bounce_drop() {
		bouncy_ball.animate({cy: 15}, 600, '&gt;', bounce_up);
		bouncy_shadow.animate({rx:25,ry:10,fill:"#e7e7e7"}, 600, '&gt;');
	}
	bounce_drop();
});
&lt;/script&gt;</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/bouncing-ball-using-raphael-javascript-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Replacement Script with jQuery for WordPress</title>
		<link>http://www.grimmdude.com/the-best-image-replacement-script-with-jquery/</link>
		<comments>http://www.grimmdude.com/the-best-image-replacement-script-with-jquery/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 00:23:16 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=1956</guid>
		<description><![CDATA[Here&#8217;s a script to ease the use of image replacements for WordPress users. When hovered, the src of the image will be replaced by a url which you define in<a href="http://www.grimmdude.com/the-best-image-replacement-script-with-jquery/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a script to ease the use of image replacements for WordPress users.  When hovered, the <code>src</code> of the image will be replaced by a url which you define in the <code>alt</code> attribute in the image editor dialog. The image will swap without delay on a hover since the script pre-loads all of the swappable images. Once this script is in your site all you need to do is:</p>
<ul>
<li>Add class=&#8221;image_hover&#8221; to the image.</li>
<li>Specify the URL of the swapped image in the &#8216;alt&#8217; attribute.  If using WordPress there&#8217;s an &#8216;alt&#8217; field in the image editor dialog so it makes this easy to access.</li>
</ul>
<p>It will apply to any image with <code>class="image_hover"</code> so it&#8217;s very scalable and great for sites using lots of image replacements.  Using the <code>alt</code> attribute to store the swapped image url sort of makes sense too because it&#8217;s the alternate image.</p>
<h3>Image Code Example</h3>
<p>Hover over the WordPress logo below to see it magically switch between the black/white version to the color one.</p>
<p><img src="http://www.grimmdude.com/wp-content/uploads/2011/08/Wordpress_118px_bw.jpg" alt="http://www.grimmdude.com/wp-content/uploads/2011/08/Wordpress_118px.jpg" title="Image Swap Example" width="118" height="118" class="alignnone size-full wp-image-2015 image_hover" /></p>
<pre><code>&lt;img class="image_hover" src="default_image.jpg" alt="hover_swap_image.jpg" /&gt;</code></pre>
<h3>The Script</h3>
<p>Of course, you&#8217;ll need to have the jQuery library loaded up for this to work&#8230;since it&#8217;s jQuery.  You can copy &#038; paste this script directly into the <head> of your document below the call to jQuery.js</p>
<pre><code>&lt;script&gt;
$(document).ready(function() {
  //preload each image for quick swaps
  $('img.image_hover').each(function () {
  	var image_url = $(this).attr('alt');
  	var image_preload = $('&lt;img /&gt;').attr('src', image_url);
  });

  //on hoverin/hoverout replace src with alt
  $('img.image_hover').hover( 
  	function() {
  		var alt_url = $(this).attr('alt');
  		var src_url = $(this).attr('src');
  		$(this).attr('src',alt_url).attr('alt',src_url);
  	},
  	function() {
  		var alt_url = $(this).attr('alt');
  		var src_url = $(this).attr('src');
  		$(this).attr('src',alt_url).attr('alt',src_url);
  	}
  );
});
&lt;/script&gt;</code></pre>
<h2>XD&#8217;s Suggestion</h2>
<p>Optionally my friend <a href="http://demo.apsulis.com/" target="_blank">XD</a> provided a great script to use for those who don&#8217;t want to use the <code>alt</code> attribute to house the url of the swapped image.  Using this method you will need to: </p>
<ul>
<li>Add class=&#8221;xd_image_hover&#8221; to the image.</li>
<li>Give the two images the same name but append &#8216;-normal&#8217; to the first image and &#8216;-hover&#8217; to the swapped image. ie imagename-normal.jpg &#038; imagename-hover.jpg</li>
</ul>
<h3>Image Code Example</h3>
<p>Here&#8217;s a working example of XD&#8217;s alternative method:<br />
<img src="http://www.grimmdude.com/wp-content/uploads/2011/09/Wordpress_XDexample-normal.jpg" alt="XD's Image Replacement Example" title="XD's Image Replacement Example" width="118" height="118" class="alignnone size-full wp-image-2015 xd_image_hover" /></p>
<pre><code>&lt;img class="xd_image_hover" src="imagename-normal.jpg" alt="XD's Image Replacement Script" /&gt;</code></pre>
<h3>The Script</h3>
<pre><code>&lt;script&gt;
/* ENABLE ROLLOVER ON TARGETED IMAGES (ALL BROWSERS) */
$(document).ready(function() {
	//preload each image for quick swaps
	$('img.xd_image_hover').each(function () {
  		var image_url = $(this).attr('src').replace("-normal","-hover");
  		var image_preload = $('&lt;img /&gt;').attr('src', image_url);
  		alert(image_url);
  	});
  
	$('img.xd_image_hover').hover( 
			function() { jQuery(this).attr("src", jQuery(this).attr("src").replace("-normal","-hover")); }, 
			function () { jQuery(this).attr("src", jQuery(this).attr("src").replace("-hover","-normal")); } 
	);  
});
&lt;/script&gt;</code></pre>
<p>I edited it slightly to use the &#8216;image_hover&#8217; class name as well as to preload the image for a quick swap without waiting.</head></p>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/the-best-image-replacement-script-with-jquery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Confirming a Link Click with jQuery</title>
		<link>http://www.grimmdude.com/confirming-a-link-click-with-jquery/</link>
		<comments>http://www.grimmdude.com/confirming-a-link-click-with-jquery/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 05:29:50 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[useful]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=1920</guid>
		<description><![CDATA[Here&#8217;s a function I wrote while working on a project that pops up a box confirming whether or not the user is sure the want to go to a link<a href="http://www.grimmdude.com/confirming-a-link-click-with-jquery/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a function I wrote while working on a project that pops up a box confirming whether or not the user is sure the want to go to a link they clicked, like <a class="confirm" href="http://www.grimmdude.com/confirming-a-link-click-with-jquery/" title="This link will popup a confirmation box and bring you back to this post if you click OK.">this</a>.</p>
<p>It may be simple, but I haven&#8217;t really used javascript&#8217;s confirm() function much in the past and everything I found only directed the user to a link predefined in the function.  I wanted a function that would confirm any link I wanted it to without knowing the link destination in advance, in other words I wanted to confirm dynamic links.</p>
<h2>The Code</h2>
<p>This jQuery function will pop up a confirmation box on any link with the class &#8216;confirm&#8217; and send the user to the destination of that link if they click &#8216;OK&#8217;.</p>
<pre><code>$(document).ready(function() {
  $('a.confirm').click(function(event) {
    event.preventDefault()
    var url = $(this).attr('href');
    var confirm_box = confirm('Are you sure you want to click this link?');
    if (confirm_box) {
       window.location = url;
       //uncomment below and remove above if you want the link to open in a new window
       //window.open(url,'_blank');
    }
  });
});</code></pre>
<h3>Code Explained</h3>
<pre><code>//load once document is ready
$(document).ready(function() {

  //select all anchors with a class of 'confirm'
  $('a.confirm').click(function(event) {

    //prevent the default action of opening the link
    event.preventDefault()

    //grab the url of the current link
    var url = $(this).attr('href');

    //set the confirmation message
    var confirm_box = confirm('Are you sure you want to click this link?');

    //if the confirmation is true (user clicks ok) direct the browser to the link's url
    if (confirm_box) {
       window.location = url;
       //uncomment below and remove above if you want the link to open in a new window
       //window.open(url,'_blank');
    }
  });
});</code></pre>
<h2>Example</h2>
<p>Because the link below has a class of &#8216;confirm&#8217; you&#8217;ll have to confirm whether or not you want to go to the link&#8217;s destination.</p>
<h3>Link Code</h3>
<pre><code>&lt;a href="http://www.grimmdude.com/contact/" class="confirm"&gt;Link Example&lt;/a&gt;</code></pre>
<h3>The Link</h3>
<p><a href="http://www.grimmdude.com/contact/" class="confirm">Link Example</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/confirming-a-link-click-with-jquery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Simple Form Submit with Ajax via jQuery</title>
		<link>http://www.grimmdude.com/simple-form-submit-with-ajax-via-jquery/</link>
		<comments>http://www.grimmdude.com/simple-form-submit-with-ajax-via-jquery/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 16:20:06 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=1792</guid>
		<description><![CDATA[Anyone who knows me knows I like to keep things simple. I&#8217;ve been working a lot lately forms that need some ajax magic to keep the site usage streamlined. Here&#8217;s<a href="http://www.grimmdude.com/simple-form-submit-with-ajax-via-jquery/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Anyone who knows me knows I like to keep things simple. I&#8217;ve been working a lot lately forms that need some ajax magic to keep the site usage streamlined.  Here&#8217;s what I found works best for me:</p>
<h2>The Form</h2>
<p>OK, so I&#8217;ll start with my basic form to add a name:</p>
<pre><code>&lt;div id="update_name_div" style="display:none;"&gt;&lt;p&gt;New name added.&lt;/p&gt;&lt;/div&gt;
	&lt;form action="handler.php"&gt;
			&lt;label for="new_name"&gt;New Name&lt;/label&gt;
			&lt;input type="text" id="new_name" name="new_name" placeholder="Add Name..." /
		        &lt;input type="submit" id="submit_name_form" class="button-primary" value="Add" /&gt;
	&lt;/form&gt;
&lt;/div&gt;</code></pre>
<p>That will give us a form with a single input field and a submit button.  We&#8217;ll make the hidden div at the top with id=&#8217;update_name_div&#8217; show once the ajax submit process is complete.</p>
<h2>The Ajax/jQuery</h2>
<p>Now to bring them together using ajax via jQuery; be sure to include the jQuery library in your site for this to work.  I&#8217;m using the $.get method to retrieve the results.  See the comments for an explanation of what&#8217;s going on:</p>
<pre><code>&lt;script&gt;
$(document).ready(function() {
	//when the 'add' button is clicked perform an ajax request to add the entered data
	$('#submit_name_form').click(function(event) { 
			
		//if field is empty setup an alert
		if ($('input[name="new_name"]').val() == '') {
			//prevent submit button to sending to the handler page
			event.preventDefault();
			//popup the alert
			alert('Please enter a name');
		}
		
		//otherwise perform ajax request
		else {
			//hide 'updated' div if it's already up.
			$('#update_name_div').hide();
			
			//prevent submit button to sending to the handler page
			event.preventDefault();
			
			//set the inputted value to a variable
			new_name_var = $('input[name="new_name"]').val();
			
			//send the value to the handler page via GET.  Can be retrieved in php as $_GET['name_input']
			$.get('handler.php', { name_input: new_name_var} );
			
			//show 'updated' div with a nice fade in.
			$('#update_name_div').fadeIn('slow');
			
			//reset the input field to empty
			$('input[name="new_name"]').val('');
		}
	}); 
});
&lt;/script&gt;</code></pre>
<p>Basically the script first checks to see if the field is empty.  If it is the user will be alerted, otherwise it will collect the value of the input field and send it over to handler.php for handling.  Once the process is complete a div will fade in at the top of the screen letting the user know their data was submitted.  All this without ever leaving the page.  </p>
<h2>The Handler</h2>
<p>Next we need a handler page which will take the data from this form and add it to the database (or do whatever else you want).  Here&#8217;s the handler.php:</p>
<h3>handler.php</h3>
<pre><code>&lt;?php
$new_name = $_GET[name_input];
echo $new_name;
?&gt;</code></pre>
<p>You can have the handler do whatever you want; insert information into the database, email information to yourself, or in this case just echo out the inputted information.</p>
<p>Again, this is a very simple implementation that works.  Feel free to post any questions or suggestions to make it better.  Blizam.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/simple-form-submit-with-ajax-via-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript Toggle Checkbox to Hide/Show Text</title>
		<link>http://www.grimmdude.com/javascript-toggle-checkbox-to-hideshow-text/</link>
		<comments>http://www.grimmdude.com/javascript-toggle-checkbox-to-hideshow-text/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 03:50:58 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[simple]]></category>
		<category><![CDATA[toggle]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=1396</guid>
		<description><![CDATA[I was working the other day on creating some text that would appear and disappear at the check of a checkbox.  I realized it&#8217;s pretty simple to accomplish with a<a href="http://www.grimmdude.com/javascript-toggle-checkbox-to-hideshow-text/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p>I was working the other day on creating some text that would appear and disappear at the check of a checkbox.  I realized it&#8217;s pretty simple to accomplish with a little javascript!  There are a few ways of accomplishing this, but here&#8217;s the method I used.</p>
<h2>&lt;head&gt;</h2>
<p>Insert this bit of script in the head of your document:</p>
<pre>&lt;script language="javascript"&gt;
function checktoggle() {
var textboxid = document.getElementById('checktoggle');
if (textboxid.innerHTML == "") {textboxid.innerHTML = "here's my text!";}
else {textboxid.innerHTML = "";}
}﻿
&lt;/script&gt;
</pre>
<h2>&lt;body&gt;</h2>
<p>Then, in the &lt;body&gt; tags of your document create an empty div with an id of &#8220;checktoggle&#8221; , and a checkbox.  On the checkbox, be sure to add the onclick=&#8221;checktoggle()&#8221; action so when clicked it will run the above function.:</p>
<pre>&lt;div id="checktoggle"&gt;&lt;/div&gt;
&lt;input <code>onclick="checktoggle()"</code> type="checkbox"/&gt;</pre>
<p>That&#8217;s it, try it out:</p>
<div id="checktoggle"></div>
<input onclick="checktoggle()" type="checkbox" />
<p>To change the text which displays just modify the &#8220;here&#8217;s my text!&#8221; portion (inside the quotes only) of the javascript which you inserted into the head of your document to read whatever you like.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/javascript-toggle-checkbox-to-hideshow-text/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Create a Popup Music Player Using the Simple Popup Plugin and XSPF Player for WordPress</title>
		<link>http://www.grimmdude.com/how-to-create-a-popup-music-player-using-the-simple-popup-plugin-for-wordpress/</link>
		<comments>http://www.grimmdude.com/how-to-create-a-popup-music-player-using-the-simple-popup-plugin-for-wordpress/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 14:58:39 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[bands]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[jukebox]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[pop up]]></category>
		<category><![CDATA[popup]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=1204</guid>
		<description><![CDATA[Requests have been abundant when it comes to using my Simple Popup Plugin for WordPress to create a .  Thus, I have written this guide to help you on your<a href="http://www.grimmdude.com/how-to-create-a-popup-music-player-using-the-simple-popup-plugin-for-wordpress/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Requests have been abundant when it comes to using my <a title="Simple Popup Plugin" href="http://www.grimmdude.com/wordpress-simple-popup-plugin/" target="_blank">Simple Popup Plugin</a> for WordPress to create a <a href='http://www.grimmdude.com/music-player/' onClick='return popitup(this.href);' target='_blank'>popup music player</a>.  Thus, I have written this guide to help you on your journey of musical satisfaction.</p>
<p>Here&#8217;s what we&#8217;re going for:</p>
<p style="text-align: center;"><img class="size-full wp-image-1217 aligncenter" style="border: 1px solid black;" title="Popup Music Player" src="http://www.grimmdude.com/wp-content/uploads/2009/11/music_player.png" alt="Popup Music Player" width="505" height="420" /></p>
<h2>Download the Plugins</h2>
<p>Download and install/activate the <a title="XSPF Player Plugin" href="http://www.boriel.com/plugins/the-wordpress-xspf-player-plugin/" target="_blank">XSPF Music Player plugin</a> and this <a title="Download Simple Popup Plugin" href="http://wordpress.org/extend/plugins/simple-popup-plugin/" target="_blank">Simple Popup plugin</a>.</p>
<h2>Create Page Template</h2>
<p>Create a page template to be used for the page that you intend to popup.  This should be very minimal, ie no sidebar, navigation, etc.  You basically just want an empty page with maybe a background color and possibly some links associated with your music (facebook, myspace,&#8230;).</p>
<p>The <strong>XSPF Player</strong> plugin requires you to add this tag in the body of this template for the player to show:</p>
<pre><code>&lt;?php xspf_player::start('playlistname'); ?&gt;</code></pre>
<p>For info on creating a page template see the <a title="Wordpress.org Page Templates" href="http://codex.wordpress.org/Pages#Page_Templates" target="_blank">WordPress documentation</a>.  If you like you can download <a title="Music Player Page Template" href="http://www.grimmdude.com/wp-content/uploads/2009/11/music_player_popup.php_.zip" target="_self">this music player popup page template</a> which already contains the XSPF Player tag and place it in your current theme&#8217;s folder for it to work.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1218" style="border: 1px solid black;" title="Page Template" src="http://www.grimmdude.com/wp-content/uploads/2009/11/page_template.png" alt="Page Template" width="550" height="426" /></p>
<h2>Create New Page</h2>
<p>Create a new page (not page template) in WordPress with no text in the body and choose the page template you just created from the template pull-down menu.</p>
<h2><img class="size-full wp-image-1219 aligncenter" style="border: 1px solid black;" title="Create New Page" src="http://www.grimmdude.com/wp-content/uploads/2009/11/create_page_popup.png" alt="Create New Page" width="550" height="345" /></h2>
<h2>Link it Up</h2>
<p>Using the <a title="Simple Popup Plugin" href="http://www.grimmdude.com/wordpress-simple-popup-plugin/" target="_blank">Simple Popup Plugin shortcode, template tag, or widget</a> create a link to your newly created page wherever you desire.  Set the dimensions for the pop up in the Simple Popup Plugin&#8217;s options page.</p>
<p>And that&#8217;s it!  Ain&#8217;t no thang.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/how-to-create-a-popup-music-player-using-the-simple-popup-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Creating Two Column Unordered &lt;ul&gt; Lists</title>
		<link>http://www.grimmdude.com/creating-two-column-unordered-ul-lists/</link>
		<comments>http://www.grimmdude.com/creating-two-column-unordered-ul-lists/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 14:15:15 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[lists]]></category>
		<category><![CDATA[rows]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[two]]></category>
		<category><![CDATA[unordered]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=1105</guid>
		<description><![CDATA[I&#8217;ve been searching like mad how to split an unordered list &#60;ul&#62; into two columns and haven&#8217;t found an easy solution.  By using combined info from a few sites I<a href="http://www.grimmdude.com/creating-two-column-unordered-ul-lists/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-1201 alignnone" title="Creating Two Column Unordered Lists" src="http://www.grimmdude.com/wp-content/uploads/2009/11/red_ul-300x300.jpg" alt="Creating Two Column Unordered Lists" width="101" height="101" />I&#8217;ve been searching like mad how to split an unordered list &lt;ul&gt; into two columns and haven&#8217;t found an easy solution.  By using combined info from a few sites I figured out an easy way to do it.  If you already know how to do this then mozie on down folks.  Here it is:</p>
<p>Make a &lt;div class=&#8221;double_column_list&#8221;&gt; and put a &lt;ul&gt; in it with some list items.   Set the &lt;li&gt; class to display at 50% width and float it to the left.</p>
<h2>CSS</h2>
<pre><code>.double_column_list li {float: left; width: 50%;}</code></pre>
<h2>HTML</h2>
<pre><code>&lt;div class="double_column_list"&gt;
&lt;ul&gt;
&lt;li&gt;Awesome Stuff&lt;/li&gt;
&lt;li&gt;Awesome Stuff&lt;/li&gt;
&lt;li&gt;Awesome Stuff&lt;/li&gt;
&lt;li&gt;Awesome Stuff&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</code></pre>
<h2>Result</h2>
<style type="text/css"> .double_column_list li { float: left; width: 50%; } </style>
<div class="double_column_list">
<ul>
<li>Awesome Stuff</li>
<li>Awesome Stuff</li>
<li>Awesome Stuff</li>
<li>Awesome Stuff</li>
</ul>
</div>
<p>Boosh, 2 column unordered lists.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/creating-two-column-unordered-ul-lists/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>WordPress 2.7 Enhanced Comments for Dummies</title>
		<link>http://www.grimmdude.com/wordpress-27-enhanced-comments-for-dummies/</link>
		<comments>http://www.grimmdude.com/wordpress-27-enhanced-comments-for-dummies/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 14:40:22 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[2.7]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=476</guid>
		<description><![CDATA[I, like many others, have recently upgraded to WordPress 2.7 because of all the added features.  My particular interest was in the enhanced comments which included threading and paging, but<a href="http://www.grimmdude.com/wordpress-27-enhanced-comments-for-dummies/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p>I, like many others, have recently upgraded to WordPress 2.7 because of all the added features.  My particular interest was in the enhanced comments which included threading and paging, but of course themes created before the release of 2.7 aren&#8217;t built for it so you can&#8217;t take advantage of these new features without some modification.  After reading the <a title="Migrating Plugins and Themes to 2.7/Enhanced Comment Display" href="http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7/Enhanced_Comment_Display" target="_blank">Migrating Plugins and Themes to 2.7/Enhanced Comment Display</a> on WordPress.org I knew what needed to be done but unfortunately didn&#8217;t really have the php skillz to pull it off.  So what did I do?  I knew that the WordPress Default theme that was upgraded with 2.7 was a shining example of what the code was supposed to look like (<em>see at the bottom of this post for the code</em>), so here&#8217;s what I did:</p>
<ol>
<li>Enabled comment threading in the settings menu.</li>
<li>Highlighted/copied all the code on my current theme&#8217;s comments.php file and pasted it into a plain text document as a backup.</li>
<li>Highlighted/copied all the code on the WordPress Default theme.</li>
<li>Went back to the comments.php file for my current theme, erased all the code, and replaced it with the code from the WordPress Default theme&#8217;s comments.php file (I made the backup just in case it didn&#8217;t work out).</li>
<li>Opened my current theme&#8217;s header.php file and added the following code for the JavaScript immediately before the call to wp_head().</li>
</ol>
<h3>JavaScript Code:</h3>
<p>[sourcecode language='php']< ?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>[/sourcecode]</p>
<p>That left me with a perfectly good working comments that thread upon command.  The only problem was the comments didn&#8217;t really display right because of lack of css.  I have basic css knowledge but still needed some help, that&#8217;s where <a title="ejabs.com" href="http://www.ejabs.com/blog/2009/01/make-old-themes-compatible-with-wordpress-27-comment-features/" target="_blank">Matt Jab&#8217;s blog post</a> came in mad handy.  He lays out his own blog&#8217;s css for comments very clearly which makes a great foundation for tweaking on your blog.</p>
<p>Hope that helps!</p>
<h3>WordPress 2.7 Default Theme comment.php Code:</h3>
<p>[sourcecode language='php']< ?php<br />
/**<br />
* @package WordPress<br />
* @subpackage Default_Theme<br />
*/</p>
<p>// Do not delete these lines<br />
if (!empty($_SERVER['SCRIPT_FILENAME']) &#038;&#038; 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))<br />
die ('Please do not load this page directly. Thanks!');</p>
<p>if ( post_password_required() ) { ?></p>
<p class="nocomments">This post is password protected. Enter the password to view comments.</p>
<p>< ?php<br />
return;<br />
}<br />
?></p>
<p><!-- You can start editing here. --></p>
<p>< ?php if ( have_comments() ) : ?></p>
<h3 id="comments">< ?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;< ?php the_title(); ?>&#8221;</h3>
<div class="navigation">
<div class="alignleft">< ?php previous_comments_link() ?></div>
<div class="alignright">< ?php next_comments_link() ?></div>
</div>
<ol class="commentlist">
< ?php wp_list_comments(); ?>
</ol>
<div class="navigation">
<div class="alignleft">< ?php previous_comments_link() ?></div>
<div class="alignright">< ?php next_comments_link() ?></div>
</div>
<p>< ?php else : // this is displayed if there are no comments so far ?></p>
<p>< ?php if ('open' == $post->comment_status) : ?><br />
<!-- If comments are open, but there are no comments. --></p>
<p>< ?php else : // comments are closed ?><br />
<!-- If comments are closed. --></p>
<p class="nocomments">Comments are closed.</p>
<p>< ?php endif; ?><br />
< ?php endif; ?></p>
<p>< ?php if ('open' == $post->comment_status) : ?></p>
<div id="respond">
<h3>< ?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
<div class="cancel-comment-reply">
<small>< ?php cancel_comment_reply_link(); ?></small>
</div>
<p>< ?php if ( get_option('comment_registration') &#038;&#038; !$user_ID ) : ?></p>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=< ?php echo urlencode(get_permalink()); ?>&#8220;>logged in</a> to post a comment.</p>
<p>< ?php else : ?></p>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php&#8221; method=&#8221;post&#8221; id=&#8221;commentform&#8221;></p>
<p>< ?php if ( $user_ID ) : ?></p>
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php&#8221;>< ?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>&#8221; title=&#8221;Log out of this account&#8221;>Log out &raquo;</a></p>
<p>< ?php else : ?></p>
<p>
<input type="text" name="author" id="author" value="<?php echo $comment_author; ?/>&#8221; size=&#8221;22&#8243; tabindex=&#8221;1&#8243; < ?php if ($req) echo "aria-required='true'"; ?> /><br />
<label for="author"><small>Name < ?php if ($req) echo "(required)"; ?></small></label></p>
<p>
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?/>&#8221; size=&#8221;22&#8243; tabindex=&#8221;2&#8243; < ?php if ($req) echo "aria-required='true'"; ?> /><br />
<label for="email"><small>Mail (will not be published) < ?php if ($req) echo "(required)"; ?></small></label></p>
<p>
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?/>&#8221; size=&#8221;22&#8243; tabindex=&#8221;3&#8243; /><br />
<label for="url"><small>Website</small></label></p>
<p>< ?php endif; ?></p>
<p><!--
<p><small><strong>XHTML:</strong> You can use these tags: <code>&lt; ?php echo allowed_tags(); ?&gt;</code></small>&#8211;></p>
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<p>
<input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
< ?php comment_id_fields(); ?>
</p>
<p>< ?php do_action('comment_form', $post->ID); ?></p>
</form>
<p>< ?php endif; // If registration required and not logged in ?>
</div>
<p>< ?php endif; // if you delete this the sky will fall on your head ?><br />
[/sourcecode]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/wordpress-27-enhanced-comments-for-dummies/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Properly Drink a Beer</title>
		<link>http://www.grimmdude.com/how-to-properly-drink-a-beer/</link>
		<comments>http://www.grimmdude.com/how-to-properly-drink-a-beer/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 15:02:55 +0000</pubDate>
		<dc:creator>Garrett</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[beer]]></category>
		<category><![CDATA[China]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[shanghai]]></category>

		<guid isPermaLink="false">http://www.grimmdude.com/?p=379</guid>
		<description><![CDATA[I thought, since I&#8217;ve been purchasing 24oz Budweisers at next to nothing here in Shanghai, I would share some of my beer drinking secrets to the working class peoples.  <a href="http://www.grimmdude.com/how-to-properly-drink-a-beer/">&#160; read more...</a>]]></description>
			<content:encoded><![CDATA[<p>I thought, since I&#8217;ve been purchasing 24oz Budweisers at next to nothing here in Shanghai, I would share some of my beer drinking secrets to the working class peoples.   Below you will find a few tips for increasing your beer drinking satisfaction.</p>
<ol>
<li><strong>Choose the right beer for the occasion</strong> &#8211; While I have been known to drink a Natty Ice at a formal gala, selecting the right beer can make a big difference in personal gratification and social perception.  My rule of thumb is nothing cheaper than Sierra Nevada at a black tie event, and nothing more expensive than Miller while chillin at home.  Now I know a lot of you beer aficionados are saying:<br />
<blockquote><p>I like to drink a heavy micro brew while browsing the web.</p></blockquote>
<p>Totally cool, I used to do the same myself but the stuff can get expensive.  I&#8217;m happy with college grade brews for recreational enjoyment.</li>
<li><strong>Location location location</strong> &#8211; Next step is to find a suitable location for brew consumption.  My personal favorite is on my most comfortable chair with my laptop&#8230;on my lap.  Put on my iTunes <a title="Facebook music page" href="http://www.facebook.com/pages/Garrett-Grimm/54917277817" target="_blank">beer drinking play list</a> and roll it out it flat.</li>
<p><code></code></p>
<li><strong>Drinking the beer</strong> &#8211; Alright, let&#8217;s slow down a little.  This is the most important part!  The moment of truth.  Are you comfortable?  Got that <a title="Facebook music page" href="http://www.facebook.com/pages/Garrett-Grimm/54917277817" target="_blank">music playing</a>?  OK, pop the cap on the brew and make it happen.  Start with just a sip.  Let your mouth taste the delicious flavor and crave more.  Then give it what it wants, take a nice healthy gulp and think to yourself:<br />
<blockquote><p>So this is what it&#8217;s like.</p></blockquote>
<p>Because this <em>is</em> what&#8217;s it&#8217;s like.  Enjoy.</li>
</ol>
<p><img class="size-medium wp-image-395 alignnone" title="Pabst" src="http://www.grimmdude.com/wp-content/uploads/2009/01/pabstbeerclose-300x225.jpg" alt="Pabst" width="300" height="225" /></p>
<p><em>Picture by <a title="uberculture on Flickr" href="http://flickr.com/photos/uberculture/" target="_blank">uberculture</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.grimmdude.com/how-to-properly-drink-a-beer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

