<?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>U-notez &#187; General</title>
	<atom:link href="http://www.unitz.com/u-notez/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unitz.com/u-notez</link>
	<description>Web development tips, ideas and discoveries from Unitz LLC</description>
	<lastBuildDate>Mon, 16 Aug 2010 18:41:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>A Cufón Small Caps Hack</title>
		<link>http://www.unitz.com/u-notez/2010/06/a-cufon-small-caps-hack/</link>
		<comments>http://www.unitz.com/u-notez/2010/06/a-cufon-small-caps-hack/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 04:13:37 +0000</pubDate>
		<dc:creator>Paul Reilly</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[User interfaces]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[cufon]]></category>
		<category><![CDATA[cufón small-caps]]></category>
		<category><![CDATA[font replacement]]></category>
		<category><![CDATA[small caps]]></category>

		<guid isPermaLink="false">http://www.unitz.com/u-notez/?p=252</guid>
		<description><![CDATA[I love the cufón font replacement technique. It allows developers to use custom fonts dynamically in their websites.  It&#8217;s incredibly easy to use compared to earlier options like siFR.  The@font-face CSS3 property (and Google Font Directory!) are  of course an even better solution, but the limited browser support means  we&#8217;ll have to wait [...]]]></description>
			<content:encoded><![CDATA[<p>I love the <a href="http://cufon.shoqolate.com/generate/" target="_blank">cufón </a>font replacement technique. It allows developers to use custom fonts dynamically in their websites.  It&#8217;s incredibly easy to use compared to earlier options like siFR.  The@font-face CSS3 property (and <a href="http://code.google.com/webfonts" target="_blank">Google Font Directory</a>!) are  of course an even better solution, but the limited browser support means  we&#8217;ll have to wait awhile before this approach has dominance. For now, Cufón is easy enough and works in just about <a href="http://wiki.github.com/sorccu/cufon/" target="_blank">every browser</a> &#8211; even IE6!</p>
<p><span id="more-252"></span></p>
<p>I&#8217;ve used this approach recently for several sites with dynamic page titles with great success.  That doesn&#8217;t mean it still has some <a href="http://wiki.github.com/sorccu/cufon/known-bugs-and-issues" target="_blank">limitations</a>. The two biggest in my opinion are the inability to select the replaced text, and the lack of a reliable hover option (so you can change the replaced font color on mouse-over). Another issue that has affected me is the lack of small-caps support. Although it&#8217;s slated to be included in a future Cufon version, I hacked together an approach that works now using jQuery and JavaScript regular expressions.</p>
<p>The process is fairly simple &#8211; first replace your text with Cufón, then run a regular expression that inserts SPAN tags around the first letter of each word, and then use jQuery to increase the font size of these span&#8217;s classes. Simply setting the classes font-size larger in CSS before hand does not work.</p>
<p>Below you can see the three stages of the process that I went through &#8211; first I loaded up a headline that uses the CSS small caps attribute &#8211; it works but it&#8217;s not the font I want. The next headline is Cufon replaced &#8211; it looks much better, but I&#8217;ve lost the small caps effect. Finally using the hack, I&#8217;ve achieved the custom font with small caps.</p>
<p><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script><script type="text/javascript" src="http://www.unitz.com/u-notez/wp-content/uploads/2010/06/cufon-yui.js"></script><script type="text/javascript" src="http://www.unitz.com/u-notez/wp-content/uploads/2010/06/agp_400.font_.js"></script></p>
<style type="text/css">h1.post {
font-family:times,times new roman, serif;
font-size:20px;
font-variant:small-caps;
color:#900;
}h1#test3 {
text-transform:uppercase;
}h1 span.caps {
	position:relative;
	top:2px;	
}</style>
<p><script type="text/javascript">jQuery(document).ready(function($) {
	Cufon.replace('h1#test2', { fontFamily: 'agp' });
	var text = $('h1#test2').html();
	$('h1#post2').html(text.replace(/\b([A-Za-z0-9])/g,'<span class="caps">$1</span>'));
	Cufon.replace('h1#test3', { fontFamily: 'agp' });
	var text = $('h1#test3').html();
	$('h1#test3').html(text.replace(/\b([A-Za-z0-9])/g,'<span class="caps">$1</span>'));
	$('.caps').css('font-size',30);});</script></p>
<h1 class="post" id="test1">Un-replaced Text with Small Caps</h1>
<h1 class="post" id="test2">Replaced Text before Small Caps Hack</h1>
<h1 class="post" id="test3">Replaced Text with Small Caps</h1>
<p>The first step is to load in your various javascript files. You can download cufon and create your own font javascript files at <a href="http://cufon.shoqolate.com" target="_blank">cufon.shoqolate.com</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;PATHTO/cufon-yui.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;PATHTO/font-file-you-create.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div>

<p>Then you can set up the styles you want your headlines to have:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&lt;style type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span><span style="color: #00AA00;">&gt;</span>
h1 <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:times</span><span style="color: #00AA00;">,</span>times new roman<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#900</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&lt;/style<span style="color: #00AA00;">&gt;</span></pre></div></div>

<p>The next step is to create your headline:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>This is the headline I'm font-replacing<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span></pre></div></div>

<p>Finally, use the follow JavaScript to create the effect:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	Cufon.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'h1'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> text <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'h1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'h1'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>text.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\b([A-Za-z0-9])/g</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'&lt;span class=&quot;caps&quot;&gt;$1&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.caps'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'font-size'</span><span style="color: #339933;">,</span><span style="color: #CC0000;">30</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This script, which loads when the DOM is ready, first replaces the font, then inserts &lt;span class=&#8221;caps&#8221;&gt; around the first letter of each word, and finally increases the font size on these first letters from 20px to 30px. You can of course change these font sizes to meet your needs. The particular font I used here, Adobe Garamond Pro, had a slight line-height offset after this JavaScript was run &#8211; I fixed this with a style for the &#8216;caps&#8217; CSS class &#8211; you may need something similar for the font you choose</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">h1 span<span style="color: #6666ff;">.caps</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>	
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>I hope someone finds this useful.</p>
<iframe class="me-likey" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.unitz.com%2Fu-notez%2F2010%2F06%2Fa-cufon-small-caps-hack%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;height=80&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.unitz.com/u-notez/2010/06/a-cufon-small-caps-hack/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using the WordPress 3.0 Menus Feature Part 2 &#8211; Styling and Animating</title>
		<link>http://www.unitz.com/u-notez/2010/05/how-to-style-animate-wordpress-3-menus/</link>
		<comments>http://www.unitz.com/u-notez/2010/05/how-to-style-animate-wordpress-3-menus/#comments</comments>
		<pubDate>Mon, 31 May 2010 12:45:51 +0000</pubDate>
		<dc:creator>Paul Reilly</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[User interfaces]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.unitz.com/u-notez/?p=216</guid>
		<description><![CDATA[Welcome back! Since my first post, where I demonstrated the simple yet powerful WordPress 3.0 Menu Management functionality, WordPress 3.0 RC1 has been released! With this great new tool, WordPress has become an even more robust option for content management. Now non-technical users can easily manage the navigation (including drop-down menus) of their site through [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/images.jpg" alt="" title="images" width="118" height="118" class="alignright size-full wp-image-194" />Welcome back! Since my <a href="http://www.unitz.com/u-notez/2010/05/how-to-use-the-wordpress-3-menus-feature/" target="_blank">first post</a>, where I demonstrated the simple yet powerful <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu" target="_blank">WordPress 3.0 Menu Management</a> functionality, <a href="http://wordpress.org/development/2010/05/wordpress-3-0-release-candidate/" target="_blank">WordPress 3.0 RC1</a> has been released! With this great new tool, WordPress has become an even more robust option for content management. Now non-technical users can easily manage the navigation (including drop-down menus) of their site through a WYSIWYG environment.</p>
<p>In this second post, I&#8217;m going to explore the code generated by this functionality, and give a simple demonstration of how to style and animate the generated menus using  CSS and <a href="http://www.jquery.com" target="_blank">jQuery</a>. You can then use these skills to develop your own WordPress 3.0 theme and its menus.</p>
<p><span id="more-216"></span></p>
<p>Here&#8217;s a demonstration video of the end result. The menus were created using the WordPress Menu Management functionality and are set to animate down and fade in on mouseover, and utilize CSS3 gradients and rounded corners. Refer back to <a href="http://www.unitz.com/u-notez/2010/05/how-to-use-the-wordpress-3-menus-feature/" target="_blank">part I</a> to see how the menus were created initially.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="675" height="481" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=12117988&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="675" height="481" src="http://vimeo.com/moogaloop.swf?clip_id=12117988&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Our first step will be to add styling to the menus. As with the previous post, I am basing these instructions on the default WordPress 3.0 Theme &#8220;Twenty Ten.&#8221; It&#8217;s important to understand all of the pieces of code that come together to draw the menus. For this example, 3 files will come into play.</p>
<p>The first is header.php in the theme&#8217;s root directly. This is the file that draws the header part of your pages. In the Twenty Ten theme, it includes a call to wp_nav_menu(). This is the function that queries WordPress for the menu in HTML. It takes several optional parameters, which I won&#8217;t get into here &#8211; they&#8217;re described at <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu" target="_blank">http://codex.wordpress.org/Function_Reference/wp_nav_menu</a> if you&#8217;d like to explore &#8211; they let you change CSS classes, wrapper &lt;DIV&gt;s, etc.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div id=&quot;access&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_nav_menu<span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'sort_column'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'menu_order'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'container_class'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'menu-header'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'theme_location'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'primary'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;</pre></div></div>

<p>Sample output of this function is below. You&#8217;ll notice that WordPress draws the menu out using unordered lists. They nest secondary menus in additional &lt;ul&gt; tags. This is a very popular method to organize navigation and is highly customizable with CSS. If you&#8217;re unfamiliar with this approach, <a href="http://www.alistapart.com/articles/horizdropdowns/" target="_blank">A List Apart</a> has a very good explanation.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;access&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-header&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-wordpress-sandbox-menu&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item-17&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Fruits<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sub-menu&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item-19&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Oranges<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item-20&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Apples<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item-32&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Colors<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sub-menu&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item-30&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Blue<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item-31&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Red<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item-33&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Links<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sub-menu&quot;</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item-34&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Google<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
			<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item-35&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu-item&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Yahoo!<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></pre></div></div>

<p>Comparing this HTML output to the accompanying sample images and video, you&#8217;ll notice the drop-down portion of the navigation is in the nested &lt;UL&gt;s with a CSS class of &#8217;sub-menu&#8217;.  This is generated automatically by WordPress and this nesting structure is how you can add style and animation. Please note that for this demonstration, the HTML above has been simplified &#8211; my links are empty and I have also stripped out many additional class names that WordPress includes automatically for the UL&#8217;s and LI&#8217;s to make the HTML simpler to read. These classes can be very useful for detailed styling though, so consider reviewing your generated code when you do your implementation.</p>
<p>Now that we know how the menus are drawn in HTML, we can start to style and animate them. As mentioned earlier, my examples work on top of the Twenty Ten default WordPress 3.0 Theme, so I will show code from this theme. This theme has a GNU General Public License so we&#8217;re free to modify it and use it near any way we&#8217;d like &#8211; consider copying it and working on the copied version for your experimentation. </p>
<p>The CSS styles for the Twenty Ten theme are in the file styles.css in the main theme directory. Starting around line 370 of this file (in the RC1 version of WordPress at least), you&#8217;ll see a section of the CSS commented &#8216;Menu&#8217; that starts defining the menu&#8217;s styles.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* =Menu
-------------------------------------------------------------- */</span>
<span style="color: #cc00cc;">#access</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">940px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Looking through this section of CSS, you&#8217;ll see the various styles that set the colors and fonts used in the menus. In my example, I changed the background colors for the nested sub-menu lists. I also added gradients to them (these gradients only work on CSS3 compatible browsers). Specifically I styled &#8220;#access ul ul a&#8221; like so (the background-image calls set the gradient):</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#access</span> ul ul a <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">1em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">160px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> -moz-linear-gradient<span style="color: #00AA00;">&#40;</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span> <span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span> 90deg<span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#474747</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#939393</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> -webkit-gradient<span style="color: #00AA00;">&#40;</span>linear<span style="color: #00AA00;">,</span> <span style="color: #933;"><span style="color: #cc66cc;">0</span>%</span> <span style="color: #933;"><span style="color: #cc66cc;">0</span>%</span><span style="color: #00AA00;">,</span> <span style="color: #933;"><span style="color: #cc66cc;">0</span>%</span> <span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">,</span> from<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#939393</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> to<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#474747</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>I also added rounded corners to the bottom of each sub-menu. Again this isn&#8217;t support on all browsers. To do this I modified &#8220;#access ul ul,&#8221; adding the following CSS. The extra bottom padding gives room for the rounded corners.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#access</span> ul ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#474747</span><span style="color: #00AA00;">;</span>
	-moz-border-radius-bottomleft<span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	-webkit-border-bottom-left-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	-moz-border-radius-bottomright<span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
	-webkit-border-bottom-right-radius<span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The key parts of the CSS that tell the menus to appear on mouseover are below:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#access</span> ul ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	...
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>and</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#access</span> ul li<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&gt;</span> ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The first part tells the browser not to initially display the nested menus, but the second says do show them when the parent item is moused-over. To get our animation working, we&#8217;re going to comment out the &#8220;display:block&#8221; CSS &#8211; we&#8217;re going to instead control the display menu event with JavaScript.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#access</span> ul li<span style="color: #3333ff;">:hover </span><span style="color: #00AA00;">&gt;</span> ul <span style="color: #00AA00;">&#123;</span>
	<span style="color: #808080; font-style: italic;">/*display:block;*/</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The simplest way to do this is with the help of a JavaScript library like <a href="http://www.jquery.com" target="_blank">jQuery</a>. WordPress already comes with jQuery so we need to load it in using the <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" target="_blank">wp_enqueue_script function</a>. The enqueue function is the safe way to add JavaScripts to WordPress to safeguard against various conflicts. We&#8217;re also going to load in a second JavaScript file we&#8217;re about to create called navigation.js.</p>
<p>Open up the header.php file and add</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
&nbsp;
wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'unitzNav'</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'template_directory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/navigation.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>to the HEAD section of the document. We&#8217;re now loading up the jQuery library automatically for use with every page. Now it&#8217;s time to create the navigation.js file we referenced earlier &#8211; create this file in the same directory as the rest of the theme files.</p>
<p>If you&#8217;re unfamiliar with the power of jQuery there are ample tutorials and discussions online. In a nutshell, jQuery makes once complicated JavaScript tasks very simple, that work in just about every browser.  We&#8217;re going to be using a simple effect for our menu animation but, many jQuery menu plugins and navigation techniques are available that you can use as well. <a href="http://designm.ag/tutorials/jquery-navigation/" target="_blank">Here</a> and <a href="http://www.1stwebdesigner.com/resources/38-jquery-and-css-drop-down-multi-level-menu-solutions/" target="_links">here</a> are resources to explore many such techniques.</p>
<p>Put the following in your navigation.js file:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">//initial the menus</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ul.menu li&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">mouseover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ul.sub-menu&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;height&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;show&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;opacity&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;show&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">800</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;swing&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;ul.sub-menu&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">animate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;height&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;hide&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;opacity&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;hide&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Believe it or not, this short section of code is all it takes to get the drop down menu animation working across most browsers with jQuery. The outer wrapper is a jQuery function call that runs when the page is finished loading. It then tells the browser to animate open the instance of ul class=&#8221;sub-menu&#8221; whenever a parent list item is moused over.  Then, using the hover function, it tells the browser to animate closed this same menu when either the parent item or menu is moused out. </p>
<p>On the <a href="http://www.jquery.com" target="_blank">jQuery</a> website you can read more about this syntax and the available function parameters &#8211; many types of animations and effects can be used here.</p>
<p>This simple approach does have limitations &#8211; specifically, although the Twenty Ten theme and WordPress&#8217;s menu manager support more than two levels of navigation, this jQuery implementation does not and will break the lower menus. However, considering the relatively simple modifications, the effect is quite effective. </p>
<p>Thanks for taking the time to read these posts &#8211; I hope it gets you excited for the power of WordPress 3.0&#8217;s menu management and gets your thinking about ways to style and animate your own menus.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="675" height="481" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=12117988&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="675" height="481" src="http://vimeo.com/moogaloop.swf?clip_id=12117988&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<iframe class="me-likey" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.unitz.com%2Fu-notez%2F2010%2F05%2Fhow-to-style-animate-wordpress-3-menus%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;height=80&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.unitz.com/u-notez/2010/05/how-to-style-animate-wordpress-3-menus/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Using the WordPress 3.0 Menus Feature Part 1</title>
		<link>http://www.unitz.com/u-notez/2010/05/how-to-use-the-wordpress-3-menus-feature/</link>
		<comments>http://www.unitz.com/u-notez/2010/05/how-to-use-the-wordpress-3-menus-feature/#comments</comments>
		<pubDate>Thu, 20 May 2010 02:36:43 +0000</pubDate>
		<dc:creator>Paul Reilly</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[User interfaces]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Menus]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[WordPress 3.0]]></category>

		<guid isPermaLink="false">http://www.unitz.com/u-notez/?p=190</guid>
		<description><![CDATA[WordPress 3.0 adds a powerful new feature in Menus management. This post describes this feature and explains how to use it.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/images.jpg"><img class="alignright size-full wp-image-194" title="images" src="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/images.jpg" alt="" width="118" height="118" /></a>While WordPress 3.0 still hasn&#8217;t been officially released, the Beta releases have been available for testing for awhile now. A new feature that is getting a lot of <a href="http://net.tutsplus.com/tutorials/wordpress/10-features-to-look-forward-to-in-wordpress-3-0/" target="_blank">press</a> is the menus option. In this post, I&#8217;ll demonstrate how this new functionality works. I think you&#8217;ll agree that it has significant potential (see the video at the end of the post).  In my <a href="http://www.unitz.com/u-notez/2010/05/how-to-style-animate-wordpress-3-menus/">second post</a> in this series, I&#8217;ll delve into the code and show how to make modifications to the display of the menus, using CSS and <a href="http://www.jquery.com">jQuery</a>.</p>
<p>To follow along, you&#8217;ll need to download WordPress 3.o. You can visit the <a href="http://wordpress.org/development/" target="_blank">WordPress development blog </a>to find a link to the latest Beta, and soon version 3.0 will be released <a href="http://wordpress.org/download/" target="_blank">officially</a>. WordPress.org provides excellent installation <a href="http://codex.wordpress.org/Main_Page" target="_blank">documentation</a> if you need help installing.</p>
<p><span id="more-190"></span></p>
<h2>What is it?</h2>
<p>WordPress has come a long way since starting as purely a blogging platform. Thanks to its open framework, it has been modified through plug-ins to be a powerful content management system (CMS). Developers started using WordPress to drive entire sites full of content &#8211; not just blogs.  However, to do so required tricks and kludges to work properly. WordPress 3.0 makes the process much easier and truly makes WordPress a viable CMS platform.</p>
<div id="attachment_197" class="wp-caption alignleft" style="width: 385px"><a href="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/menus-sample.gif"><img class="size-full wp-image-197" title="menus-sample" src="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/menus-sample.gif" alt="" width="375" height="230" /></a><p class="wp-caption-text">Simple Menus Controlled Through WordPress</p></div>
<p>WordPress has allowed users to create two different types of content &#8211; posts and pages. Posts are the blog posts themselves, generated over time. Pages, which are created through a similar interface, were meant to hold static content. All WordPress installations start with a single About Us &#8220;page&#8221; that the blogger can use to describe themselves. Developers have utilized these &#8220;pages&#8221; to create entire sites and used WordPress as a CMS so end users could edit content themselves. These developers used to have to manually create the navigation structure though, digging deep into the code, in order to create links to all of the pages they created. With WordPress 3.0, regular users can now not only create pages but also organize and arrange them into menus through the Menus sections&#8217; simple drag and drop interface.</p>
<h2>How do you use it?</h2>
<p>This post assumes that you&#8217;re using the default WordPress 3.0 Theme, called Twenty Ten, which has support for the menu manager built in. My  <a href="http://www.unitz.com/u-notez/2010/05/how-to-style-animate-wordpress-3-menus/">next post</a> in this series will explain how to modify the theme and change the display of the menu.</p>
<p>To explore the Menus feature,  start by creating a few sample pages in your fresh WordPress 3.0 installation. In my visual examples I have created a few pages named after fruits and colors. If you need help learning how to use the WordPress interface to create pages, WordPress.org has excellent <a href="http://codex.wordpress.org/Main_Page" target="_blank">documentation</a>.</p>
<div id="attachment_195" class="wp-caption alignright" style="width: 285px"><a href="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/menu-admin1.gif"><img class="size-full wp-image-195" title="menu-admin1" src="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/menu-admin1.gif" alt="" width="275" height="418" /></a><p class="wp-caption-text">The Menus page in WordPress 3.0</p></div>
<p>Once your pages are created, click on the menus link in the left column of the administration area, under the &#8220;Appearance&#8221; heading. Please note that users need appropriate permissions to access this link. Two new columns of options appear to the right.</p>
<p>The left column allows you to choose the type of link you want to add to your menu. There are three types of menu items you can add:</p>
<ul>
<li><strong>Custom Links</strong> allow you to add menu items that link to external web pages. Enter the page&#8217;s address in the URL box and the name you want to use in the label box. In my visual examples I have used this section to add links to Google and Yahoo!</li>
<li><strong>Pages</strong> is where you add menu items that link to the WordPress pages you have created &#8211; in my examples the colors and fruits pages are available to me.</li>
<li><strong>Categories</strong> is the final option, and if you have created categories of blog posts, pages that list all posts in that category appear here.</li>
</ul>
<p>Select the check boxes next to the pages you want and click add to your menu. Add a few custom links if you&#8217;d like as well. These items will now all appear in the right column in a vertical list. The Twenty Ten theme draws the menus horizontally, so you need to visualize the appearance of the items left to right instead of top to bottom.</p>
<div id="attachment_196" class="wp-caption alignleft" style="width: 385px"><a href="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/menu-admin2.gif"><img class="size-full wp-image-196" title="menu-admin2" src="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/menu-admin2.gif" alt="" width="375" height="381" /></a><p class="wp-caption-text">Organizing Menu Items in WordPress 3.0</p></div>
<p>Now click and drag the items in the right column &#8211; you will notice that you can arrange them and adjust them left and right. The order you arrange them in is the order in which they appear. The adjustments you make left and right determine their hierarchy in the site. The leftmost items are your primary navigation. Items nested one notch to the right are the secondary navigation of their parent, and so on. In the Twenty Ten theme, the primary navigation items appear at all times at the top of the page, and when you mouse over them the secondary navigation menus appear. The third tier menus and so on appear to the right of their parent items when the parent is moused over.</p>
<p>WordPress generates standard XHTML <a href="http://www.alistapart.com/articles/taminglists/" target="_blank">lists for the menus</a>, which a WordPress template developer can then use to style your navigation menus any way you choose. Check back for part two of this series to see an example of how these menus can be modified visually.</p>
<h2>Who will use it?</h2>
<p>Although this functionality doesn&#8217;t seem particularly groundbreaking, it makes the process of adding pages and organizing content vastly simpler than before. Prior to WordPress 3.0 adding pages and updating navigation menus almost always required a phone call to the developer, which meant additional costs and lost turnaround time. Now website owners of nearly all technical skill levels can easily keep their sites updated and organized, without delay and without sacrificing the look and feel of the navigation.</p>
<p>View a demonstration of the functionality below &#8211; I first show the menu with 3 items &#8211; then I nest one menu under another through a simple drag and drop and reload the page to show the change.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="625" height="414" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=11886550&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="625" height="414" src="http://vimeo.com/moogaloop.swf?clip_id=11886550&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>In my  <a href="http://www.unitz.com/u-notez/2010/05/how-to-style-animate-wordpress-3-menus/">next post</a>, I will discuss the code that the Menus function generates, and show you how to add animation and style changes to it. Thanks for reading!</p>
<iframe class="me-likey" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.unitz.com%2Fu-notez%2F2010%2F05%2Fhow-to-use-the-wordpress-3-menus-feature%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;height=80&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.unitz.com/u-notez/2010/05/how-to-use-the-wordpress-3-menus-feature/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Out of Sight, Out of Mind &#8211; Don&#8217;t Lose Those Passwords!</title>
		<link>http://www.unitz.com/u-notez/2010/05/out-of-sight-out-of-mind-dont-lose-those-passwords/</link>
		<comments>http://www.unitz.com/u-notez/2010/05/out-of-sight-out-of-mind-dont-lose-those-passwords/#comments</comments>
		<pubDate>Thu, 06 May 2010 04:52:04 +0000</pubDate>
		<dc:creator>Paul Reilly</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Vendors]]></category>

		<guid isPermaLink="false">http://www.unitz.com/u-notez/?p=176</guid>
		<description><![CDATA[Several sets of usernames and passwords are imperative for making changes and updates to your website.  Especially for sites that are a few years old and were developed by outside developers, these passwords get easily lost &#8211; frequently the scenario is the employee that kept track of them has long since left the company or [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-184" style="border: 1px solid black;" title="password" src="http://www.unitz.com/u-notez/wp-content/uploads/2010/05/password.jpg" alt="password" width="300" height="196" />Several sets of usernames and passwords are imperative for making changes and updates to your website.  Especially for sites that are a few years old and were developed by outside developers, these passwords get easily lost &#8211; frequently the scenario is the employee that kept track of them has long since left the company or the file storing them has been deleted.</p>
<p>Unfortunately, the time you realize you really need this information is when there is an emergency &#8211; and the time it takes to track down the passwords ends up being very expensive.</p>
<p><strong>Examples of such scenarios include:</strong></p>
<ul>
<li>The domain name has expired and your website no longer loads. The domain name will be available for purchase to anyone.</li>
<li>Content errors, such as pricing are on the website and are limiting sales.</li>
<li>Legal action is threatened about content, and needs to be changed immediately.</li>
<li>Employees leave under bad circumstances and related content needs to be changed immediately</li>
<li>3rd party providers change their services and immediate attention is required to keep your site active or current</li>
</ul>
<p>Track down the following list of important website related passwords and store them in a safe place that is not tied to an individual employee.  I explain why it&#8217;s important and ways to track it down as well.</p>
<p><strong><span id="more-176"></span>DNS</strong></p>
<p>The passwords for your domain name registrar are often the ones to first go missing &#8211; ironically, they&#8217;re also arguably the most important. The domain name registrar is the company that you registered your actual domain name (yourcompany.com) with. These companies charge you annually for the registration, and point requests for your domain to your web host, which can often be a different company. Often these companies set up automatic billing, and just charge you every year &#8211; but if they don&#8217;t have the right name or e-mail address on file, notices when credit cards expire or other problems arise can go unread. More frequently now that websites have been up for several years, companies are startled to see their site has a domain name for sale message on Monday morning! Make sure your domain registrar information and contact information is current and you know how to access their website.</p>
<p>If you don&#8217;t know anything about your registrar or passwords and need a place to start, try <a href="http://whois.domaintools.com/" target="_blank">http://whois.domaintools.com/</a>. Enter your domain name on this website, and it will tell you who your registrar is and what contacts this registrar has on file. Then go to the registrars website and read about how to retried your information. Different providers have different policies. These policies are usually fairly strict &#8211; which is for our own good &#8211; if it would certainly be a problem if it were easy for someone to get access to your domain name and re-point it to their own site.  Common registrars include <a href="http://www.netsol.com/" target="_blank">Network Solutions</a>, <a href="http://www.godaddy.com/" target="_blank">GoDaddy </a>and <a href="http://www.1and1.com/" target="_blank">1and1</a>.</p>
<p><strong>Hosting</strong></p>
<p>Your web host is the company with the computer that your website files actually reside on. The domain name registrar points your domain name to the web host&#8217;s servers. Several different passwords can come into play with web hosts.</p>
<p style="padding-left: 30px;"><strong>SFTP/FTP &#8211; </strong>Your sftp username and password is used to connect to the host&#8217;s server and upload new files to your website. If you don&#8217;t have FTP access, you can&#8217;t change anything on your site.</p>
<p style="padding-left: 30px;"><strong>Control Panel Access</strong> &#8211; Most web hosts have a &#8216;control panel&#8217; which is an administrative area where you can manage multiple website settings, including administrative contact information, billing information, email accounts and settings, mailing lists, databases and more.</p>
<p style="padding-left: 30px;"><strong>Databases</strong> &#8211; If your website uses a database to store and provide data it&#8217;s important to keep track of the database password. Your developer could have set up a database to store website contact form submissions, product details, etc. Future developers may need this information to make changes or you may need it to extract data.</p>
<p>Fortunately, you can usually retrieve all of these various usernames and passwords by giving your host a call and providing some verification information. If you&#8217;re not sure who your host is, <a href="http://www.whoishostingthis.com" target="_blank">www.whoishostingthis.com</a> can look it up for you.  When you know the host, visit their website, find their contact information, and give them a call.</p>
<p><strong>Other Important Passwords<br />
</strong></p>
<p>Many other pertinent usernames and passwords can come into play for your site. If your website is using any 3rd party vendors for content or services, such as YouTube for videos, flickr for photos or blogger for blog content, usernames and passwords are necessary to access and change the content. Review your site and see if you know where all you content is coming from &#8211; even if you&#8217;ve stopped updating the site through these services, you&#8217;ll want this information, should you need to make urgent changes later. In the same vein, if a content management system was used to create your site, make sure you have access to its administration section &#8211; sometimes sites are built with CMSs but never used, and having this information ready in case is important.</p>
<p>If your website uses any kind of e-commerce to sell products or collect funds, various usernames and passwords are involved as well &#8211; banks may have administration sections you&#8217;ll need to, modify settings for charge collection, and e-commerce software has usernames and passwords needed to add, delete and modify product offerings &#8211; make sure this information is current and available should you need it in a pinch.</p>
<p><strong>Conclusion</strong></p>
<p>Many businesses don&#8217;t realize how many different parts go into making their website tick. Each of these parts has usernames and passwords, necessary to make changes or updates to your site. Unfortunately, this key information is lost over time, and much too often I&#8217;ve been a part of mad scrambles to help clients find everything they need when an emergency strikes. Take some time today and track down all the information you&#8217;ll need should an emergency strike.</p>
<iframe class="me-likey" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.unitz.com%2Fu-notez%2F2010%2F05%2Fout-of-sight-out-of-mind-dont-lose-those-passwords%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;height=80&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.unitz.com/u-notez/2010/05/out-of-sight-out-of-mind-dont-lose-those-passwords/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 Reasons to Re-Evaluate your Web Vendors</title>
		<link>http://www.unitz.com/u-notez/2010/05/5-reasons-to-reevaluate-your-web-vendors/</link>
		<comments>http://www.unitz.com/u-notez/2010/05/5-reasons-to-reevaluate-your-web-vendors/#comments</comments>
		<pubDate>Mon, 03 May 2010 16:23:00 +0000</pubDate>
		<dc:creator>Paul Reilly</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[User interfaces]]></category>
		<category><![CDATA[Vendors]]></category>

		<guid isPermaLink="false">http://www.unitz.com/u-notez/?p=164</guid>
		<description><![CDATA[&#8220;Wow how time flies! Remember way back in 2003, when the company decided we needed a fantastic website, with all of the latest bells and whistles? Well we did it, and it served us quite well at first. But it is showing its age now though, isn&#8217;t it? I guess it&#8217;s time to call the [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Wow how time flies! Remember way back in 2003, when the company decided we needed a fantastic website, with all of the latest bells and whistles? Well we did it, and it served us quite well at first. But it is showing its age now though, isn&#8217;t it? I guess it&#8217;s time to call the designers and developers and make some changes&#8230;.&#8221;</p>
<p>Does this scenario sound familiar? It&#8217;s sometimes hard to believe, but given the rapid speed of Internet growth, the cutting edge technology that companies worked so hard to implement just a few years ago is now outdated and insufficient.  I&#8217;ve been working with many companies that are coming to this realization, and an unfortunate trend has appeared. These companies, sadly are completely determined to keep using their 3rd party vendors and service providers.</p>
<p><span id="more-164"></span>Services and vendor offerings I am referring to include web hosting,  email, e-commerce and payment systems, surveys, content management  systems and video and photo services.  Reasons that companies don&#8217;t want to change vendors vary &#8211; they don&#8217;t want to make the effort required to change, they feel entrenched, they&#8217;re nervous of possible ramifications, etc.  Although these can sometimes be valid reasons, more often than not this short-sightedness ends up being more expensive, provides customers a sub-par user experience and limits the company in serveral other ways. Read on to learn why.</p>
<ol>
<li><strong>Cost</strong><br />
Cost is the most straightforward reason to consider a vendor switch. In the last five years, the number of internet service vendors has exploded &#8211; which has driven down overall costs. More products are based on open standards and existing frameworks and more are sold as a service and hosted in the cloud. Contrast this to what it took to install something like a shopping cart several years ago &#8211; then it was proprietary and customized &#8211; at a high cost. Often clients are still paying monthly fees for these outdated services &#8211; and drastically overpaying at that. Now they can consider new options and opportunities that improve what they offer their customers, at a much lower cost over the life of the website.</li>
<li><strong>Ease of Implementation<br />
</strong>Companies remember the hassles and time required to add that shopping cart or add that video to their site years ago and are hesitant to go through the same ordeal again. The small vendors they selected from limited options years ago took forever to respond and had poor documentation.  However, much has changed &#8211; many current providers are bigger with much larger customer bases. They&#8217;ve greatly improved the implementation process, with excellent documentation and sample code and robust APIs that give more flexibility for implementations. There are many customers that share sample code and have documented their implementations. Forums and responsive users abound to discuss and help in using the products. <em>Current vendors offer more services that are easier to add and maintain than before, at a reasonable cost</em>.</li>
<li><strong>More Available Options<br />
</strong>Today&#8217;s established vendors have a more dedicated focus and larger teams working to support their products. They are working to make their products as useful as possible and offer many new features and options. These new features make your website more useful to your own customers.</li>
<li><strong>Better Customer Support<br />
</strong>Along with some of the reasons these products are easier to implement is the improved customer support &#8211; the vendors are larger or more specialized and have knowledgeable dedicated staff to help your company use their products. And through forums and development websites, more customers are active in the discussions as well &#8211; making it much easier to implement the products than in the past.<strong> </strong></li>
<li><strong>Growth Opportunities<br />
</strong>Finally, the way the product will grow and improve is important to consider. Many of the vendors that have been around for many years have all but given up on keeping their products current. Reasons vary &#8211; perhaps their customer base is small and the product isn&#8217;t worth upgrading. Perhaps the vendors don&#8217;t have the right staff to keep the product current. If your vendor&#8217;s offering is the same now as it was five years ago &#8211; chances are they aren&#8217;t looking for ways to improve their product and your business &#8211; switching to a dedicated vendor will better ensure that your website will grow with more and better functionality in the future.</li>
</ol>
<p>With these reasons in hand, consider your current vendors and if they&#8217;re really meeting your needs. If you&#8217;re not sure, start researching their competition. Check the services provided and pricing. You may be surprised at what&#8217;s possible out of the box now, and how reasonably it can be priced. Good resources, aside from just <a href="http://www.google.com" target="_blank">Googling, </a>include <a href="http://www.techcrunch.com" target="_blank">TechCrunch </a>and <a href="http://www.mashable.com" target="_blank">Mashable</a>.</p>
<p>Let me know your thoughts. Have you found a new vendor that drastically improved your website?</p>
<iframe class="me-likey" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.unitz.com%2Fu-notez%2F2010%2F05%2F5-reasons-to-reevaluate-your-web-vendors%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;height=80&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.unitz.com/u-notez/2010/05/5-reasons-to-reevaluate-your-web-vendors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automate Your Christmas Lights!</title>
		<link>http://www.unitz.com/u-notez/2009/12/automate-your-holiday-lights/</link>
		<comments>http://www.unitz.com/u-notez/2009/12/automate-your-holiday-lights/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 20:35:00 +0000</pubDate>
		<dc:creator>Paul Reilly</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[holiday]]></category>
		<category><![CDATA[lighting]]></category>

		<guid isPermaLink="false">http://www.unitz.com/u-notez/?p=144</guid>
		<description><![CDATA[As the holidays fast approach, millions of us are pulling decorations out of the attic, grabbing extension cords and untangling the lights. Last weekend I set up the tree, put lights outside, and put candle lights in each of my windows. It certainly looked nice and festive, but I quickly dreaded having to plug and [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_153" class="wp-caption alignright" style="width: 160px"><img class="size-thumbnail wp-image-153" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/12/xmaslights-150x150.jpg" alt="Holiday Lights Display" width="150" height="150" /><p class="wp-caption-text">Holiday Lights Display</p></div>
<p>As the holidays fast approach, millions of us are pulling decorations out of the attic, grabbing extension cords and untangling the lights. Last weekend I set up the tree, put lights outside, and put candle lights in each of my windows. It certainly looked nice and festive, but I quickly dreaded having to plug and unplug each set of lights every day.</p>
<p>Fortunately, I had a solution! Using X10 automation modules, my windows computer and about 30 minutes of effort, my lights now turn on and off automatically every day!  This post details the steps I took to accomplish this, and provides some resources so you can set up a similar solution yourself.</p>
<p><span id="more-144"></span>The X10 automation system is technology that send signals across your home wiring, to turn on and off lights and devices you plug in to power outlets. To get up and running yourself, you&#8217;ll need a starter X10 kit &#8211; I recommend the <a title="X10 Firecracker Kit" href="http://www.x10.com/automation/firecracker.htm" target="_blank">Firecracker Kit</a>.</p>
<div id="attachment_149" class="wp-caption alignleft" style="width: 160px"><img class="size-thumbnail wp-image-149" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/12/fc_remote-150x150.jpg" alt="X10 Firecracker Kit" width="150" height="150" /><p class="wp-caption-text">X10 Firecracker Kit</p></div>
<p>Be forewarned &#8211; the x10.com store is notorious for popup ads and gaudy design. Despite this, their products are quite reputable. Also please note that most of the items mentioned in this post are available on <a title="X10 Firecracker Kit Search on eBay" href="http://shop.ebay.com/i.html?_nkw=x10+firecracker+kit&amp;_sacat=0&amp;_trksid=p3286.m270.l1313&amp;_odkw=x10&amp;_osacat=0" target="_blank">eBay</a> for a fraction of the cost. The Firecracker kit has four items &#8211; a transceiver which receives the on/off signals and sends them through the house wiring (and can turn on/off an item plugged into it), a lamp module which can turn lights plugged into it on and off when it receives a signal sent by the transceiver, and a computer interface and remote control &#8211; both of which send the on/off signals to the transceiver. You can purchase any additional lamp outlets you may need on eBay inexpensively as well.</p>
<p>The x10 transceiver lets you select a letter from A-P via a simple dial.  This is the &#8216;house code&#8217; for that transceiver. Each of your lamp modules then let you pick both a house code and unit number from 2 to 16 (the transceiver itself is unit 1). Each combination of house and unit numbers must be unique. So to get started, set your transceiver to house code A, plug a set of Christmas lights into it, and plug it into the wall. Then take your lamp module, set it to house code A and unit number 2, and also plug lights into it and plug it into the wall. You&#8217;re ready to turn these on and off using the included remote control! Set your remote to house code A, and then hit the unit 1 and unit 2 on buttons &#8211; voila! the lights turn on. With more lamp modules you can set all the lights you want to control throughout your house this way, as long as the unit numbers are all unique.</p>
<p>After setting this up, you could just stop here. You can now turn off all of the lights with the push of a few buttons &#8211; much simpler than walking all over the house twice every day! But I wanted the lights to turn on and off completely automatically. To accomplish this, I utilized the fourth item that came with the Firecracker kit &#8211; the computer interface, called the CM17A. This tiny little item plugs into your computer&#8217;s serial port and sends the same signals that the remote control sends, only you can configure your computer to send the signals automatically. The following explanation is done on a computer running Windows 7, but the same steps can be accomplished on other versions of Windows, though the steps may look a bit different.</p>
<div id="attachment_154" class="wp-caption alignright" style="width: 552px"><img class="size-full wp-image-154" title="X10 Command Line" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/12/commandprompt1.GIF" alt="commandprompt" width="542" height="214" /><p class="wp-caption-text">X10 Command Line Example</p></div>
<p><a title="x10 christmas light automation" href="http://www.x10.com/friends/refer.cgi?pmreil@yahoo.com" target="_blank">X10.com</a> offers software packages for a fee that allow you to set up complicated macros &#8211; this was overkill for me as I just needed to send on and off signals once a day. I used a very simple command line tool created by Adam Davis instead. Once you have the CM17A plugged into your computer, visit his <a href="http://www.ubasics.com/adam/electronics/cm17.shtml" target="_blank">website </a>and download the CM17A.zip file. Create a c:\cm17a\ directory and unzip the files there. Then start up the &#8216;Command Prompt&#8217; under the accessories section of the start menu.</p>
<p>Type &#8216;CD C:\cm17a\&#8217; into the command prompt, as illustrated in the screen shot. The cm17a program is in this directory and is called with two or more parameters. The first is the COM port number of your actual cm17a device on your computer. The second parameter is the device you want to control. If you want to turn the lights plugged into the lamp module you set as house code A, unit 2, the parameter is &#8216;a2on,&#8217; and to turn it off, it is &#8216;a2off.&#8217; You can string multiple commands in a row, separated by spaces, so if your cm17a device was on COM port 2, and you want to turn lamp modules a2, a3 and a4 on, you would type &#8216;cm17a 2 a2on a3on a4on&#8217; into the command prompt and press enter. All three sets of lights should now turn on. By the way, if you don&#8217;t know the COM port of your device, it is likely 1,2,3 or 4, so you can type a few sample commands varying the code to see which one works.</p>
<div id="attachment_147" class="wp-caption alignright" style="width: 391px"><img class="size-full wp-image-147" title="X10 Batch Script" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/12/batch.GIF" alt="X10 Batch Script" width="381" height="141" /><p class="wp-caption-text">X10 Batch Script Example</p></div>
<p>Okay cool, so now we have a way to control the lights via our computer, now what? The next step is to load up notepad &#8211; we have to create a very simple batch script. This simply means we type the command that you&#8217;d use through the command prompt into a file that we can run automatically later. Follow the screen shots to see how to type the command and how to save the file &#8211; its important to select save as file type &#8216;any file&#8217; and save the file with .bat at the end. Otherwise it will append .txt to the end and this won&#8217;t work.</p>
<div id="attachment_151" class="wp-caption alignnone" style="width: 626px"><img class="size-full wp-image-151 " title="Save As Batch Script" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/12/saveas.GIF" alt="Save as a .bat file in Notepad" width="616" height="332" /><p class="wp-caption-text">Save as a .bat file in Notepad</p></div>
<p>After you created a lightson.bat, now do the same process again, changing the on&#8217;s in the file to off, and save it as lightsoff.bat.</p>
<p>The final step is to tell windows to run these batch scripts automatically. This is done using the windows &#8216;Task Scheduler, which is in Start -&gt; Accessories -&gt; System Tools. When the task scheduler is up and running, select Action -&gt; Create Basic Task. We&#8217;re going to create two of these, one to turn the lights on, and one to turn the lights off. Name and describe the task any way you&#8217;d like. Under Trigger, select daily, and then pick the time you want the lights to turn on. Under action, select Start a Program, and then browse to C:\cm17a\ and selected the lightson.bat script that you created. Also, under the &#8216;Start In&#8217; box, type in &#8216;c:\cm17a\.&#8217;  Once you&#8217;ve finished the lights on task, do the same thing to create a lights off task, which runs at a different time and calls the lightsoff.bat program instead. Optionally you can refine the tasks further by editing their properties, telling the computer to turn itself on if it&#8217;s in sleep mode to run the task, along with other options.</p>
<p><img class="size-full wp-image-157 alignnone" title="X10 Task Manager" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/12/task1.GIF" alt="X10 Task Manager Example" width="463" height="347" /></p>
<p><img class="alignnone size-full wp-image-146" title="X10 Task Action" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/12/actions.GIF" alt="X10 Task Action" width="709" height="278" /></p>
<p>This was the last step! Now your Holiday lights will turn themselves on and off each day without you having to lift another finger. Happy holidays from <a href="http://www.unitz.com">Unitz</a>!</p>
<hr />
<h2>Additional Notes and Tips:</h2>
<p>The bigger your house or your lighting needs, the more complex this setup can become. The following are a few additional tips that might help.</p>
<ul>
<li>Your whole house isn&#8217;t necessarily on the same wiring circuit. This means that some light modules might not respond to transceiver signals. There are a few solutions here. X10 offers hardware to bridge your circuits, but this requires opened up your power panel. A simpler solution is to just buy an additional transceiver and set it to another house code &#8211; then set the light modules on this circuit to the new house code.</li>
<li>To avoid buying lots of lamp modules, you can use extension cords and power strips to turn on multiple lights with one receiver &#8211; make you&#8217;re only using low wattage lights though.</li>
<li>Newer computers don&#8217;t always have serial ports. Fortunately for just a few dollars on eBay you can buy Serial to USB converters, which solve this problem.</li>
<li>The wireless range of CM17A might not be wide enough to reach your transceiver(s). You can purchase serial extension cables (or in a USBextension if using a USB to serial adapter.)</li>
<li>Obviously this solution can be used for many more uses aside from Christmas lights.</li>
<li>If you want to do more complex actions, or involve other <a title="x10 christmas light automation" href="http://www.x10.com/friends/refer.cgi?pmreil@yahoo.com" target="_blank">X10 products</a> like video cameras, they do offer software that has more control.</li>
<li>X10 lamp modules do not currently work well with compact fluorescent bulbs.</li>
<li>This same approach can be used with other operating systems. In Linux it can be done with bash scripts and cron jobs &#8211; the following explains how to control the <a href="http://pr0gr4mm3r.com/linux/getting-your-x10-cm17a-firecracker-module-working-in-linux/" target="_blank">CM17a in Linux</a>.</li>
<li>If you only want to control some devices automatically, you can still use the remote control to power other devices.</li>
<li><a href="http://www.iopus.com/guides/winscheduler.htm" target="_blank">http://www.iopus.com/guides/winscheduler.htm</a> has additional examples of how to schedule tasks in windows.</li>
</ul>
<iframe class="me-likey" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.unitz.com%2Fu-notez%2F2009%2F12%2Fautomate-your-holiday-lights%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;height=80&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.unitz.com/u-notez/2009/12/automate-your-holiday-lights/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Location, Location, Location Aware Websites</title>
		<link>http://www.unitz.com/u-notez/2009/11/location-location-location-aware-websites/</link>
		<comments>http://www.unitz.com/u-notez/2009/11/location-location-location-aware-websites/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 05:07:23 +0000</pubDate>
		<dc:creator>Paul Reilly</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.unitz.com/u-notez/?p=126</guid>
		<description><![CDATA[According to reports from Gartner, Juniper Research and others, smartphone sales are growing at a fantastic rate. Sales of smartphones have increased 47% over the previous year, and some estimates suggest that smartphones will make up 80% of the  mobile phone market in 5 years. Smartphones are defined as mobile phones with advanced capabilities &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>According to reports from <a href="http://www.gartner.com/it/page.jsp?id=1126812" target="_blank">Gartner</a>, <a href="http://juniperresearch.com/shop/viewpressrelease.php?pr=131" target="_blank">Juniper Research</a> and <a href="http://www.crunchgear.com/2009/08/13/mobile-phone-sales-down-smartphone-sales-up/" target="_blank">others</a>, smartphone sales are growing at a fantastic rate. Sales of smartphones have increased 47% over the previous year, and some estimates suggest that smartphones will make up 80% of the  mobile phone market in 5 years. <a href="http://en.wikipedia.org/wiki/Smartphone" target="_blank">Smartphones </a>are defined as mobile phones with advanced capabilities &#8211; this sales trend has clearly been led by the iPhone and its internet connectivity.</p>
<p>If these analysts are correct, in a few years, 4 out of 5 people will be using the internet on their phones. What does this mean for you? Well, there will be a significant change in users&#8217; internet usage behavior.<br />
<span id="more-126"></span><br />
<div id="attachment_137" class="wp-caption alignleft" style="width: 460px"><a href="http://www.opera.com/smw/2009/09/#chart_pages"><img class="size-full wp-image-137 " title="Mobile Web Data Usage Trends" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/11/mobile-data.jpg" alt="Mobile Web Data Usage Trends" width="450" height="286" /></a><p class="wp-caption-text">Source: Opera</p></div></p>
<p>Currently, your existing and potential customers use the internet when they are stationary &#8211; at home or at the office. They surf haphazardly, often finding your website through links or basic searches.   Only when they use a <a href="http://maps.google.com" target="_blank">mapping</a> service and search around a central point does the location of your business really come into play.</p>
<p>In this web enabled, mobile future, users&#8217; behavior will be different. With a web browser constantly at their fingertips, the information they look for will be different. They will have new ideas and questions:</p>
<ul>
<li>What is the closest type of place I am looking for, based on where I am right now?</li>
<li>What are the details and reviews of this product I am looking at right now?</li>
<li>What is the reputation of  the business I am standing by?</li>
<li>Should I go in or is there a similar establishment nearby that is better?</li>
<li>Are the prices I am looking at right now competitive?</li>
<li>What does your company offer based on where I am now?</li>
<li>.. And countless others&#8230;</li>
</ul>
<p>Smartphones are being built now with <a href="http://www.apple.com/iphone/iphone-3gs/maps-compass.html" target="_blank">GPS functionality</a>, meaning the phones can know where the user is.  Many phone applications can already use this information when returning data to you &#8211; giving results based on the city you&#8217;re in.  The practice of <a href="http://en.wikipedia.org/wiki/Geotagging" target="_blank">geotagging</a>, or defining data with an associated location is increasingly popular, gaining prevalence with photo services like <a href="http://blog.flickr.net/en/2008/08/08/introducing-a-new-way-to-geotag/" target="_blank">Flickr</a>, and now shifting into micro-blogging services like <a href="http://www.fastcompany.com/blog/kit-eaton/technomix/geotagging-twitters-killer-feature" target="_blank">Twitter</a>.  Soon many more services will be targeting the data they return based on your location.</p>
<p><a title="PRTMobile.com: The Mobile Web comes to the folks next door" rel="bookmark" href="http://www.prtmobile.com/" target="_blank">PRTMobile.com</a>, as written up in <a href="http://www.crunchgear.com/2009/06/24/the-mobile-web-is-getting-closer/" target="_blank">CrunchGear.com</a> is a perfect example. They offer mobile-web friendly property listings, that customers easily access from their phones through simple URLs.  The chances of passerbys looking up property listings later from home is minuscule, but through PRTMobile&#8217;s service, these listings get immediate, interested customer response.</p>
<p>There are three aspects of this mobile future that are important to consider for your own site.</p>
<ol>
<li>Make sure your websites can handle mobile visitors. Visit your website from an iPhone and BlackBerry and make sure that users can find what they need &#8211; make changes if they can&#8217;t.  To take it a step further, consider a separate mobile based website entirely like eBay and Facebook currently offer, that streamlines the UI to be mobile friendly.</li>
<li>The good strategy is to prepare your content for this mobile future. The right steps for your company depend on your industry.  Start your analysis by considering how your customers might interact with your firm or products while away from their desks.If you are a location based business, search for your products and services through mapping websites and query search engines for them with your city included. If you don&#8217;t show up where you want to be, work on associating your location with your web presence. Ideas here include geocoding photos, updating your content to be more location specific and utilizing review services like <a href="http://www.yelp.com" target="_blank">Yelp</a>. If you have a budget for advertising, consider location based online ads, that will pop up when users are searching in your area.</li>
<li>Finally, again depending on your product and services, consider creating a web portal that returns data based on the user&#8217;s location.  Users will know they can visit your website from their phone anywhere and get just what they need, right away. If your site focuses instead on a global product or service, instead analyze how accessible your key information is from mobile devices &#8211; make sure the requests your customers have can be easily met using their phones.</li>
</ol>
<p>The changes and advances you make today will help your business grow along with the smartphone market.</p>
<iframe class="me-likey" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.unitz.com%2Fu-notez%2F2009%2F11%2Flocation-location-location-aware-websites%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;height=80&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.unitz.com/u-notez/2009/11/location-location-location-aware-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Your Company Indispensable Online</title>
		<link>http://www.unitz.com/u-notez/2009/10/make-your-company-indispensable-online/</link>
		<comments>http://www.unitz.com/u-notez/2009/10/make-your-company-indispensable-online/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 14:57:49 +0000</pubDate>
		<dc:creator>Paul Reilly</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Marketing]]></category>

		<guid isPermaLink="false">http://www.unitz.com/u-notez/?p=89</guid>
		<description><![CDATA[Most website owners now realize that, in order for their site to remain popular and successful, it needs to evolve. Exactly how it should evolve, however, isn&#8217;t always easy to determine. Should you blog or tweet or implement some other buzzword you&#8217;ve heard lately?  Should you do what your competitors have already done?  Although these [...]]]></description>
			<content:encoded><![CDATA[<p>Most website owners now realize that, in order for their site to remain popular and successful, it needs to evolve. Exactly how it should evolve, however, isn&#8217;t always easy to determine. Should you blog or tweet or implement some other buzzword you&#8217;ve heard lately?  Should you do what your competitors have already done?  Although these changes and ideas certainly have merit, by focusing just on these approaches you will  constantly be playing catchup.</p>
<p>Instead, I suggest thinking about your customers first and how you can use the internet and technology to make their lives easier.  Sure, a blog or twitter stream lets your customers hear from you more readily, and this communication has tremendous value.  However, this added communication doesn&#8217;t necessarily make you any less dispensable to the customer. Rather, to become truly indispensable, you need to offer them new services and features that they come to depend on.</p>
<p><span id="more-89"></span><strong>Examples of companies creating new value for their customers:</strong><a href="http://www.usaa.com" target="_blank"><img class="size-full wp-image-98 alignright" style="border: 1px solid black; margin: 8px;" title="images" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/10/images.jpg" alt="USAA" width="79" height="79" /></a></p>
<p>I use <a href="http://www.usaa.com" target="_blank">USAA </a>for my personal checking account. They now allow me to deposit checks online using my scanner for free, with their <a href="https://www.usaa.com/inet/ent_utils/McStaticPages?key=bank_deposit" target="_blank">Deposit@Home</a> service. This technology saves a trip to the bank and is incredibly valuable to me.  Meanwhile, <a href="http://www.wachovia.com" target="_blank">Wachovia</a>, my prior bank, does not offer a comparable service. I value USAA much more than Wachovia now, and have no desire to find a different bank.  Additionally, I now believe that USAA will continue to add functionality to make my life even easier, as they&#8217;ve set the precedent. Trusting their dedication to their customers makes me value them and want to stick with them as well.</p>
<p>As mobile computing becomes more widespread, new opportunities to help your customers abound. Companies that have created successful iPhone applications and mobile<a href="http://www.espn.com" target="_blank"><img class="alignright size-full wp-image-100" style="margin: 5px;" title="ESPN_logo" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/10/ESPN_logo.jpg" alt="ESPN_logo" width="150" height="56" /></a> sites for their customers have received great publicity through word of mouth and commentary, <a href="http://www.fedex.com" target="_blank"><img class="alignleft size-full wp-image-101" style="margin: 5px;" title="FedEx-Logo" src="http://www.unitz.com/u-notez/wp-content/uploads/2009/10/FedEx-Logo.jpg" alt="FedEx-Logo" width="150" height="54" /></a>often lowered administrative costs and certainly better established their brand.  <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=304462049&amp;mt=8" target="_blank">FedEx </a>has made it simple to track packages away from your computer. <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=317469184&amp;mt=8" target="_blank">ESPN </a>makes checking scores easier than ever before. In turn, their customers now use these companies&#8217; total basket of services more and are more likely to ship FedEx and go to ESPN.com at home because of these applications.  <a href="http://www.ismashphone.com/2009/07/corporate-branding-races-to-iphone-apps-winners-and-losers.html" target="_blank">Read overviews</a> of several other company&#8217;s mobile application ideas.  Although a full fledged iPhone application may be overkill for your business, definitely consider how accessible and useful your website is to your customers when they&#8217;re away from their desktops.</p>
<p><strong>How to create customer value yourself:</strong></p>
<p>These two examples are just a sliver of the possibilities &#8211; there are so many ways to add value for your customers online. Step back and consider all the various interactions your customers have with you. Are you in a business that is appointment driven? Provide updates and reminders about appointments through the internet. Are you constantly mailing invoices and requiring mailed checks?  Consider online billing or automated payments.  Do you provide information that your customers call to inquire about? Push this content to them in more accessible ways.  Any way your customers contact you is an area to explore.</p>
<p>Online possibilities and prospects  are constantly evolving. As you consider all the customer interactions you have, there are inevitably services you can create that will save time and effort. When you give your customers these abilities, they will come to rely on it, and become even more devoted to you. If you do not, your competitor will first, and you will lose your customers. Take time now to talk to online strategists about your firm&#8217;s operations and logistics, brainstorm great new ideas, and make your firm truly indispensable.</p>
<p><em>Paul Reilly is a partner and co-founder of <a href="http://www.unitz.com/" target="_blank">Unitz LLC</a>, a web development and internet strategy firm based in Arlington, VA and Trumbull, CT.</em></p>
<iframe class="me-likey" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.unitz.com%2Fu-notez%2F2009%2F10%2Fmake-your-company-indispensable-online%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;height=80&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.unitz.com/u-notez/2009/10/make-your-company-indispensable-online/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Welcome to U-notez</title>
		<link>http://www.unitz.com/u-notez/2008/07/welcome-to-u-notez/</link>
		<comments>http://www.unitz.com/u-notez/2008/07/welcome-to-u-notez/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 13:39:48 +0000</pubDate>
		<dc:creator>Paul Reilly</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.unitz.com/u-notez/?p=1</guid>
		<description><![CDATA[Welcome!  As Chris and I have developed web sites and web applications over the years, we have stumbled across a different issue or problem that we had to figure out nearly every day.  As we&#8217;ve found the solutions to the problems &#8211; be it a way to fix a browser quirk or a way to [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome!  As Chris and I have developed web sites and web applications over the years, we have stumbled across a different issue or problem that we had to figure out nearly every day.  As we&#8217;ve found the solutions to the problems &#8211; be it a way to fix a browser quirk or a way to to write a more efficient line of code, we always thought it would be nice to pass the solution along so that others would be able to benefit and not have to spend the time solving similar problems themselves.</p>
<p>So we&#8217;ve created this blog for that purpose &#8211; it&#8217;s our arena to post our solutions, thoughts and musings on anything and everything related to web development.  We hope one of our posts can help you!</p>
<iframe class="me-likey" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.unitz.com%2Fu-notez%2F2008%2F07%2Fwelcome-to-u-notez%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;height=80&amp;action=like&amp;font=arial&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:80px"></iframe>]]></content:encoded>
			<wfw:commentRss>http://www.unitz.com/u-notez/2008/07/welcome-to-u-notez/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
