<?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>Edward Stafford</title>
	<atom:link href="http://www.edwardstafford.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edwardstafford.com</link>
	<description>Technologist, Artist, and Geek</description>
	<lastBuildDate>Tue, 09 Mar 2010 18:28:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tech Humor: Password Policy</title>
		<link>http://www.edwardstafford.com/2010/03/09/tech-humor-password-policy/</link>
		<comments>http://www.edwardstafford.com/2010/03/09/tech-humor-password-policy/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 15:18:57 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/2010/03/09/tech-humor-password-policy/</guid>
		<description><![CDATA[
Found this in an IT blog comment about Network Password Policies.
During a company&#8217;s recent password audit, it was found that a blonde employee was using the following password:
&#8220;MickeyMinniePlutoHueyLouieDeweyDonaldGoofySacramento&#8220;
When asked why she had such a long password, she said she was told that it had to be at least 8 characters long and include at least [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>
<p>Found this in an IT blog comment about Network Password Policies.</p>
<p style="margin-top: 8px; margin-right: 0px; margin-bottom: 8px; margin-left: 20px; padding: 0px;">During a company&rsquo;s recent password audit, it was found that a blonde employee was using the following password:</p>
<p style="margin-top: 8px; margin-right: 0px; margin-bottom: 8px; margin-left: 20px; padding: 0px;">&#8220;<strong>MickeyMinniePlutoHueyLouieDeweyDonaldGoofySacramento</strong>&#8220;</p>
<p style="margin-top: 8px; margin-right: 0px; margin-bottom: 8px; margin-left: 20px; padding: 0px;">When asked why she had such a long password, she said she was told that it had to be at least 8 characters long and include at least one capital.</p>
<p>&nbsp;</p>
<p style="font-size: 10px;">  <a href="http://posterous.com">Posted via web</a>   from <a href="http://edstafford.posterous.com/tech-humor-password-policy">Ed&#8217;s Posterous</a>  </p>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2010/03/09/tech-humor-password-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FTW &#8211; Netflix takes a proactive approach, steps up and owns it.</title>
		<link>http://www.edwardstafford.com/2010/02/11/ftw-netflix-takes-a-proactive-approach-steps-up-and-owns-it/</link>
		<comments>http://www.edwardstafford.com/2010/02/11/ftw-netflix-takes-a-proactive-approach-steps-up-and-owns-it/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 22:19:25 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/2010/02/11/ftw-netflix-takes-a-proactive-approach-steps-up-and-owns-it/</guid>
		<description><![CDATA[I signed up for a Netflix account recently after purchasing a new Blu-ray player that supports Netflix movie streaming. I figured &#34;Wow, this is great. I can watch movies when I want from my netflix queue.&#34; My only worry was, would my current internet connection be able to sustain a quality viewing experience. I still [...]]]></description>
			<content:encoded><![CDATA[<div class='posterous_autopost'>I signed up for a Netflix account recently after purchasing a new Blu-ray player that supports Netflix movie streaming. I figured &quot;Wow, this is great. I can watch movies when I want from my netflix queue.&quot; My only worry was, would my current internet connection be able to sustain a quality viewing experience. I still have Verizion DSL. My town does not have FiOS available (and no plans to), and my location has an effect on overall DSL speeds. I&#39;ve learned to live with it.
<p />
<div>So when I had some intermittent problems accessing and watching movies via netflix, I assumed it was due to my connection. That is, until I received an email from Netflix that stated:</div>
<p />
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div><b>&quot;<span style="font-family: arial, helvetica;">Recently, you may have had trouble instantly watching movies or TV episodes via your Netflix Ready Device due to technical issues.</span></b></div>
<p />
<div><b></b><span style="font-family: arial, helvetica;"><b>We are sorry for the inconvenience this may have caused. This is not a great way to begin your Netflix membership. So that you can properly experience Netflix, we would like to extend your free trial..&quot;</b></span></div>
</blockquote>
<p />
<div><span style="font-family: arial, helvetica;">I did not complain about the service, and in fact attributed it to my sometimes questionable DSL connection. But Netflix was right there to voluntarily step up, take the initiative and say <i><b>oops, we goofed</b></i>. It&#39;s refreshing to see a company take responsibility for their service without being prompted.</span></div>
<p />
<div><span style="font-family: arial, helvetica;">There is the argument that I am still on a trial membership basis, and they are just trying to initiate some damage control to keep me on as a paying user when the trial expires. Maybe, but it&#39;s good to know they are keeping tabs on the service and own it when something goes wrong.</span></div>
<p style="font-size: 10px;">  <a href="http://posterous.com">Posted via email</a>   from <a href="http://edstafford.posterous.com/ftw-netflix-takes-a-proactive-approach-steps">Ed&#8217;s Posterous</a>  </p>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2010/02/11/ftw-netflix-takes-a-proactive-approach-steps-up-and-owns-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress: Use Custom Fields To Add Keyword Metadata to Your Posts</title>
		<link>http://www.edwardstafford.com/2010/02/04/wordpress-use-custom-fields-to-add-keyword-meta-data-to-your-posts/</link>
		<comments>http://www.edwardstafford.com/2010/02/04/wordpress-use-custom-fields-to-add-keyword-meta-data-to-your-posts/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 11:00:10 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Code Mode]]></category>
		<category><![CDATA[blogs]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[keywords]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[thematic]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/?p=258</guid>
		<description><![CDATA[One of the short-comings with using Wordpress is that it does not provide an easy, built-in way to include metadata for your web page descriptions and keywords (and rightfully so). Why Not? The reason is simply that Wordpress cannot read your mind. I know it&#8217;s hard to believe when you consider what you can do [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_276" class="wp-caption alignleft" style="width: 262px"><img class="size-medium wp-image-276   " title="Keywords for edwardstafford.com" src="http://www.edwardstafford.com/wp-content/uploads/keywords-black-300x120.png" alt="Keywords at edwardstafford.com" width="252" height="101" /><p class="wp-caption-text">Keywords for edwardstafford.com</p></div>
<p>One of the short-comings with using Wordpress is that it does not provide an easy, built-in way to include metadata for your web page descriptions and keywords (and rightfully so). Why Not? The reason is simply that Wordpress cannot read your mind. I know it&#8217;s hard to believe when you consider what you can do with wordpress, but it&#8217;s true. The issue with Description and Keyword page metadata is that, to be truely effective, it should be created to  describe the content found on each individual page. It&#8217;s how search engines like google determine how to categorize and index each page. Now, there are some SEO &#8220;experts&#8221; who will argue that this information is not very relevant anymore, and I do agree with that for the most part, but there are still SEO benefits to including this metadata vs. not including it at all.</p>
<p>I&#8217;ve been giving this some thought lately and developed a couple ideas of how to add these features into a wordpress site without too much difficulty. A bulb went off in a moment clarity when I started to think about using the Custom Fields to store page specific metadata. I was even naive enough to think I was on to something new (should have known better) but as I started researching some ideas, I realized there were others already doing similar things. Oh well, a minor detail. I took my own approach to the idea anyway, if for no other reason than a learning exercise. Ultimately, this could be added as a premium feature to any custom theme using a couple hooks and some custom theme options magic.</p>
<p><span id="more-258"></span></p>
<h2>Okay smarty-pants! So how do we include description and keyword metadata?</h2>
<p>The solution isn&#8217;t difficult to implement and can be used to add page specific metadata inside the &lt;head&gt; tag of any wordpress page. In this example, I&#8217;m going to show you a simple solution, but with some creativity and a little thought, you can expand this to provide a more robust solution for your own needs.</p>
<h2>Part I: Defining a Custom &#8220;Keywords&#8221; Field</h2>
<p>Custom Fields are a little used gem found in the Posts and Pages page of the Wordpress dashboard / admin back end and available when you add a new post or page, or edit an existing post or page.</p>
<div id="attachment_263" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-263 " title="New Custom Field" src="http://www.edwardstafford.com/wp-content/uploads/custom-fields1-300x152.png" alt="Create a new custom field" width="300" height="152" /><p class="wp-caption-text">Create a new custom field</p></div>
<p>To create a new custom field to use for your page or post keywords, scroll down to the <strong>Custom Fields</strong> section below the main editor and click the &#8220;<strong>Enter new</strong>&#8221; link.</p>
<p>That action will activate the input fields for &#8220;Name&#8221; and &#8220;Value&#8221;.</p>
<p>In the Name field type the name identifier you&#8217;d like to use. This identifier/name will be used to reference the custom field name/value pair later so make it something relevant to avoid confusion. For this example, I am using &#8220;<strong>Keywords</strong>&#8220;.</p>
<p>In the Value field, type the string of keywords or phrases that you want to use as the keyword metadata string for the page/post. For this example, I am using <strong>wordpress, seo, metadata, custom fields</strong></p>
<div id="attachment_265" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-265" title="Add New Custom Field Inputs" src="http://www.edwardstafford.com/wp-content/uploads/custom-fields3-300x89.png" alt="" width="300" height="89" /><p class="wp-caption-text">Add New Custom Field Inputs</p></div>
<p>When you&#8217;re done, hit the &#8220;<strong>Add Custom Field</strong>&#8221; button.</p>
<p>If you have already created a <strong>&#8220;Keywords&#8221; Custom Field</strong> for a previous page or post, you will have the option of selecting it in future pages and posts from the Name drop down menu.</p>
<div id="attachment_266" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-266" title="Custom Fields Menu" src="http://www.edwardstafford.com/wp-content/uploads/custom-fields-menu-300x114.png" alt="Custom Fields Menu" width="300" height="114" /><p class="wp-caption-text">Select from Custom Fields Menu</p></div>
<p>Select the Keywords item from the menu and then add the keywords or phrases for your new page to the Value field. When your done, make sure you hit the &#8220;<strong>Add Custom Field</strong>&#8221; button to confirm it.</p>
<p>That completes Part I. You now have a functional Custom Field assigned to your post/page.</p>
<p>Next up! Adding and understanding the code that generates the keyword metadata tag.</p>
<h2>Part II: The Magic Code.</h2>
<blockquote><p>function set_keywords(){<br />
global $post;<br />
$keywords = get_post_meta($post-&gt;ID, &#8216;keywords&#8217;, true);<br />
$default_keywords = &#8220;Your, selection, of, default, keywords&#8221;;<br />
$metatag= &#8220;&#8221;;</p>
<p>if (empty($keywords)){<br />
$keywords = $default_keywords;<br />
}<br />
if (is_home() || is_front_page()){<br />
$keywords = $default_keywords;<br />
}</p>
<p>$metatag=&#8221;\t&#8221;;<br />
$metatag.= &#8220;&lt;meta name=\&#8221;keywords\&#8221; content=\&#8221;";<br />
$metatag.= $keywords;<br />
$metatag.= &#8220;\&#8221; /&gt;&#8221;;<br />
$metatag.= &#8220;\n\n&#8221;;</p>
<p>echo $metatag;<br />
}<br />
add_action(&#8216;wp_head&#8217;, &#8217;set_keywords&#8217;);</p></blockquote>
<p>Adding this block of code to your Theme&#8217;s <strong>functions.php</strong> file will create and insert page specific Keyword Metadata into inside the &lt;head&gt; tag of your pages and posts assuming you have completed Part I.</p>
<h3>How the code works</h3>
<blockquote><p>function set_keywords(){</p></blockquote>
<p>The first line declares our function and sets the name &#8220;set_keywords&#8221;.</p>
<blockquote><p>global $post;<br />
$keywords = get_post_meta($post-&gt;ID, &#8216;keywords&#8217;, true);<br />
$default_keywords = &#8220;Your, selection, of, default, keywords&#8221;;<br />
$metatag= &#8220;&#8221;;</p></blockquote>
<p>These four lines set up the variables that will be used later in the function.</p>
<p><strong>global $post</strong> allows the function to reference values stored in an array containing post information that was previously set by Wordpress outside of the current function.</p>
<p><strong>$keywords = get_post_meta($post-&gt;ID, &#8216;keywords&#8217;, true)</strong> is up next and sets our variable, <strong>$keywords</strong> to a string value equal to the &#8220;<strong>keywords</strong>&#8221; <strong>Custom Variable</strong> if it was set for the current page in Part I by calling the wordpress function <strong>get_post_meta()</strong>.</p>
<p>get_post_meta() is passed three arguments.</p>
<ol>
<li>The post ID (<strong>$post-&gt;ID</strong>)</li>
<li>a Custom Field Name reference (<strong>keywords</strong>)</li>
<li>a boolean value (<strong>true</strong>)</li>
</ol>
<p>These three arguments tell get_post_meta() to grab the &#8220;<strong>keywords</strong>&#8221; Custom Field value for a specific page (<strong>$post_ID</strong> = a reference to the current page) and return a string result (<strong>true</strong>).</p>
<p><strong><span style="color: #999999;">Note</span></strong><span style="color: #999999;">: If the Boolean argument were set to &#8220;false&#8221;, get_post_meta() would return an array object instead of a single string.</span></p>
<p><strong>$default_keywords = &#8220;Your, selection, of, default, keywords&#8221;</strong> sets a set of default keywords to use when the $keywords variable is empty or not set, or when you just want to include a general set of keywords.</p>
<p><strong>$metatag = &#8220;&#8221;</strong> rounds up the variables for the function and is used to build the metadata tag string that will be inserted into the page &lt;head&gt; tag.</p>
<blockquote><p>if (empty($keywords)){<br />
$keywords = $default_keywords;<br />
}</p></blockquote>
<p>The next step in the code is a conditional statement. Here I use the common PHP empty() function passing the <strong>$keywords</strong> variable as an argument to check whether the <strong>$keywords</strong> variable contains a value. If the empty() function returns true it means that <strong>$keywords</strong> does not contain a usable value, or that is has not been set. If this condition is true, it will set the value of $keywords to that of $default_keywords.</p>
<p>If the Keywords Custom Field was set for the current page, then the get_post_meta() function should have set the $keywords variable to a usable value equal to the Keyword Custom Field value. The condition will return false and the variable retains it&#8217;s Custom Field value.</p>
<blockquote><p>if (is_home() || is_front_page()){<br />
$keywords = $default_keywords;<br />
}</p></blockquote>
<p>Next I have another conditional statement that uses Wordpress functions  to see if the current page is either the home page &#8211; <strong>is_home()</strong>,  or the &#8220;blog&#8221; page &#8211; <strong>is_front_page()</strong> If the current page matches either of these pages, I want to assign the value of <strong>$default_keywords</strong> to the <strong>$keywords</strong> variable.</p>
<p>The reason I do this is because the content on these pages is more dynamic and has a tendency to change often, effecting keyword relevancy. So I want to provide a generic set of default keywords instead of page content specific keywords.</p>
<p><strong><span style="color: #999999;">Note</span></strong><span style="color: #999999;">: It is possible, using more in-depth techniques not covered here, to also include the Keywords Custom Field for these pages and enable a set of more targeted keywords for them.</span></p>
<blockquote><p>$metatag=&#8221;\t&#8221;;<br />
$metatag.= &#8220;&lt;meta name=\&#8221;keywords\&#8221; content=\&#8221;";<br />
$metatag.= $keywords;<br />
$metatag.= &#8220;\&#8221; /&gt;&#8221;;<br />
$metatag.= &#8220;\n\n&#8221;;</p></blockquote>
<p>These lines are used to build the actual text string creating the metadata tag for our page&#8217;s &lt;head&gt; tag.  for example, if our page contained a keyword Custom Field with a value of  &#8221;keyword1, keyword2, keyword3&#8243;, the output for a blog post or single page would be:</p>
<p><strong>&lt;meta name=&#8221;keywords&#8221; content=&#8221;keyword1, keyword2, keyword3&#8243; /&gt;</strong></p>
<blockquote><p>echo $metatag;<br />
}</p></blockquote>
<p>Wrapping up the function we have <strong>echo $metatag </strong>followed by the closing bracket bringing our function to a close.  <strong>echo $metatag</strong> simply writes the output of the <strong>$metatag</strong> variable to the source of your web page inserting the keyword meta tag in the page&#8217;s &lt;head&gt; tag.</p>
<blockquote><p>add_action(&#8216;wp_head&#8217;, &#8217;set_keywords&#8217;);</p></blockquote>
<p>And finally bringing this code bit to an end is <strong>add_action(&#8216;wp_head&#8217;, &#8217;set_keywords&#8217;)</strong>. The add_action() function is a wordpress function used to hook your custom function to a Wordpress action. In this case we are hooking our function <strong>set_keywords</strong> to the wordpress action <strong>wp_head</strong>. This is the piece that actually inserts your meta tag into the page &lt;head&gt; tag.</p>
<p><strong><span style="color: #999999;">Note</span></strong><span style="color: #999999;">: It is up to the individual theme developers to include the wp_head action in their themes, so there is a chance that your theme will not have it. In that case, check the documentation for your theme to see what action hooks are available to you.</span></p>
<p>That pretty much wraps it up!</p>
<div id="_mcePaste"><strong>Umm, Aren&#8217;t you forgetting something?</strong></div>
<p>By now you may be thinking, &#8220;Great, but what about the Description meta tag you mentioned?&#8221;.</p>
<p>You can use this same technique demonstrated here to create unique page descriptions with just a few minor code changes. Just replace keyword references with description references.</p>
<p>Do you have any suggestions to imporve on this? Find it helpful? Have some else to share? Leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2010/02/04/wordpress-use-custom-fields-to-add-keyword-meta-data-to-your-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are your credentials worth?</title>
		<link>http://www.edwardstafford.com/2010/02/03/what-are-your-credentials-worth/</link>
		<comments>http://www.edwardstafford.com/2010/02/03/what-are-your-credentials-worth/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 17:16:29 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[cybercrime]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/2010/02/03/what-are-your-credentials-worth/</guid>
		<description><![CDATA[
Security Watch posted an interesting article today discussing the value of personal login credentials, or username and password combinations used to access online services. I often get asked question about why people hack into computers, or write and spread viruses and malware. My answer has always been that it&#8217;s less about damaging computers or systems [...]]]></description>
			<content:encoded><![CDATA[<div class="posterous_autopost">
<p><a title="The value of login Credentials" href="http://bit.ly/cLFx29" target="_blank">Security Watch posted an interesting article</a> today discussing the value of personal login credentials, or username and password combinations used to access online services. I often get asked question about why people hack into computers, or write and spread viruses and malware. My answer has always been that it&#8217;s less about damaging computers or systems anymore, and more about being stealthy and collecting valuable information that can be used for monetary gain. This article paints a general picture and help to explain of how much our information is worth, answering the question &#8211; Why do they do it?.</p>
<p><span style="font-family: Arial, Tahoma, Verdana; font-size: 12px; color: #222222; line-height: 20px;"> </span></p>
<div>Twitter credentials worth $1,000 to cybercriminals</div>
<div>Gmail account worth $80.00 +</div>
<p>According to the article, the actual value of account credentials is based mainly on <span style="font-family: Arial, Tahoma, Verdana; font-size: 12px; color: #222222; line-height: 20px;"><em>popularity of the application, and the `popularity’ of the account, but I&#8217;d </em><span style="color: #000000; font-family: Arial, Helvetica, sans-serif; line-height: normal; font-size: 13px;">also include type of application, authority of the account holder, and the probability of an account granting access to additional valuable data as determining overall value of the credentials.</span></span></p>
<p><a title="The Value of Your Login Credentials" href="http://bit.ly/cLFx29" target="_blank">Read the full Article here.</a></p>
<p style="font-size: 10px;"><a href="http://posterous.com">Posted via web</a> from <a href="http://edstafford.posterous.com/what-are-your-credentials-worth">Ed&#8217;s Posterous</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2010/02/03/what-are-your-credentials-worth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beer O&#8217;Clock Friday Selections! Now On Posterous</title>
		<link>http://www.edwardstafford.com/2010/01/20/beer-oclock-friday-selections-now-on-posterous/</link>
		<comments>http://www.edwardstafford.com/2010/01/20/beer-oclock-friday-selections-now-on-posterous/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 22:17:18 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/2010/01/20/beer-oclock-friday-selections-now-on-posterous/</guid>
		<description><![CDATA[As some of you may already know, I like Beer!! And if you didn&#8217;t, well, you do now! Not just any beer, but good quality microbrews, craft beers, and foreign treats. You&#8217;ll never find Budweiser mentioned here &#8211; well&#8230; except for that, but it won&#8217;t happen again.
A little more than a year ago, I decided [...]]]></description>
			<content:encoded><![CDATA[<p>As some of you may already know, I like Beer!! And if you didn&#8217;t, well, you do now! Not just any beer, but good quality microbrews, craft beers, and foreign treats. You&#8217;ll never find Budweiser mentioned here &#8211; well&#8230; except for that, but it won&#8217;t happen again.</p>
<p>A little more than a year ago, I decided to start a weekly Beer O&#8217;Clock ritual by selecting a different brew each Friday to feature and share thoughts about it with friends online. Let me state from the start that I am in no way a beer snob, expert, aficionado or anything else along those lines. I just like beer and want to experience as many different kinds as I can and try to learn a little more about the different types of brew along the way. I&#8217;ve even tried adding my incredibly amateur opinions / reviews with selections when I can.</p>
<p>Up till now, I used flickr, twitter and facebook to post weekly selections. But now it&#8217;s time to graduate to something a little more permanent, so I have set up a posterous page to post weekly selections to. The good thing about posterous is that the Flickr, Twitter, and Facebook updates will still continue.</p>
<p>So, if you like beer and want to check out what&#8217;s being featured each week and share your own thought and opinions about them, head over to <a href="http://beeroclock.posterous.com" target="_blank">http://beeroclock.posterous.com</a></p>
<p style="font-size: 10px;"><a href="http://posterous.com">Posted via web</a> from <a href="http://beeroclock.posterous.com/beer-oclock-friday-selections-now-on-posterou">Friday Beer O&#8217;clock Selections</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2010/01/20/beer-oclock-friday-selections-now-on-posterous/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cheap &amp; Easy Social Media Management? Really?</title>
		<link>http://www.edwardstafford.com/2009/12/15/cheap-easy-social-media-management-really/</link>
		<comments>http://www.edwardstafford.com/2009/12/15/cheap-easy-social-media-management-really/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 17:05:42 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/2009/12/15/cheap-easy-social-media-management-really/</guid>
		<description><![CDATA[Saw an email today soliciting &#8220;Cheap &#38; Easy Social Media Management&#8221;
For the most part I don&#8217;t pay too much attention to these claims, but this one hit a nerve. Below is a the excerpt that sums it up.
&#8230; Most of you are too busy to do it all yourself and don¹t want the hassle of [...]]]></description>
			<content:encoded><![CDATA[<p>Saw an email today soliciting &#8220;<span style="font-family: arial, sans-serif; border-collapse: collapse;">Cheap &amp; Easy Social Media Management&#8221;</span></p>
<p><span style="font-family: arial, sans-serif;"><span style="border-collapse: collapse;"><span style="font-family: Arial, Helvetica, sans-serif;"><span style="border-collapse: separate;">For the most part I don&#8217;t pay too much attention to these claims, but this one hit a nerve. Below is a the excerpt that sums it up.</span></span></span></span></p>
<blockquote><p><span style="font-family: arial, sans-serif; border-collapse: collapse;">&#8230; Most of you are too busy to do it all yourself and don¹t want the hassle of fussing with the technology. Some of you have thrown up your hands in despair. </span></p>
<p>So here&#8217;s the good news: We&#8217;re going to do it for you, and it&#8217;s not expensive. For a limited time, you can start for as little as $XXX.xx [edit] a month. Our new business, [removed] , will review and setup all the components of your social media infrastructure. <strong>We&#8217;ll even extract and write your blogs</strong>, or edit your original blog posts. <strong>We&#8217;ll twitter for you and maintain your connections</strong>. <strong><span style="color: #ff0000;">Without breaking a sweat, you&#8217;ll be a master of the new social media.</span></strong></p></blockquote>
<p><span style="border-collapse: collapse;">The Bold parts are what I have a problem with. The Red Bold part is what put it over the edge for me. Really? I can be a Social Media Master by letting someone else pretend to be me and do all the work? Who knew it was that easy?</span></p>
<p><span style="border-collapse: collapse;">I was always under the impression that this Social Media thing was about being a real person, with a real voice, with real ideas and opinions. Conversing, interacting, engaging with and getting to know other real people. Is it possible that I had this all wrong the whole time?</span></p>
<p><span style="border-collapse: collapse;">Is this sort of thing now common practice? I would think there are a great number of risks involved if your exposed, or when the service agreement ends. What happens then? The more I think on this, the more questions I have about it. </span></p>
<p><span style="border-collapse: collapse;">I don&#8217;t claim to be a Social Media expert or even a &#8220;Master&#8221; and I know there are legitimate business out there that help other businesses and brands build and create Social Media profiles and identities, but their claims just seem wrong regarding Social Media.</span></p>
<p style="font-size: 10px;"><a href="http://posterous.com">Posted via web</a> from <a href="http://edstafford.posterous.com/cheap-and-easy-social-media-management-really">Ed Stafford &#8211; Mobile Mutterings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2009/12/15/cheap-easy-social-media-management-really/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-To: Using VBoxManage to Delete a Virtual Machine from VirtualBox</title>
		<link>http://www.edwardstafford.com/2009/11/08/how-to-using-vboxmanage-to-delete-a-virtual-machine-from-virtualbox/</link>
		<comments>http://www.edwardstafford.com/2009/11/08/how-to-using-vboxmanage-to-delete-a-virtual-machine-from-virtualbox/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 19:48:43 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[VBoxManage]]></category>
		<category><![CDATA[Virtual Machine]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/?p=206</guid>
		<description><![CDATA[One common problem I see from people learning to manage Virtual Machines within VirtualBox using the VBoxManager command line is the error:
Cannot unregister the machine &#60;Virtual-Machine-Name&#62;  because it has 1 hard disks attached
Before a VM can be unregistered or deleted, all disks that have been &#8220;attached&#8221; need to first be disassociated from the VM. For [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-224" title="delete" src="http://www.edwardstafford.com/wp-content/uploads/delete-150x150.jpg" alt="delete" width="150" height="150" />One common problem I see from people learning to manage Virtual Machines within VirtualBox using the VBoxManager command line is the error:</p>
<blockquote style="margin-left:160px"><p>Cannot unregister the machine &lt;Virtual-Machine-Name&gt;  because it has 1 hard disks attached</p></blockquote>
<p>Before a VM can be unregistered or deleted, all disks that have been &#8220;attached&#8221; need to first be disassociated from the VM. For this example, I&#8217;m using a virtual machine that I have set up and named &#8220;<strong>VNAS</strong>&#8221; that was used to test an OpenFiler NAS installation (which, by the way, worked great). Now that testing is complete, I am ready to remove it.</p>
<p>The removal for a standard VM install can be completed in a short list of steps.</p>
<p><strong>Step one</strong>: Get the name or UUID and details of your VM</p>
<blockquote><p><strong>VBoxManage list vms</strong></p>
<p>VirtualBox Command Line Management Interface Version 3.0.8<br />
(C) 2005-2009 Sun Microsystems, Inc.<br />
All rights reserved.</p>
<p>&#8220;VNAS&#8221; {8a48759d-4e6d-473f-ab0f-8ff59aa727eb}</p></blockquote>
<p>That command will return the names of all registered VMs and their UUID. Make sure you get the correct name or UUID for the VM you will be modifying.</p>
<p><strong>Step two</strong>: Get the disc information for your VM</p>
<p>There are two methods you can use to the get the information for each virtual disk registered to a virtual machine. The first is to list the VM info for a specified VM which includes the Virtual Disks that are in use by it.</p>
<p>VBoxManage showvminfo &lt;Virtual Machine Name or UUID&gt;</p>
<blockquote><p><strong>VBoxManage showvminfo VNAS</strong><br />
VirtualBox Command Line Management Interface Version 3.0.8<br />
(C) 2005-2009 Sun Microsystems, Inc.<br />
All rights reserved.</p>
<p>Name:            VNAS<br />
Guest OS:        Other/Unknown<br />
UUID:            8a48759d-4e6d-473f-ab0f-8ff59aa727eb<br />
Config file:     /secondary/.Virtual/machines/VNAS/VNAS.xml<br />
Memory size:     512MB<br />
VRAM size:       8MB<br />
Number of CPUs:  1<br />
Boot menu mode:  message and menu<br />
Boot Device (1): Floppy<br />
Boot Device (2): DVD<br />
Boot Device (3): HardDisk<br />
Boot Device (4): Not Assigned<br />
ACPI:            on<br />
IOAPIC:          off<br />
PAE:             on<br />
&#8230;<br />
<strong> Primary master:  /secondary/.Virtual/vdisks/OFInstallDisk (UUID: xxxxxxx)<br />
Primary slave:   /secondary/.Virtual/vdisks/VNASStore1 (UUID: xxxxxxx)<br />
Secondary slave: /secondary/.Virtual/vdisks/VNASStore2 (UUID: xxxxxxx)</strong><br />
&#8230;</p></blockquote>
<p>In this example you can see I have 3 disks registered with the vm.</p>
<ul>
<li>Primary Master (<strong>hda</strong>)</li>
<li>Primary Slave (<strong>hdb</strong>)</li>
<li>Secondary Slave (<strong>hdd</strong>)</li>
</ul>
<blockquote><p>NOTE: You might be asking, Why does the sequence jump from hdb to hdd? What happened to hdc? The answer is, hdc is reserved for CD/DVD mounting, so you can&#8217;t add a virtual disk there.</p></blockquote>
<p>The second, alternative method is to use the the VBoxManage command &#8220;list&#8221; with the &#8220;hdds&#8221; option to list all the Virtual Disks in the system. This will display a list of All the disks you have created and registered for ALL VMs. Information for each Virtual Disk and the VM it is registered to is displayed. Here you can see the three disks registered with my VNAS VM indicated by the &#8220;Usage&#8221; lines.</p>
<blockquote><p><strong>VBoxManage list hdds</strong></p>
<p>UUID:         eebbb4c7-c539-4da4-b8ab-e5777b32520b<br />
Format:       VDI<br />
Location:     /secondary/.Virtual/vdisks/VNASStore1<br />
Accessible:   yes<br />
Usage:        <strong>VNAS </strong>(UUID: 8a48759d-4e6d-473f-ab0f-8ff59aa727eb)</p>
<p>UUID:         9f238d31-f794-420f-83a7-ccf811d52244<br />
Format:       VDI<br />
Location:     /secondary/.Virtual/vdisks/VNASStore2<br />
Accessible:   yes<br />
Usage:        <strong>VNAS </strong>(UUID: 8a48759d-4e6d-473f-ab0f-8ff59aa727eb)</p>
<p>UUID:         2ce976c9-0a37-49c1-8d34-3962c563a256<br />
Format:       VDI<br />
Location:     /secondary/.Virtual/vdisks/OFInstallDisk<br />
Accessible:   yes<br />
Usage:        <strong>VNAS </strong>(UUID: 8a48759d-4e6d-473f-ab0f-8ff59aa727eb)</p></blockquote>
<p>In my opinion, method one the easiest quickest way to see what Virtual disks are assigned to a specific VM.</p>
<p><strong>Step Three</strong>: Disassociate the Virtual Disk[s]</p>
<p>VBoxManage modifyvm &lt;Virtual Machine Name or UUID&gt; &#8211;<strong>hda</strong> none</p>
<blockquote><p><strong>VBoxManage modifyvm VNAS &#8211;hda none </strong></p></blockquote>
<p>If you have more than one disk registered with a vm as I do here, you&#8217;ll also need to disassociate those as well.</p>
<blockquote><p>VBoxManage modifyvm VNAS &#8211;<strong>hdb </strong>none</p>
<p>VBoxManage modifyvm VNAS &#8211;<strong>hdd </strong>none</p></blockquote>
<p><strong>Step Four</strong>: Unregister and delete the VM</p>
<p>VBoxManage unregistervm &lt;Virtual Machine Name or UUID&gt; &#8211;delete</p>
<blockquote><p><strong>VBoxManage unregistervm VNAS &#8211;delete</strong></p></blockquote>
<p><strong>Step Five</strong>: Confirm</p>
<blockquote><p><strong>VBoxManage list vms</strong></p>
<p>VirtualBox Command Line Management Interface Version 3.0.8<br />
(C) 2005-2009 Sun Microsystems, Inc.<br />
All rights reserved.</p>
<p>[NOTE: there are no VMs listed]</p></blockquote>
<p>This is the same command that was executed in step one. After running this command again you should no longer see your Virtual Machine listed.</p>
<p>Note: This process will only remove your VM from VirtualBox. It will not remove/delete the actual virtual disk file (.vdi). You can delete that manually, or save it to use with another virtual machine instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2009/11/08/how-to-using-vboxmanage-to-delete-a-virtual-machine-from-virtualbox/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VirtualBox 3.0.4 and Bridged Networking on XP Host with GUI</title>
		<link>http://www.edwardstafford.com/2009/09/13/virtualbox-3-0-4-and-bridged-networking-on-xp-host-with-gui/</link>
		<comments>http://www.edwardstafford.com/2009/09/13/virtualbox-3-0-4-and-bridged-networking-on-xp-host-with-gui/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 23:09:11 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/?p=130</guid>
		<description><![CDATA[Editors Note:
While I was writing this, the solution to my problem struck me unexpectedly. Click here to skip the drama and jump right ot the solution.
Originally, this article started out as a complete rant and cry for help. I started to write about the failure and frustration of the installation and network configuration of a [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_182" class="wp-caption alignleft" style="width: 250px"><img class="size-full wp-image-182" title="Queensboro Bridge" src="http://www.edwardstafford.com/wp-content/uploads/152454397_2adf0b67f5_m.jpg" alt="Photo: Wally Gobetz" width="240" height="160" /><p class="wp-caption-text">Photo: Wally Gobetz</p></div>
<h2>Editors Note:</h2>
<p>While I was writing this, the solution to my problem struck me unexpectedly. <a href="http://www.edwardstafford.com/2009/09/13/virtualbox-3-0-4-and-bridged-networking-on-xp-host-with-gui/#solution">Click here to skip the drama and jump right ot the solution.</a></p>
<p>Originally, this article started out as a complete rant and cry for help. I started to write about the failure and frustration of the installation and network configuration of a virtual machine in VirtualBox 3.0.4.  It just would not work. The problem, as it turned out, was that I was over thinking the process. BUT, that is not completely my own fault.</p>
<p><span id="more-130"></span></p>
<p>See, here&#8217;s the problem. Before starting anything new, I read, research, and read some more to get as much of an understanding as I can on the subject. In this case, the official documentation of VirtualBox 3.0.4 in my opinion is incomplete and did not include some of the specific details that would have made this setup much less painful. Combine that with the piles of information regarding networking configuration in previous versions, and it&#8217;s easy to get some wires crossed. Networking in version 3.0.4 was largely improved and simplified, meaning a lot of the information available online, in forums, on blogs, etc, is irrelevant to the new version and the current documentation does not do a great job of explaining the changes and how to set up networking, specifically bridging, in the new version.</p>
<p>In my research and troubleshooting I&#8217;ve seen many others who describe the same problems I had while trying to set this up under version 3.0.4, so in the spirit of passing on my experience and what I learned from it, I am going to keep my original writing here so you can see what I was doing and why it was wrong. If you want to skip to the solution, please <a href="#solution">click here.</a></p>
<div style="padding:15px; border:1px solid black; background-color:#DCDCDC; margin-bottom:20px;">
<h2>The Original Post (the wrong way)</h2>
<p>Ok, here it is. Frustration has finally gotten the best of me and I have no  idea where to go from here. What am I talking about, you ask? I&#8217;m talking about setting up a Virtual Machine (VM) using VirtualBox 3.0.4 on a Windows XP Host.</p>
<p>Let&#8217;s take a look at what has brought me to this state of utter frustration.</p>
<p>A while back, I downloaded and installed VirtualBox to set up VMs to test and play around with some different Operating Systems and Software. To be honest, it works Great for that purpose. But now, I want to take my virtualization experience to the next level and have been thinking about installing FreeNAS in a VM to serve as a NAS solution and making it available to all PCs  across a production LAN.</p>
<h2>The Parts:</h2>
<p>I have a Windows XP sp2 machine sitting at home that is not getting much use that would be perfect for trying this out.</p>
<h3>Specs:</h3>
<ul>
<li>Windows XP sp2</li>
<li>4 Gigs of RAM</li>
<li>500 Gig HD</li>
<li>Intel Quad Core Processor</li>
<li>Single on-board G-bit network adapter.</li>
</ul>
<p>I know there is a bit to cover and become familiar with when setting out to connect a Local LAN to a VM in the same address space, so I did my research first.</p>
<p>I downloaded and printed the VirtualBox user manual. Reading through it I highlighting the parts that I thought were important or significant. The documentation seems a little incomplete and is NOT all that well written for someone just getting started.  There are no guides or instruction that specifically marks the steps for setting up the different types of network options. So I figure, fine! After reading the manual, I should have some idea of the basic requirements. I can just do a search on the net and piece together the rest of the information.</p>
<p>That sounded like a good idea a first, but in practice..not so much. The web served up a LOT of information related to VirtualBox network bridging and configuration. The problem is that a lot of it was contradictory and there is almost no information specific to version 3.0.4. I read through forums, blogs, papers and anything else that looks like it might help. In the end, nothing was extraordinarily helpful.</p>
<h2>Host OS (Windows XP)</h2>
<p><strong>Physical Network Adapter</strong>: Local Area Connection (2)  NVidia NForce Network Controller (Bridged /Connected)</p>
<p><strong>Virtual Host Adapter</strong>: VirtualBox Host-Only Network</p>
<p><strong>Bridged Adapter (Local Area Connection (2) + VirtualBox Host-Only Network)</strong>:  Network Bridge (Network Bridge)</p>
<p>Note that the Host adapters were set to <em>Compatible Mode</em> as recommended by several forum posts and blogs.</p>
<div id="attachment_131" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-131" title="virtualboxinstallseries-11" src="http://www.edwardstafford.com/wp-content/uploads/virtualboxinstallseries-11-300x45.png" alt="Screen netsh bridge compatmode" width="300" height="45" /><p class="wp-caption-text">Screen netsh bridge compatmode</p></div>
<h2>Guest OS (FreeNAS/ Linux Based)</h2>
<p>Network settings for the guest were set up using</p>
<p><strong>Adapter Type</strong>: IntelPRO/1000 MT Desktop. This was selected based on recommendations that appeared repeatedly in forums and blogs.</p>
<p><strong>Attached to</strong>: Bridged Adapter</p>
<p><strong>Name</strong>: MAC Bridge Miniport &#8211; This was the only selection available in the menu.</p>
<div id="attachment_133" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-133" title="virtualboxinstallseries-8" src="http://www.edwardstafford.com/wp-content/uploads/virtualboxinstallseries-8-300x266.png" alt="VM Network Configuration" width="300" height="266" /><p class="wp-caption-text">VM Network Configuration</p></div>
<p>Installing the Guest</p>
<p>During the installation of  FreeNAS, I used static IP information</p>
<ul>
<li>IP Address: 192.168.15.115</li>
<li>Netmask: 255.255.255.0</li>
<li>Gateway: 192.168.15.3 (LAN Router private IP)</li>
<li>DNS Server: ISP DNS IP</li>
</ul>
</div>
<h1>Errrrrrttttttt&#8230;.</h1>
<p>(that&#8217;s my best screatching to a stop text effect).</p>
<p>It&#8217;s amazing how when you step away from a problem and look at it from another angle, how easy the solution comes to you. By writing out my thoughts here and stepping through all the little details, something hit me and it is THE key piece of information that is missing between setting up older versions of VirtualBox and Version 3.0.4.</p>
<p>There were a number of references that said networking and bridging in the new version was completely refigured and the process was very simple. Basically, just create a bridge &#8211; But no details were ever provided on what that meant exactly. Based on all the &#8220;old&#8221; information and lack of new detailed explainations, I figured it meant to create bridged connections on the host and use that as the Guest bridged adapter. What if the solution is even simpler  than that. It&#8217;s worth a try&#8230;Soooo</p>
<p>I went back to my Host settings (Windows XP Network settings) and tore down the bridge and restored my original adapters and IP information. Now I only have<strong> Local Area Connection (2)</strong> and <strong>VirtualBox Host-Only Network </strong>shown. From here I went back to the VirtualMachine Network settings and listed in the &#8220;<strong>Name</strong>&#8221; menu instead of  &#8220;<strong>MAC Bridge Miniport</strong>&#8221; I now had the two Host adapters listed. (Local Area Connection (2)  and VirtualBox Host-Only Network).</p>
<p>I selected the physical Host Adapter (Local Area Connection (2)), restarted the VM and to my amazement.. It all worked.</p>
<h1><a name="solution">Bringing it all together.</a> (the right way)</h1>
<p>In the end, this is how you set up bridged networking between Virtual Machines and the LAN with VirtualBox 3.0.4</p>
<h3>Windows XP Hosted VirtualBox &#8211; using the GUI:</h3>
<h4>Host Network Settings:</h4>
<p>This part is easy. <strong>Do nothing</strong>. That&#8217;s right, <span style="text-decoration: underline;">nothing!</span> No changes are necessary for the host&#8217;s interfaces or network settings (as long as you already have a working interface). <span style="text-decoration: underline;"><strong> </strong></span></p>
<p><span style="text-decoration: underline;"><strong>DO NOT</strong></span> create or bridge any interfaces on the host system. Leave the network interfaces on your host OS (physical) alone.</p>
<h4>Guest Network Settings:</h4>
<p>Start VirtualBox and highlight the Virtual Machine you want to modify from the list on the left. Once highlighted, select &#8220;network&#8221; under the &#8220;details&#8221; tab on the right.</p>
<p style="text-align: center;">
<div id="attachment_175" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-175" title="VirtualBox_VM_select" src="http://www.edwardstafford.com/wp-content/uploads/VirtualBox_VM_select-300x275.png" alt="Select VM" width="300" height="275" /><p class="wp-caption-text">Select VM</p></div>
<p>You should now see a window displaying the Network settings for your VM.  From here, the Adapter 1 tab and make sure the &#8220;Enable Network adapter&#8221; checkbox is selected.</p>
<p><img class="aligncenter size-medium wp-image-174" title="Virtual_FreeNAS_Network_settings_1" src="http://www.edwardstafford.com/wp-content/uploads/Virtual_FreeNAS_Network_settings_1-300x265.png" alt="Virtual_FreeNAS_Network_settings_1" width="300" height="265" /></p>
<p>Next to &#8220;Adapter Type&#8221; select &#8220;Intel Pro/1000 MT Desktop&#8221; or &#8220;Intel Pro/1000 MT Server&#8221; from the menu. These have a higher rate of success when used in this way. I had some trouble with the PCnet II and PCnet III adapter Types.</p>
<div id="attachment_177" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-177" title="0055_2009" src="http://www.edwardstafford.com/wp-content/uploads/0055_2009-300x193.png" alt="Select Adapter Type" width="300" height="193" /><p class="wp-caption-text">Select Adapter Type</p></div>
<p>Next to &#8220;Attached to&#8221; select &#8220;Bridged Adapter&#8221; from the menu.</p>
<div id="attachment_178" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-178" title="0056_2009" src="http://www.edwardstafford.com/wp-content/uploads/0056_2009-300x196.png" alt="Select Bridged Adapter" width="300" height="196" /><p class="wp-caption-text">Select Bridged Adapter</p></div>
<p>Finally, next to &#8220;Name&#8221; select your Host system&#8217;s network interface from the menu. In this case, my host system interface is the on-board &#8220;NVIDIA nForce Networking Controller&#8221;. Your options will likely be different based on the interface installed of in use.</p>
<div id="attachment_176" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-176" title="Host Interface Selection" src="http://www.edwardstafford.com/wp-content/uploads/0057_2009-300x196.png" alt="Select Host System interface to be bridged." width="300" height="196" /><p class="wp-caption-text">Select Host System interface to be bridged.</p></div>
<p>That is all there is to it. Just hit the &#8220;OK&#8221; button in the main settings window and start your VM. As long as the Guest OS on your VM hs been configured with the correct IP/network information for your LAN, you should now be able to ping and access it from any PC on your network.</p>
<h2>Conclusion: So simple, even a Caveman can do it!</h2>
<p>Initial frustration aside, in the end, I really have to give props to Sun/VirtualBox for actually making this incredibly simple to set up. On the other hand, they lose points for failing to make this clear in the documentation.</p>
<h2>Final Note:</h2>
<p>Since posting this, VirtualBox 3.0.6 has been released. Considering how easy this is to set up in 3.0.4, I can only guess that it is just as simple in 3.0.6. After all, it would not make much sense to make any changes that would make the process more difficult.</p>
<p>I hope you find this information helpful or useful and hopefully can use it to avoid the mistakes I made. Have a question, suggestion, better way of doing this or just want to leave some feedback? Please leave a comment.</p>
<h3>Stay Tuned for part II: VirtualBox 3.0.4 and Bridged Networking on a Headless Ubuntu Server Host</h3>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2009/09/13/virtualbox-3-0-4-and-bridged-networking-on-xp-host-with-gui/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Add a Network Printer to an Ubuntu Desktop &#8211; The Easy Way?</title>
		<link>http://www.edwardstafford.com/2009/08/31/add-a-network-printer-to-an-ubuntu-desktop-the-easy-way/</link>
		<comments>http://www.edwardstafford.com/2009/08/31/add-a-network-printer-to-an-ubuntu-desktop-the-easy-way/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 03:36:56 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[IT Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/?p=137</guid>
		<description><![CDATA[The Rant
It&#8217;s no secret that I am a fan of Ubuntu Linux. BUT.. one of the annoying things about using Ubuntu is trying to set up a network printer on a desktop or workstation. Regarding nearly all administrative tasks under most Linux systems that would require root permissions, Ubuntu has done a nice job of [...]]]></description>
			<content:encoded><![CDATA[<h2>The Rant</h2>
<p>It&#8217;s no secret that I am a fan of Ubuntu Linux. BUT.. one of the annoying things about using Ubuntu is trying to set up a network printer on a desktop or workstation. Regarding nearly all administrative tasks under most Linux systems that would require root permissions, Ubuntu has done a nice job of making it possible to operate a system as a &#8220;normal&#8221; user without elevated privileges, and then easily gain the elevated (root) privileges temporarily assigned to complete some specific administrative task. Ubuntu detects when a user is trying to do something requiring the elevated (root) privileges and pops up a small window asking for the current user&#8217;s password to gain the required permission. All the magic happens behind the scene and the user never has to issue a text command. It wasn&#8217;t long ago that users would have had to open a command terminal and issue all the instructions by hand. Well.. we&#8217;ve come a long way.. With the exception of installing a network printer. For some reason, when installing a printer in Ubuntu, the user is not prompted with the normal su password pop-up that presents itself for all other administrative tasks. Instead, the CUPS system prompts the user for the root password &#8211; and under Ubuntu, there is no root password by default meaning that root can not complete any direct action requiring a password. In fact, root can not log directly into the system at all. Fortunately, the solution is fairly easy.</p>
<h2>The Solution</h2>
<p>Do not try to install a printer from <strong>System &gt; Administration &gt; Printing</strong> menu. It won&#8217;t work. Sure, it will allow you to go through the wizard and give you the false impression that you&#8217;re actually accomplishing something &#8211; until you reach the point where a driver needs to be installed and you&#8217;re prompted for the root password. Instead, go to the <strong>Applications &gt; Accessories</strong> menu and select <strong>Terminal</strong>.</p>
<p>Once the terminal window opens, issue the following command</p>
<blockquote><p>sudo system-config-printer</p></blockquote>
<p>The next line in the terminal window will ask for your password. Type in your user password and hit enter. If all is correct, the printer setup and configuration window will open with elevated privileges enabled and you can finish installing and setting up your new printer from comfort of an easy to use GUI.</p>
<h2>Sample Setup</h2>
<p>Lets take a few minutes and walk through the process. In this example, I will be setting up a Dell 1700 Laser Printer in my Home Office. Before you get started, you will need to know a few things about the printer first.<span id="more-137"></span></p>
<p>IP address: What IP address did you assign to your network printer?</p>
<p>RAW Port: Typically, the default RAW Port is 9100. If you assigned something different you&#8217;ll need to remember what it is.</p>
<p>Open a Terminal Window: <strong>System &gt; Administration &gt; Terminal</strong></p>
<p><strong></strong></p>
<div id="attachment_156" class="wp-caption aligncenter" style="width: 310px"><strong><strong><img class="size-medium wp-image-156" title="screenshot-terminal12" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-terminal12-300x219.png" alt="Terminal Window" width="300" height="219" /></strong></strong><p class="wp-caption-text">Terminal Window</p></div>
<p><strong></strong></p>
<p>Issue the command &#8220;<strong>sudo system-config-printer</strong>&#8221; (no quotes)</p>
<div id="attachment_157" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-157" title="screenshot-sudo-command2" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-sudo-command2-300x126.png" alt="sudo command" width="300" height="126" /><p class="wp-caption-text">sudo command</p></div>
<p>Provide your password when prompted.</p>
<div id="attachment_158" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-158" title="screenshot-sudo-password2" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-sudo-password2-300x126.png" alt="sudo password" width="300" height="126" /><p class="wp-caption-text">sudo password</p></div>
<p>The Printer Configuration window should have opened</p>
<div id="attachment_142" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-142" title="screenshot-printer-configuration" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-printer-configuration-300x165.png" alt="Printer Configuration" width="300" height="165" /><p class="wp-caption-text">Printer Configuration</p></div>
<p>Press the &#8220;<strong>New</strong>&#8221; button to add a new printer.</p>
<p>The &#8220;<strong>New Printer</strong>&#8221; window will open after a brief search displaying the &#8220;select Device&#8221; panel</p>
<p>Under the &#8220;Devices&#8221; list, expand the &#8220;<strong>Network Printer</strong>&#8221; selection by clicking the small black arrow.</p>
<p>Next, Select &#8220;<strong>AppSocket/HP JetDirect</strong>&#8221;</p>
<p>At the right, new options will be displayed (Host and Port Number)</p>
<p>In the host field, type the IP address of the network printer you&#8217;re installing.</p>
<p>In the Port Number field, type the RAW port number for the network printer. If you did not change this directly in the Printer&#8217;s Settings, or you are not sure, then leave the default value 9100.</p>
<div id="attachment_143" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-143" title="screenshot-select-device" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-select-device-300x264.png" alt="Select Device" width="300" height="264" /><p class="wp-caption-text">Select Device</p></div>
<p>Press the &#8220;<strong>Forward</strong>&#8221; button: The next panel is the &#8220;<strong>Choose Driver</strong>&#8221; panel</p>
<p>Choose the &#8220;<strong>Select Printer from Database</strong>&#8221; option</p>
<p>Highlight the &#8220;<strong>Generic</strong>&#8221; option under the &#8220;<strong>Makes</strong>&#8221; list</p>
<div id="attachment_144" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-144" title="screenshot-choose-driver1" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-choose-driver1-300x264.png" alt="Chose Driver Panel 1" width="300" height="264" /><p class="wp-caption-text">Chose Driver Panel 1</p></div>
<p>Press the &#8220;<strong>Forward</strong>&#8221; button: The next panel is the &#8220;<strong>Choose Driver</strong>&#8221; panel #2</p>
<p>On this Panel, under the &#8220;<strong>Model</strong>&#8221; list, select &#8220;<strong>PCL 6/PCL XL Driver</strong>&#8221;</p>
<p>Under the &#8220;<strong>Drivers</strong>&#8221; Select the &#8220;<strong>PCL 6/PCL XL Driver &#8211; CUPS + Gutenprint v5.2.3 [en] (recommended)</strong>&#8221;</p>
<div id="attachment_145" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-145" title="screenshot-choose-driver-2" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-choose-driver-2-300x264.png" alt="Choose Driver Panel 2" width="300" height="264" /><p class="wp-caption-text">Choose Driver Panel 2</p></div>
<p>Press the &#8220;<strong>Forward</strong>&#8221; button: The next panel is &#8220;<strong>Describe the Printer</strong>&#8221;</p>
<p><strong>Printer Name</strong>: in this field, type a name for your printer as it will appear in you installed printers list. I&#8217;ll call mine &#8220;Dell1700&#8243; Note that spaces are not permitted here.</p>
<p><strong>Description</strong> (optional): In this field, type a short description of your printer to help identfy it in you installed printers list. I described mine as &#8220;Dell Printer Home Office&#8221;. You can leave this blank if you want.</p>
<p><strong>Location</strong> (optional): In this field, put a location descriptor that will help to identify the location of the printer in the installed printers list. For this field, I used &#8220;Home Office&#8221;. You can leave this blank if you want.</p>
<div id="attachment_146" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-146" title="screenshot-describe-printer" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-describe-printer-300x265.png" alt="Describe the Printer" width="300" height="265" /><p class="wp-caption-text">Describe the Printer</p></div>
<p>When you finish, click the &#8220;<strong>Apply</strong>&#8221; button. You&#8217;ll be prompted and asked if you want to print a test page, which might be a good idea at this point to make sure you got everything set up correctly.</p>
<div id="attachment_147" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-147" title="screenshot-test-page" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-test-page-300x154.png" alt="Test Printing" width="300" height="154" /><p class="wp-caption-text">Test Printing</p></div>
<p>If everything went well, you will now see a new printer added to your installed printers list under &#8220;<strong>Printer Configuration</strong>&#8220;.</p>
<div id="attachment_148" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-148" title="screenshot-new-printer-complete" src="http://www.edwardstafford.com/wp-content/uploads/screenshot-new-printer-complete-300x165.png" alt="New Printer Installed" width="300" height="165" /><p class="wp-caption-text">New Printer Installed</p></div>
<p><strong>Note</strong>: This walkthrough was completed using a Dell 1700 Laserprinter and does work with these instructions. This printer does not have linux drivers available. If your printer has supported/avalible drivers provided by your manufacturer, your setup process may be different. This information is provided as a general guide.</p>
<p>I hope you find this information helpful. Leave a comment to let me know what you think. Is there a better / easier way to do this? Did I miss anything? Leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2009/08/31/add-a-network-printer-to-an-ubuntu-desktop-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YouTube API Hack: Link Your Videos Directly to Your YouTube Channel</title>
		<link>http://www.edwardstafford.com/2009/08/07/youtube-api-hack-link-your-videos-directly-to-your-youtube-channel/</link>
		<comments>http://www.edwardstafford.com/2009/08/07/youtube-api-hack-link-your-videos-directly-to-your-youtube-channel/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 19:09:00 +0000</pubDate>
		<dc:creator>Ed Stafford</dc:creator>
				<category><![CDATA[Code Mode]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[SimplePie]]></category>
		<category><![CDATA[youtube api]]></category>

		<guid isPermaLink="false">http://www.edwardstafford.com/?p=105</guid>
		<description><![CDATA[Wait! Your a Hacker?
First of all, my use of the word &#8220;Hack&#8221; is not the version popularized by the media. It is used here in the context of using a tool (YouTube API) to accomplish a task that was not originally part of the tool&#8217;s design. By using some creative thinking and little trial and [...]]]></description>
			<content:encoded><![CDATA[<h2>Wait! Your a Hacker?</h2>
<p><img class="alignleft size-medium wp-image-121" title="Hack It" src="http://www.edwardstafford.com/wp-content/uploads/swissarmy-300x225.jpg" alt="Hack It" width="300" height="225" />First of all, my use of the word &#8220;Hack&#8221; is not the version popularized by the media. It is used here in the context of using a tool (YouTube API) to accomplish a task that was not originally part of the tool&#8217;s design. By using some creative thinking and little trial and error, I was able to accomplish a desired result, and overcome a limitation of the API.</p>
<h2>Ready, Set, GO!!</h2>
<p>While working on a recent project I came across a mildly irritating limitation of the YouTube API. The thing is, I wanted to display a list of recently added YouTube video thumbnails to a web site that link back to the videos in the YouTube users channel.  Easy! right?</p>
<h2>Not So Fast!</h2>
<p>Here&#8217;s the thing. The channel feed returned by the API does include the link back to the YouTube Video, <strong>BUT</strong> it sends the visitor to the usual standard public YouTube page with the video embeded and <strong>NOT </strong>to the Channel of the YouTube member who uploaded it.</p>
<p>For most, this would be fine. But I wanted to be able to preserve a connection and identity between the web site and the YouTube Channel.</p>
<p>Unfortunately, the YouTube API does not provide a direct way to do this [link videos back directly to the YouTube Channel instead of the standard YouTube page]. So what&#8217;s a developer to do? &#8230; Come up with a hack, of course!! (even if is is a small one)..</p>
<h2>First A Note:</h2>
<p>This solution uses the <a title="http://simplepie.org/" href="http://simplepie.org/" target="_blank">Simplepie PHP Code Library</a> to grab the Channel RSS feed</p>
<h2>The Code:</h2>
<blockquote><p>&lt;?php</p>
<p>require_once(&#8216;php/simplepie.inc&#8217;);</p>
<p>$feed = new SimplePie(&#8216;http://gdata.youtube.com/feeds/api/users/[user name]/uploads&#8217;);</p>
<p>$feed-&gt;handle_content_type();</p>
<p>$YT_PlayerPage = &#8220;http://www.youtube.com/user/[user name]#play/uploads/&#8221;;</p>
<p>$YT_VideoNumber = 0;<br />
$ShowMax = 4;</p>
<p>foreach ($feed-&gt;get_items() as $item)<br />
{</p>
<p>if ($enclosure = $item-&gt;get_enclosure())<br />
{</p>
<p>$YT_VidID = substr(strstr($item-&gt;get_permalink(), &#8216;v=&#8217;), 2, 11);</p>
<p>echo &#8216;&lt;a href=&#8221;&#8216; . $YT_PlayerPage . $YT_VideoNumber . &#8220;/&#8221; . $YT_VidID . &#8216;&#8221;title=&#8221;&#8216; . $item-&gt;get_title() . &#8216;&#8221;&gt; &lt;img src=&#8221;&#8216; . $enclosure-&gt;get_thumbnail() . &#8216;&#8221;/&gt;&lt;/a&gt;&#8217;;</p>
<p>}<br />
if($YT_VideoNumber == $ShowMax) break;<br />
$YT_VideoNumber++;<br />
}<br />
?&gt;</p></blockquote>
<h2>Tiptoe Through the Tulips (or walking through the code)</h2>
<p>There you have it. A small block of PHP code and we have the result we&#8217;re looking for. Now let&#8217;s take a look at each line in the code.</p>
<blockquote><p>require_once(&#8216;php/simplepie.inc&#8217;);</p></blockquote>
<p>This line does nothing more than call/include the Simplepie Library. The one thing you may need to change here is the location of the library. I stored it in a directory at the root of my web called &#8220;php&#8221;. So depending where you store your copy of the library, you may need to change this.</p>
<blockquote><p>$feed = new SimplePie(&#8216;http://gdata.youtube.com/feeds/api/users/[user name]/uploads&#8217;);</p></blockquote>
<p>The next line creates a new feed and stores it as $feed. Pretty creative.. huh? Whats happening here is simplepie is grabing the rss feed for the YouTube Channel&#8217;s Uploaded videos.</p>
<p>An important note to make here is that the URI for the RSS passed to SimplePie is not the same as the RSS URI that you would use to subscribe to the channel&#8217;s RSS feed to use with your RSS reader. You will also need to replace [user name] in the URI with the YouTube user name for the channel you want to pull videos from.</p>
<p>The Standard RSS Subscription URI looks like this:<br />
http://gdata.youtube.com/feeds/<span style="text-decoration: underline;"><strong>base</strong></span>/users/[user name]/uploads</p>
<p>While the URI used by the API to grab the RSS looks like this:<br />
http://gdata.youtube.com/feeds/<span style="text-decoration: underline;"><strong>api</strong></span>/users/[user name]/uploads</p>
<p>Notice the difference indicated in bold text (&#8220;base&#8221; vs &#8220;api&#8221;). You will need to be sure you use &#8220;API&#8221; version of the URI. You can get this by copying the public RSS URI and simply changing &#8220;base&#8221; to &#8220;api&#8221;.</p>
<p>At the next line we have:</p>
<blockquote><p>$feed-&gt;handle_content_type();</p></blockquote>
<p>This just makes sure the content is being served out to the browser properly.</p>
<p>The next three lines contain three variables I&#8217;ve added: $<strong>YT_PlayerPage, $YT_VideoNumber</strong> and <strong>$ShowMax</strong></p>
<blockquote><p>$YT_PlayerPage = &#8220;http://www.youtube.com/user/[user name]#play/uploads/&#8221;;</p></blockquote>
<p>This is the first part of the key to getting YouTube links to point directly to the Channel page. This variable holds the base Channel player URI and is used to construct a complete video link. The completed URI link also includes a counter reference and the unique 11 character video ID. To get the URI for the channel player page, visit the YouTube Channel you&#8217;re grabing the video feed from and click on a video link. The complete URI for that video will appear in the browser&#8217;s address bar. Simply copy that URI and eliminate everything following the backslash &#8220;/&#8221; after &#8220;uploads&#8221; (indicated in <strong><span style="color: #ff0000;">red</span></strong>)</p>
<p>http://www.youtube.com/user/[user name]#play/uploads/<span style="color: #ff0000;"><strong>#/xxxxxxxxxxx</strong></span></p>
<blockquote><p>$YT_VideoNumber = 0;</p></blockquote>
<p>The links on the YouTube Channel page contain a counter in the URI and increases by +1 with each link. This is the second part of the key in constructing the direct Channel links. This counter was a portion of the link that was removed in <strong>$YT_PlayerPage</strong>. I&#8217;m not completely clear on what the purpose of the counter is and in my experimenting with this, it did not seem to make a difference what the counter value was as long as the video ID followed it. But since it is the format that is used on YouTube&#8217;s Channel pages, I&#8217;ve figured it would be best to recreate the same thing here. Besides, we are going to use that value later in the code. I&#8217;ve set the initial value of the variable to 0 (zero) because the counter is zero based. (0, 1, 2 &#8230; )</p>
<blockquote><p>$ShowMax = 4;</p></blockquote>
<p>The next line contains the <strong>$ShowMax</strong> variable. This is used to set a limit to the number video links I wanted to display on the page. BUT, there is a trick you need to be aware of here. We are using the <strong>$YT_VideoNumber</strong> to get the counter number for the current video in the Loop (the loop will be described in the next section). But because <strong>$YT_VideoNumber</strong> is zero based, we need to compensate for that in the <strong>$ShowMax</strong> Variable and offset the limit by -1. In other words, to limit the display to 5 items, we need to set <strong>$ShowMax </strong>to 4 because we are including 0 as the first item (0 1 2 3 4) for a total of 5 items. Got it?&#8230; good!</p>
<blockquote><p>foreach ($feed-&gt;get_items() as $item)<br />
{</p></blockquote>
<p>These lines start/open the Loop getting each item in the feed. This is where the code will &#8220;loop&#8221; through each item (video) in the feed and extract the information I wanted for each video.</p>
<blockquote><p>if ($enclosure = $item-&gt;get_enclosure())<br />
{</p></blockquote>
<p>This line sets a conditional variable ($enclosure) to check if the current item in the loop contains enclosure data provided by MRSS (Multimedia RSS) that might be provided with the feed. YouTube feeds do support and provide MRSS enclosure data and we need to be able to pull it from the feed. The get_enclosure() method is part of the SimplePie Library and makes getting access to this data pretty easy.</p>
<blockquote><p>$YT_VidID = substr(strstr($item-&gt;get_permalink(), &#8216;v=&#8217;), 2, 11);</p></blockquote>
<p>This line is the final [and probably most important] part of the key to constructing the Channel video link.  It&#8217;s also the most confusing part at first sight. I mentioned earlier that a video link is provided with the feed that will direct the viewer to a the standard public YouTube page for viewing. This link contains the video ID that we need. The bad news is that the API as far as I could see does not allow a direct or easy way to get the ID for each video [please correct me if I'm wrong here]. The good news is that the ID can be extracted from the link provided with the feed, and that&#8217;s exactly what this line does.</p>
<p>$item-&gt;get_permalink() returns the URI / video  that would direct a visitor to the standard YouTube page. The URI is similar to:<br />
http://www.youtube.com/watch?<span style="color: #ff0000;"><strong>v=xxxxxxxxxxx</strong></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">v=xxxxxxxxxxx of the URI contains the video ID and needs to be extracted.</span><br />
</span></p>
<p><em><strong>substr(strstr($item-&gt;get_permalink(), &#8216;v=&#8217;), 2, 11)</strong> </em>isolates and extracts the video ID and then stores the ID in the <strong>$YT_VidID </strong>variable.</p>
<p><strong>Lets have a closer look.</strong><br />
We need to find the position in the URI string where the video ID starts and then extract it.</p>
<p>The video ID is passed in the URI as in query string paramater &#8220;v&#8221;.  I used the PHP strstr() method to match and find the position of &#8220;v=&#8221;. This will create a new string eliminating everything in front &#8220;v=&#8221; so we are left with &#8220;<span style="color: #ff0000;"><span style="color: #000000;">v=xxxxxxxxxxx&#8221;.</span></span></p>
<p>If you look close, you&#8217;ll notice that <em><strong>strstr($item-&gt;get_permalink(), &#8216;v=&#8217;) </strong></em>and therefore the resulting string, is actually used as the string argument in the substr() method used to isolate the video ID.<em><br />
</em></p>
<p><span style="color: #ff0000;"><span style="color: #000000;"> </span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">The second argument, &#8220;2&#8243; tells the substr method to offset the beginning of the string by two characters. This is to eliminate the &#8220;v&#8221; and &#8220;=&#8221; characters and moves the substring start position to the character after the &#8220;=&#8221; which is the first character of the Video ID. </span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">The third argument, 11, tells the substr method to isolate the next eleven characters from the start position, leaving us with the full video ID &#8220;xxxxxxxxxxx&#8221;.</span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;"> In experimenting and playing with this, I found that all YouTube video IDs are 11 characters long. I limited the substring to 11 instead of allowing it to extend to the end of the URI because, if for some reason additional string data was passed with the URI after the video ID, it would be included as part of  the extracted string and the result would be an invalid ID.</span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">After all that, I had the golden nugget of an isolated video ID which is now stored in the </span></span><strong>$YT_VidID </strong>variable. The hard part is DONE!! (really, it wasn&#8217;t that hard).</p>
<blockquote><p>echo &#8216;&lt;a href=&#8221;&#8216; . $YT_PlayerPage . $YT_VideoNumber . &#8220;/&#8221; . $YT_VidID . &#8216;&#8221;title=&#8221;&#8216; . $item-&gt;get_title() . &#8216;&#8221;&gt; &lt;img src=&#8221;&#8216; . $enclosure-&gt;get_thumbnail() . &#8216;&#8221;/&gt;&lt;/a&gt;&#8217;;</p></blockquote>
<p>The three key pieces needed to construct the direct Channel URIs are now available and the links can be put together. This line, still contained in our loop, constructs the link for each video item in the feed and outputs the HTML markup that will be included in the rendered page. To construct the link, join the three key pieces (the variables) like so:</p>
<p><strong>$YT_PlayerPage . $YT_VideoNumber . &#8220;/&#8221; . $YT_VidID</strong></p>
<p>$YT_PlayerPage = The base URI.<br />
$YT_VideoNumber = The video counter<br />
include a &#8220;/&#8221; character<br />
$YT_VidID = The video ID</p>
<p>The output should look like:<br />
http://www.youtube.com/user/[user name]#play/uploads/<span style="color: #000000;">#/xxxxxxxxxxx</span></p>
<p>Include this string as the value of the href of an HTML &lt;a&gt; tag.<br />
<strong>&#8216;&lt;a href=&#8221;&#8216; . $YT_PlayerPage . $YT_VideoNumber . &#8220;/&#8221; . $YT_VidID . &#8216;</strong><br />
Next add a &#8220;title&#8221; attribute to the &lt;a&gt; tag and set the value to $item-&gt;get_title().<br />
<strong>&#8220;title=&#8221;&#8216; . $item-&gt;get_title() . &#8216;&#8221;&gt;</strong><br />
This will create a hover text that shows the title of the video when the cursor hovers over the link.</p>
<p>Next, include the link content (text or image to act as the visible link). In my sample, I&#8217;ve used a thumbnail of each video.<br />
<strong>&lt;img src=&#8221;&#8216; . $enclosure-&gt;get_thumbnail() . &#8216;&#8221;/&gt;</strong><br />
Note that again I&#8217;m extracting the enclosure data included with MRSS as part of the RSS feed to get the thumbnail image for each video.</p>
<p>Finally add the closing &lt;/a&gt; tag to complete.</p>
<h2>But wait &#8230; There&#8217;s more!!</h2>
<blockquote><p>}</p></blockquote>
<p>The next line is nothing more than a closing bracket that closes and completes the conditional statement that checks for the enclosure data.</p>
<blockquote><p>if($YT_VideoNumber == $ShowMax) break;</p></blockquote>
<p>Remember the <strong>$ShowMax</strong> variable? This is where it comes into play. We are using the $YT_VideoNumber variable that was added to hold the counter for the current video and comparing it to the <strong>$ShowMax</strong> variable used to limit the number of videos the page will display. With each iteration of the loop, the code extracts the information for each video item and increments the counter by +1. The counter actually serves two purposes in the code. First,  to be used in constructing the video URI and second, to control the point at which the loop is to be exited. Why?.. If our video feed has 100 items and we only want to display 5 of them, then it does not make any sense to continue stepping through the loop to read the remaining items. So after we get what we want, we exit the loop to save resources.</p>
<p><strong>What&#8217;s happening here is this:</strong><br />
If the current <strong>$YT_VideoNumber</strong> variable value for the current iteration of the loop matches the value of the <strong>$ShowMax</strong> variable, then &#8220;break&#8221; (exit) out of the loop and we&#8217;re done.</p>
<blockquote><p>$YT_VideoNumber++;</p></blockquote>
<p>BUT, if the values of these variables does not match, then the next line increments the <strong>$YT_VideoNumber</strong> by +1 and continues to the next iteration of the loop.</p>
<blockquote><p>}</p></blockquote>
<p>And Finally, there is the closing bracket of the loop which also brings us to the end of the code block.</p>
<p>So that&#8217;s it. This code will render a set of YouTube video thumbnails in a web page that will link directly back to the video on the YouTube member&#8217;s channel page where ever it is included. But don&#8217;t stop there. Have a look at the other methods available in the YouTube API and SimplePie Library for additional information and data you can extract and use, add your own CSS and markup to the the output to change the layout, appearance, function &#8230; whatever you want.</p>
<p>I hope you found this useful. If you have any thoughts, improvements or comments to share, please post in the comments section here.</p>
<p><strong>And if you do use this in your own projects, I&#8217;d really appreciate a comment in your code, a shoutout or link back to this post. </strong></p>
<p>Happy coding!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edwardstafford.com/2009/08/07/youtube-api-hack-link-your-videos-directly-to-your-youtube-channel/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
