<?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>Just a Guy Design</title>
	<atom:link href="http://www.justaguydesign.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justaguydesign.com</link>
	<description>Web Design + Development by ElShaddai Edwards</description>
	<lastBuildDate>Wed, 18 Jan 2012 20:50:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Visual form validation techniques</title>
		<link>http://www.justaguydesign.com/2011/visual-form-validation-techniques/</link>
		<comments>http://www.justaguydesign.com/2011/visual-form-validation-techniques/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 19:47:04 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[User Experience]]></category>
		<category><![CDATA[forms]]></category>

		<guid isPermaLink="false">http://elshaddaie.com/?p=3470</guid>
		<description><![CDATA[I recently had the opportunity to prepare some thoughts on how form field validation is visually communicated to users. Our client&#8217;s site had accumulated several layers of updates and content additions without the benefit of any significant UX review in this area. As part of a functional migration of the member dashboards, we were asked [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had the opportunity to prepare some thoughts on how form field validation is visually communicated to users. Our client&#8217;s site had accumulated several layers of updates and content additions without the benefit of any significant UX review in this area. As part of a functional migration of the member dashboards, we were asked to provide a &#8220;best practice&#8221; recommendation for a consistent implementation. This article is an adaptation of those conclusions.</p>
<p>In considering our recommendation, we want to consider three aspects of visual form validation:</p>
<ul>
<li>Location of error messages – where are current “best practice” sites presenting validation messages and what was the right approach for our client?</li>
<li>Form field highlighting – should the visual appearance of form fields be changed during validation and, if so, what techniques are best suited for our client&#8217;s users?</li>
<li>Other indicators – are there other techniques that should be considered as part of form validation messaging? Do these enhance or detract from the overall user experience?</li>
</ul>
<p>In addition to our own experience, we looked at a variety of third-party websites that rely on form data as part of their essential design and fucntion. After sorting through the variety of approaches, we made a recommendation that creates a clean and clear user experience and can be implemented across any of our client&#8217;s web properties.</p>
<h2>Location of Error Message</h2>
<p>Messaging at the <strong>top of a form</strong>/page is effective for getting the user’s attention, but creates a visual gap between the error message and the actual problem field, forcing the user to visually bridge the gap by scanning up and down between content elements.</p>
<p><strong>Hover messages</strong> mitigate the scanning issue, but are only visible for a default or selected field, forcing the user to manually select another field to see the error. In addition, the hover element can create visual clutter on the page, depending on the layout and complexity of the form.</p>
<p><strong>Inline error messages</strong> communicate the problem(s) for all fields without requiring the user to move their attention around the page or click on different elements. Ideally inline error messages should be used with some form of field highlighting (see next page).</p>
<h2>Form Field Highlighting</h2>
<p>Changing the <strong>field label color</strong> is a simple change, but may not always be the best choice depending on the overall visual design. Care must be taken to ensure that the highlighted label stands out to the user and does not blend into existing brand elements on the page. More importantly, the user is being asked to take action on the field content, not the label, and they must shift their focus from the highlighted label to the field to determine what to change.</p>
<p>Highlighting the <strong>field background color</strong> can be an effective visual cue that does not require any layout adjustments to the existing form. However, as with field lables, care must be taken ensure that the highlighted field stands out to the user and does not blend into existing brand elements on the page. Moreover, there are readability concerns with background shading, especially if too dark a color is chosen.</p>
<p><strong>Outlining the field border</strong> is a more subtle adjustment that can be used in combination with another visual cue, e.g. inline error messages or changing the field label color.</p>
<h2>Other Indicators</h2>
<p>Adding an <strong>icon marker</strong> to the field label or next to the form field can be a nice visual cue, especially if field highlighting is not used. However, care must be taken to not cause the form layout to “break” if labels are physically moved to add a marker. One solution to this is to place the icon within the form field itself.</p>
<p>An effective technique on longer (taller) form pages is to include an <strong>alert message at the top of the form</strong> that indicates there is a problem, but does not contain the error message details. The general message may or may not indicate which fields have an error.</p>
<p>Using a <strong>pop-up</strong> message window as the sole method of communicating error messaging is not recommended since the user loses visual reference when the pop-up is closed. If this style of alert is used, the form field must also be updated to include error messaging using one of the above mentioned techniques.</p>
<h2>Recommendation</h2>
<p>Our final recommendation includes the following techniques:</p>
<ul>
<li>Inline error message below form field</li>
<li>Top-of-form alert message</li>
<li>Form field border highlighting</li>
</ul>
<p><strong>Location of Error Messages</strong></p>
<p>Our preference is for inline error messages that fall below the form field. We believe that inline messaging is the cleanest and clearest way to communicate error messages in the closest proximity to the invalid form field.</p>
<p><strong>Form Field Highlighting</strong></p>
<p>Our preference is for field border outlining, used in combination with inline error messaging. Border highlighting is a clear visual cue, while remaining readable and keeping the user’s attention on the invalid form field.</p>
<p><strong>Other Indicators</strong></p>
<p>Our preference is to use a top-of-form alert message that clearly indicates a problem and points the user to specific fields for more information. Placing a general message at the top of the page provides context for the user and allows for a top-down presentation of the error messaging.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2011/visual-form-validation-techniques/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mega Menus redux: Integrating with WordPress navigation</title>
		<link>http://www.justaguydesign.com/2010/megamenus-redux/</link>
		<comments>http://www.justaguydesign.com/2010/megamenus-redux/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 19:53:18 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[Development Notes]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mega menu]]></category>
		<category><![CDATA[thematic]]></category>

		<guid isPermaLink="false">http://www.elshaddai-edwards.com/?p=1327</guid>
		<description><![CDATA[In a previous post, I explored a method whereby &#8220;mega menus&#8221; could be added to a Thematic-based WordPress site, replacing that framework&#8217;s standard jQuery dropdown menus. Mega menus are essentially a dropdown content panel that can have multiple columns of navigation link lists, styled headers/category groupings, etc. &#8212; essentially anything you can define as web [...]]]></description>
			<content:encoded><![CDATA[<p><a  href="http://www.justaguydesign.com/wp-content/uploads/2010/04/megamenu.gif" class="thickbox no_icon" rel="gallery-1327" title="megamenu"><img class="alignright size-medium wp-image-3207" title="megamenu" src="http://www.justaguydesign.com/wp-content/uploads/2010/04/megamenu-300x169.gif" alt="" width="300" height="169" /></a>In <a  href="http://www.elshaddai-edwards.com/2009/11/adding-mega-menus-to-wordpress/" target="_self">a previous post</a>, I explored a method whereby &#8220;mega menus&#8221; could be added to a Thematic-based WordPress site, replacing that framework&#8217;s standard jQuery dropdown menus. Mega menus are essentially a dropdown content panel that can have multiple columns of navigation link lists, styled headers/category groupings, etc. &#8212; essentially <em>anything </em>you can define as web content!</p>
<p>As such, mega menus provide an intriguing alternative of presenting secondary, tertiary or even deeper content to a user without forcing them to negotiate your site hierarchy through standard navigation design techniques.</p>
<p>Based on the code and script file found at <a  href="http://www.javascriptkit.com/script/script2/jkmegamenu.shtml" target="_blank">javascriptkit.com</a>, my initial look at this functionality was a sledgehammer &#8220;cut-and-replace&#8221; approach that required manually rebuilding a site&#8217;s navigation menu. The approach worked, but lost the ability to use WordPress&#8217; built-in navigation features for page titling, ordering, etc., as well as Thematic&#8217;s jQuery styling. I&#8217;ve since had a chance to dig into this topic again and believe I&#8217;ve found a way to mitigate most of these limitations and make this technique a very useful addition to a WordPress toolkit.</p>
<p><strong>Important:</strong><em> I use the Thematic framework and child themes as the base for most all of my WordPress development. The code examples below may need to be modified to work with other themes and/or frameworks.</em></p>
<p><strong>Step 1:</strong> Save the referenced CSS and Javascript files from <a  href="http://www.javascriptkit.com/script/script2/jkmegamenu.shtml" target="_blank">javascriptkit.com</a> into your child theme folder.</p>
<p><strong>Step 2: </strong>For the actual content of the mega menu panel, create a new PHP file in your child theme folder (I called it <code>megamenus.php</code>) and enter just the code related to the actual menu panels. (Unlike the original code instructions on javascriptkit.com, we are <strong><em>not </em></strong>including the primary nav links in this file.) Make sure that the CSS selectors used below match those found in the default CSS file you saved in Step 1.</p>
<pre>&lt;div id="megamenu1" class="megamenu"&gt;
  &lt;div class="column"&gt;
    Your content goes here...
  &lt;/div&gt;
  &lt;div class="column"&gt;
    Your content goes here...
  &lt;/div&gt;
&lt;/div&gt;&lt;!-- megamenu1 --&gt;</pre>
<p><strong>Step 3:</strong> Instead of manually assembling the site&#8217;s primary menu links as outlined in the original tutorials (and my previous post), we&#8217;re going to use a jQuery snippet to assign unique ID selectors to WordPress&#8217; existing page links. The following code needs to be added to the <code>&lt;head&gt;</code> section of your page. I prefer to add it via my child theme&#8217;s functions file:</p>
<pre>// Add megamenu scripts to head
function megamenu_scripts() {?&gt;

&lt;link rel="stylesheet" type="text/css" href="jkmegamenu.css" /&gt;

&lt;script type="text/javascript"&gt;
 jQuery(document).ready(function() {
 jQuery('.page-item-123 a').attr("id","megaanchor");
 });
&lt;/script&gt;

&lt;script type="text/javascript" src="jkmegamenu.js"&gt;
/***********************************************
* jQuery Mega Menu- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for full source code
***********************************************/
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
//jkmegamenu.definemenu("anchorid", "menuid", "mouseover|click")
jkmegamenu.definemenu("megaanchor", "megamenu1", "mouseover")
&lt;/script&gt;

&lt;?php }
add_action('wp_head','megamenu_scripts');</pre>
<p>It is <strong>critical </strong>that the code snippet assigning the <code>"megaanchor"</code> ID attribute to the default anchor tag for the target page (&#8217;123&#8242;) comes before the <code>"jkmegamenu.js"</code> file is loaded. The .js file reads these IDs, so they have to be added to the anchor tags before the .js file is loaded. Replace &#8220;123&#8243; with the actual page ID of the menu item that you want to attach the megamenu panel to. And of course, make sure that the links to the CSS and JS file are correct for your theme. Note that because WordPress is already loading a jQuery library, I&#8217;ve deleted that script declaration from the original code sample to avoid duplication.</p>
<p><strong>Step 4: </strong>We also have to load the separate PHP file that we created in Step 2. Add the following action to your functions file to load the content panel code into the header area:</p>
<pre>function load_megamenus() {
include 'megamenus.php';
}
add_action('thematic_header', 'load_megamenus');</pre>
<p><strong>Step 5:</strong> Finally, edit the default CSS file to suit your tastes.</p>
<p><strong>Step 6:</strong> To use more than one mega menu on a navigation bar, you&#8217;ll need to define the different content sections in your separate PHP file with unique IDs, e.g. <code>megamenu1</code>, <code>megamenu2</code>, etc., then make additional declarations in the wp_head section:</p>
<pre>// Add megamenu scripts to head
function megamenu_scripts() {?&gt;

&lt;link rel="stylesheet" type="text/css" href="jkmegamenu.css" /&gt;

&lt;script type="text/javascript"&gt;
 jQuery(document).ready(function() {
 jQuery('.page-item-123 a').attr("id","megaanchor1");
 jQuery('.page-item-456 a').attr("id","megaanchor2");
 });
&lt;/script&gt;

&lt;script type="text/javascript" src="jkmegamenu.js"&gt;
/***********************************************
* jQuery Mega Menu- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for full source code
***********************************************/
&lt;/script&gt;

&lt;script type="text/javascript"&gt;
//jkmegamenu.definemenu("anchorid", "menuid", "mouseover|click")
jkmegamenu.definemenu("megaanchor1", "megamenu1", "mouseover")
jkmegamenu.definemenu("megaanchor2", "megamenu2", "click")
&lt;/script&gt;

&lt;?php }
add_action('wp_head','megamenu_scripts');</pre>
<p style="text-align: left;">Note that you&#8217;ll probably want to create some content on the pages you&#8217;ve attached mega menus to for users who have JavaScript turned off or otherwise disabled since the page&#8217;s anchor link will still be active.</p>
<p style="text-align: center;">* * * * *</p>
<p>HT: The jQuery method of adding the ID selector to an anchor tag was modified from a technique outlined in <a  href="http://wpcandy.com/articles/tutorials/assign-attributes-to-the-wp-list-pages-tag.html" target="_blank">this post</a> on wpcandy.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2010/megamenus-redux/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Creating a thumbnail index page from child pages</title>
		<link>http://www.justaguydesign.com/2010/thumbnail-index-page/</link>
		<comments>http://www.justaguydesign.com/2010/thumbnail-index-page/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 03:47:17 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[Development Notes]]></category>
		<category><![CDATA[contempora corner]]></category>
		<category><![CDATA[thematic]]></category>
		<category><![CDATA[thumbnails]]></category>

		<guid isPermaLink="false">http://www.elshaddai-edwards.com/?p=1244</guid>
		<description><![CDATA[One of the features of my latest project, Contempora Corner, was the creation of a custom page template that is used as an visual index page for a specific category of content. These are essentially landing pages with links to all of the respective child pages. I try to organize sites to not use these [...]]]></description>
			<content:encoded><![CDATA[<p><a  href="http://www.justaguydesign.com/wp-content/uploads/2010/03/thumbnail-index-page.jpg" class="thickbox no_icon" rel="gallery-1244" title="thumbnail-index-page"><img class="alignright size-medium wp-image-3212" title="thumbnail-index-page" src="http://www.justaguydesign.com/wp-content/uploads/2010/03/thumbnail-index-page-300x257.jpg" alt="" width="300" height="257" /></a>One of the features of my latest project, <a  href="http://www.elshaddai-edwards.com/portfolio/contempora-corner/" target="_self">Contempora Corner</a>, was the creation of a custom page template that is used as an visual index page for a specific category of content. These are essentially landing pages with links to all of the respective child pages. I try to organize sites to not use these as much as possible, but sometimes they&#8217;re just unavoidable.</p>
<p>I wanted to automate this template as much as possible, avoiding the need to manage even more content than what already existed on the child pages. Because much of this particular project is a visual showcase, associating images with the links was a requirement. In the past, this would have meant defining an image URL in a custom field and then displaying it. Fortunately WP 2.9&#8242;s new thumbnail feature provides a very accessible alternative.</p>
<p><strong>Important:</strong><em> I use the Thematic framework as the base for most all of my WordPress development. The code examples below may need to be modified to work with WP&#8217;s default themes or other frameworks.</em></p>
<p>First, enable post/page thumbnails in your functions file:</p>
<pre>// Add WP2.9 thumbnail support
if ( function_exists( 'add_theme_support' ) )
add_theme_support( 'post-thumbnails' );</pre>
<p>Then, define a thumbnail image for each child page.</p>
<p>Using page.php as a starting point, create a new PHP page template file in your theme&#8217;s directory. The heart of the new template is the following code, which comes after the main loop:</p>
<pre>&lt;div id="section-container"&gt;
&lt;?php
$pages = get_pages('child_of='.$post-&gt;ID.'&amp;parent='.$post-&gt;ID.'&amp;sort_column
=menu_order&amp;sort_order=asc');
foreach($pages as $page)
{ ?&gt;
&lt;div class="section-page"&gt;
  &lt;div class="section-thumb"&gt;&lt;a href="&lt;?php echo get_page_link($page-&gt;ID) ?&gt;"&gt;
    &lt;?php echo get_the_post_thumbnail($page-&gt;ID, array(150,100)); ?&gt;&lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="section-text"&gt;
    &lt;div class="section-title"&gt;&lt;?php echo $page-&gt;post_title ?&gt;&lt;/div&gt;
    &lt;div class="section-desc"&gt;&lt;?php echo get_post_meta($page-&gt;ID,
      'section-desc', true); ?&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;!--section-text--&gt;
&lt;/div&gt;&lt;!--section-page--&gt;
&lt;?php }
?&gt;
&lt;/div&gt;&lt;!--section-container--&gt;</pre>
<p>You could of course replace the main loop with something like this, but keeping it allows you to use the page title and content for introductory material or anything else you want above the thumbnails.</p>
<p>The get_pages query identifies the first-level child pages of the current page and sorts them by menu order, then starts looping through each identified page.</p>
<p>I&#8217;ve wrapped each of the actual content pieces in individual div&#8217;s to help control the layout. I know that some don&#8217;t like this practice, but I find it helpful to start verbose and strip out what I don&#8217;t need later.</p>
<p>Within &#8220;section-thumb&#8221;, I define my link to the child page as well as show the post thumbnail. I had been playing with different image sizes on the index page, so including the array statement is useful, even though I ended up using my default thumbnail size. If you wanted, the permalink could be placed almost anywhere in this template, including as a block element around the entire thumbnail and text.</p>
<p>Within &#8220;section-title&#8221;, I&#8217;m simply calling the page title. I actually want to fuss with this a little bit because I often use verbose page titles that aren&#8217;t useful navigation labels. I use the Page Lists Plus plugin to set different nav labels, but those aren&#8217;t getting called here.</p>
<p>The &#8220;section-desc&#8221; is calling a custom field set on the child pages. I really wanted to avoid using custom fields, but I haven&#8217;t been able to get my page excerpts to display. I&#8217;m using a function that adds the excerpt entry box to the Edit Page screen:</p>
<pre>// add excerpts to pages (not just posts)
function add_page_excerpt_meta_box() {
add_meta_box( 'postexcerpt', __('Excerpt'), 'post_excerpt_meta_box', 'page',
'normal', 'core' );
}
add_action( 'admin_menu', 'add_page_excerpt_meta_box' );</pre>
<p>But it doesn&#8217;t work when trying to display the defined text when using get_the_excerpt. So I&#8217;ve put my &#8220;excerpt&#8221; text in a custom field and set the section page template to read and display it. It may be that using a legitimate plugin to add excerpt functionality to pages may give me an actual function to use and display the text automatically.</p>
<p>So that&#8217;s it in a nutshell. You can see examples of this implementation by clicking the URL link above and selecting one of the main content areas from the primary nav, or simply go to the portfolio section of <em>this </em>website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2010/thumbnail-index-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rebuilding Thematic Feature Site with the_post_thumbnail</title>
		<link>http://www.justaguydesign.com/2010/rebuilding-thematic-feature-site/</link>
		<comments>http://www.justaguydesign.com/2010/rebuilding-thematic-feature-site/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 18:37:50 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[Development Notes]]></category>
		<category><![CDATA[child themes]]></category>
		<category><![CDATA[thematic]]></category>

		<guid isPermaLink="false">http://www.elshaddai-edwards.com/?p=1148</guid>
		<description><![CDATA[Anyone who&#8217;s stopped by this site more than once in the past year knows that it&#8217;s been in a constant state of change as I try out new functions, plugins or other functionality. That said, I&#8217;m really hoping to stabilize things on the back end and move most of my scratchpad work to a test [...]]]></description>
			<content:encoded><![CDATA[<p><a  href="http://elshaddai-edwards.com/wp-content/uploads/2010/02/feature-site.jpg" class="thickbox no_icon" rel="gallery-1148" title=""><img class="alignright size-medium wp-image-1163" src="http://www.elshaddai-edwards.com/wordpress/wp-content/uploads/2010/02/feature-site-300x258.jpg" alt="" width="300" height="258" /></a>Anyone who&#8217;s stopped by this site more than once in the past year knows that it&#8217;s been in a constant state of change as I try out new functions, plugins or other functionality. That said, I&#8217;m really hoping to stabilize things on the back end and move most of my scratchpad work to a test blog environment. The current design, which I&#8217;m hoping to lock into, is built on the <a  href="http://themeshaper.com/thematic-feature-site/" target="_blank">Thematic Feature Site</a> child theme, which was released back in August, IIRC.</p>
<p>Feature Site includes a random content area on the home page, accomplished by defining a set of content files that are pulled into the feature area via a randomized PHP include statement. The relevant original code is found in Feature Site&#8217;s functions file, under the function <code>childtheme_pageleader()</code>:</p>
<pre>&lt;?php } elseif (is_page_template('front-page.php') ) {
/*
Highlight your most important projects with a series of files (2 to start with)
named feature-front-x.php. Where x is a number. Then, these files are randomly
included on the front page. It’s pretty simple stuff.

The important bit is the mt_rand(1,2). Right now it’s randomly including 1 of 2
files. If you had 15 files you’d need to have mt_rand(1,15) in there.
*/
$rand = mt_rand(1, 2);
include "includes/feature-front-$rand.php";
} elseif (is_home()) { ?&gt;</pre>
<p>The include files require manually editing both the content and an associated image. While that&#8217;s easy enough to do, I wanted to automate this part of the site to display some portfolio highlights of my recent work. Essentially I wanted to display a post excerpt from my &#8220;portfolio&#8221; category along with a large-size view of the defined post thumbnail (introduced in WP2.9) and links to the project notes, client URL and overall portfolio. As such, I replaced the code above with this:</p>
<pre>&lt;?php } elseif (is_page_template('front-page.php') ) { ?&gt;

&lt;div id="feature"&gt;

&lt;?php query_posts('showposts=1&amp;cat=3&amp;orderby=rand'); while(have_posts()) :
the_post(); ?&gt;

&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to
&lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php the_post_thumbnail(array(464,464)); ?&gt;&lt;/a&gt;

&lt;div id="feature-info"&gt;
&lt;h3&gt;&lt;?php the_title(); ?&gt;&lt;/h3&gt;
&lt;?php the_excerpt(); ?&gt;

&lt;div id="buttons"&gt;
&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to
&lt;?php the_title_attribute(); ?&gt;"&gt;View details »&lt;/a&gt;
&lt;a href="&lt;?php echo get_post_meta($post-&gt;ID, 'client-url', true);?&gt;" class="button"
target="_blank"&gt;View site »&lt;/a&gt;
&lt;a href="&lt;?php echo get_option('home') ?&gt;/portfolio" class="button"&gt;View portfolio »
&lt;/a&gt;
&lt;/div&gt;

&lt;/div&gt;&lt;!-- #feature-info --&gt;

&lt;?php endwhile; ?&gt;

&lt;div class="clear-block"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;!-- #feature --&gt;

&lt;?php } elseif (is_home()) { ?&gt;</pre>
<p>A few notes:</p>
<ul>
<li>I&#8217;ve reproduced the original CSS classes from the original <code>feature-front-$rand</code> files in order to streamline the testing. As I start the design process, I&#8217;ll probably tweak things here and there, including the defined &#8220;thumbnail&#8221; size, which I&#8217;ve left at the default <code>464px</code>.</li>
<li>Using <code>orderby=rand</code> in the post query randomizes the results, even though we&#8217;re just showing one post at a time (<code>showposts=1</code>) from the portfolio posts (<code>cat=3</code>). Remove this condition to only show the most recent post from the portfolio category.</li>
<li>Because the Feature Site child theme redefines the post headers for a customized display on the inner pages, we have to call <code>&lt;?php the_title(); ?&gt;</code> instead of <code>&lt;?php thematic_postheader(); ?&gt;</code>. I&#8217;ll need to revisit the CSS there to get a true headline.</li>
<li>I&#8217;m pulling in data from a custom field (<code>client-url</code>) defined on each portfolio post in order to provide the link out to the actual client site.</li>
</ul>
<p>Elsewhere on the site the functional pieces are pretty much  in place, including a custom portfolio page template that displays all of the post excerpts and smaller thumbnails in the portfolio category. Now on to the visual design&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2010/rebuilding-thematic-feature-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom functionality in tabbed widgets</title>
		<link>http://www.justaguydesign.com/2010/custom-functionality-in-tabbed-widgets/</link>
		<comments>http://www.justaguydesign.com/2010/custom-functionality-in-tabbed-widgets/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 14:51:21 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[Development Notes]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[shortcodes]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://www.elshaddai-edwards.com/?p=1113</guid>
		<description><![CDATA[I recently made a number of updates to a client site that I&#8217;d done last year. Part of the initial design of this particular site called for a number of tabbed &#8220;widgets&#8221;. However, when the site was originally implemented, I was not able to find a suitable tabbed interface option within the library of WP [...]]]></description>
			<content:encoded><![CDATA[<p>I recently made a number of updates to a client site that I&#8217;d done last year. Part of the initial design of this particular site called for a number of tabbed &#8220;widgets&#8221;. However, when the site was originally implemented, I was not able to find a suitable tabbed interface option within the library of WP plugins, so I ended up handcoding an implementation using <a  href="http://www.barelyfitz.com/projects/tabber/" target="_blank"><code>tabber.js</code></a> using the directions <a  href="http://www.maverickwebcreations.com/2008/10/31/how-to-add-tabber-to-your-wordpress-theme.html" target="_blank">found here</a>. Functionally, it worked quite well and I was able to get the CSS to match my theme without significant fuss. However, there was always a load lag in the content that was quite noticeable and distracting since the content was inserted in the middle of the client sidebar using Thematic&#8217;s <code>betweenmainasides</code> hook.</p>
<p>Shortly after my client&#8217;s site had launched, the <em>Section Widget</em> plugin was released and shortly thereafter won the WP plugin competition. I&#8217;ve been using it on a number of projects since, but never got around to exploring the <em>Section (Tabbed)</em> version. As part of the recent updates to my client site, I began poking around to see if it would work as a replacement for Tabber.</p>
<p><a  href="http://elshaddai-edwards.com/wp-content/uploads/2010/01/tabbed.jpg" class="thickbox no_icon" rel="gallery-1113" title=""><img class="alignright size-medium wp-image-1126" src="http://www.elshaddai-edwards.com/wordpress/wp-content/uploads/2010/01/tabbed-300x300.jpg" alt="" width="300" height="300" /></a>My initial results were disappointing &#8212; using shortcodes defined in my functions file to call various bits of plugin functionality resulted in the correct content being shown, but it was floating above the tabbed area rather than in the tab box. Not usable at all. After a little more digging in the WordPress support forums, I installed the <em>PHP Shortcode</em> plugin and entered the needed PHP functions directly into the tabbed widget interface. Success!</p>
<pre>&lt;ul id="show-recent-comments"&gt;
[php]get_recent_comments();[/php]
&lt;/ul&gt;</pre>
<p>All that remained was to copy the CSS styling that I&#8217;d created for the Tabber implementation to the classes used by Section Widget. Fortunately the tabbed code is very well annotated with style classes and the conversion was done very quickly.</p>
<p>Ideally, I&#8217;d love to be able to drag any widget onto the Section Tabbed Widget panel and have that functionality appear in a tabbed interface. Until then, I have to make sure that a PHP function is callable &#8212; something that is not immediately obvious for plugins designed to only be used as WYSIWYG widgets.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2010/custom-functionality-in-tabbed-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add the_post_thumbnail to post excerpts</title>
		<link>http://www.justaguydesign.com/2010/add-the_post_thumbnail-to-post-excerpts/</link>
		<comments>http://www.justaguydesign.com/2010/add-the_post_thumbnail-to-post-excerpts/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 08:36:23 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[Development Notes]]></category>
		<category><![CDATA[thematic]]></category>
		<category><![CDATA[thumbnails]]></category>

		<guid isPermaLink="false">http://www.elshaddai-edwards.com/?p=1121</guid>
		<description><![CDATA[WordPress 2.9 has a new post thumbnail feature that I&#8217;ve been exploring as part of this site&#8217;s layout in preparation for updates to some client sites. Adding the code below to your child theme&#8217;s functions.php file will activate the post thumbnail feature in WP2.9, then change the default content display on the home page or [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 2.9 has a new post thumbnail feature that I&#8217;ve been exploring as part of this site&#8217;s layout in preparation for updates to some client sites. Adding the code below to your child theme&#8217;s <code>functions.php</code> file will activate the post thumbnail feature in WP2.9, then change the default content display on the home page or front page to post excerpts (rather than full post content) and finally add the thumbnail itself to the excerpt text.</p>
<pre>// Add post thumbnail support in WP2.9
if ( function_exists( 'add_theme_support' ) )
add_theme_support( 'post-thumbnails' );

// Change default content display on home page to excerpt
function childtheme_content($content) {
if (is_home() || is_front_page()) {
$content= 'excerpt';}
return $content;
}
add_filter('thematic_content', 'childtheme_content');

// Add post thumbnail to post excerpt
function add_post_thumb($title) {
return get_the_post_thumbnail(NULL, 'thumbnail') . $title;
}
add_filter('get_the_excerpt', 'add_post_thumb');</pre>
<p>I prefer the thumbnail underneath the post title and author meta information. However, if you wanted the thumbnail to appear next to the title, replace <code>get_the_excerpt</code> in the last line with <code>thematic_postheader_posttitle</code>. Use CSS to get the positioning that you prefer. Note that the thumbnail will appear wherever excerpts are shown &#8211; use the same conditional code as shown with <code>childtheme_content()</code> to limit it to the home/front page if you prefer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2010/add-the_post_thumbnail-to-post-excerpts/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Remove sidebar</title>
		<link>http://www.justaguydesign.com/2010/remove-sidebar/</link>
		<comments>http://www.justaguydesign.com/2010/remove-sidebar/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 08:24:00 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[Development Notes]]></category>
		<category><![CDATA[sidebars]]></category>
		<category><![CDATA[thematic]]></category>

		<guid isPermaLink="false">http://www.elshaddai-edwards.com/?p=1117</guid>
		<description><![CDATA[Add this function to functions.php to remove the sidebar from a Thematic child theme (either globally or conditionally): // Remove sidebars from feature template function remove_sidebar() { // We test if we are on the page template 'Feature' if (is_page_template('feature.php')) { // Yes, we are .. now we switch off the sidebar return FALSE; } [...]]]></description>
			<content:encoded><![CDATA[<p>Add this function to <code>functions.php</code> to remove the sidebar from a Thematic child theme (either globally or conditionally):</p>
<pre>// Remove sidebars from feature template
function remove_sidebar() {
// We test if we are on the page template 'Feature'
if (is_page_template('feature.php')) {
// Yes, we are .. now we switch off the sidebar
return FALSE;
} else {
// we are not .. we leave the switch on
return TRUE;
}
}
// Connect the filter to thematic_sidebar()
add_filter('thematic_sidebar', 'remove_sidebar');</pre>
<p>HT: <a  href="http://themeshaper.com/forums/forum/thematic-theme" target="_blank">Themeshaper forums</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2010/remove-sidebar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Mega Menus to WordPress</title>
		<link>http://www.justaguydesign.com/2009/adding-mega-menus-to-wordpress/</link>
		<comments>http://www.justaguydesign.com/2009/adding-mega-menus-to-wordpress/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 13:44:46 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[Development Notes]]></category>
		<category><![CDATA[child themes]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mega menu]]></category>
		<category><![CDATA[thematic]]></category>

		<guid isPermaLink="false">http://www.elshaddai-edwards.com/?p=850</guid>
		<description><![CDATA[What does it take to replace the jQuery dropdown menus in the popular Wordpress framework, Thematic, with a multi-category, multi-column "mega menu" structure? Part 1 of this topic examines a possible jQuery-based solution and outlines some basic integration choices.]]></description>
			<content:encoded><![CDATA[<div style="background:#eee;padding:10px;border:1px solid #ccc;margin-bottom:20px"><strong>Update:</strong> Be sure to read &#8220;<a  href="http://www.elshaddai-edwards.com/2010/04/megamenus-redux/" target="_self">Mega Menus Redux</a>&#8221; for my latest work on integrating this navigation style with WordPress.</div>
<p>I am currently working on one of my personal hobby sites, ardously converting it from a hand-coded HTML+CSS site with ~200 pages that I last updated two years ago to a WordPress-based mix of PHP, HTML and CSS that will be much easier to maintain. The bulk of the tedious work &#8211; copying, pasting and reformatting 50 pages of tabular product specs &#8211; has been done. Now it&#8217;s time for general clean up, media management and design touches, including revisiting the menu navigation structure.</p>
<p>One of the things that I hated about the current site experience is that the product pages required drilling down through two levels of category index pages before you got to actual content. I&#8217;ve streamlined some of that by reorganizing and consolidating content, but I also wanted to look at the navigation controls and see what I could take advantage of.</p>
<p>I&#8217;ve considered a two-tier nav bar in the past to handle the bulk of filtering product categories, but never liked the implementation (though something <a  href="http://users.tpg.com.au/j_birch/plugins/superfish/#sample4" target="_blank">like this</a>, with a tertiary dropdown, might work). Instead, having just successfully pitched and implemented the concept of &#8220;mega menus&#8221; on one of my professional &#8220;day job&#8221; client&#8217;s sites, I wanted to see if something similar could be done with WordPress.</p>
<p><span id="more-850"></span>Mega menus are essentially a wide dropdown content panel that can have multiple columns of nav lists, styled headers/category groupings, etc. The usual way is to create the panels using HTML and CSS as you would with any web page, then control the dropdown display with CSS and/or JavaScript. This means manually entering all of the navigation labels for each dropdown as well as the target URLs. Ideally I&#8217;d like to find a way to automate this with WordPress&#8217; <code>wp_list_pages()</code> or <code>wp_page_menu()</code> functions, but that will be Part 2 of this topic.</p>
<p><a  href="http://elshaddai-edwards.com/wp-content/uploads/2009/11/megamenu.gif" class="thickbox no_icon" rel="gallery-850" title="megamenu"><img class="alignright size-medium wp-image-875" src="http://www.elshaddai-edwards.com/wordpress/wp-content/uploads/2009/11/megamenu-300x169.gif" alt="megamenu" width="300" height="169" /></a>WordPress includes a jQuery library by default. Having experienced some of the conflicts between different JavaScript libraries in the past, I was interested to see if there was anything already available that also leveraged jQuery. And there is. I found an example of what I was hoping to implement on <a  href="http://www.javascriptkit.com" target="_blank">javascriptkit.com</a> (JSK) called &#8220;<a  href="http://www.javascriptkit.com/script/script2/jkmegamenu.shtml" target="_blank"><em>Cut &amp; Paste</em> jQuery Mega Menu</a>&#8220;. I&#8217;m not going to include a functional example here, so give them some click-thru love if you want to see it in action, especially since I&#8217;m still working on my site.</p>
<p>So how to integrate into WordPress?</p>
<p><strong>Important:</strong><em> I use the Thematic framework as the  base for most all of my WordPress development. The code examples below  may need to be modified to work with WP’s default themes and/or other  frameworks.</em></p>
<p>1. Save the referenced CSS and Javascript files into my child theme folder. Alternately, you could copy the contents of the CSS file into your child <code>style.css</code> file and remove the example CSS link from step 2 below.</p>
<p>2. To add the script declarations to the <code>&lt;head&gt;</code> section of my page, I added this to my child functions file:</p>
<pre>// Add plugin scripts to head
function childtheme_scripts() {?&gt;

&lt;script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" type="text/css" href="jkmegamenu.css" /&gt;
&lt;script type="text/javascript" src="jkmegamenu.js"&gt;

/***********************************************
* jQuery Mega Menu- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for full source code
***********************************************/

&lt;/script&gt;
&lt;script type="text/javascript"&gt;

//jkmegamenu.definemenu("anchorid", "menuid", "mouseover|click")
jkmegamenu.definemenu("megaanchor", "megamenu1", "mouseover")

&lt;/script&gt;&lt;?php }
add_action('wp_head','childtheme_scripts');</pre>
<p>Note that because WordPress is already calling a jQuery library, I&#8217;ve deleted JSK&#8217;s first script declaration to avoid duplicate script bloat.</p>
<p>3. The example directions now call for the menu&#8217;s HTML code to be pasted into your page. I&#8217;m not interested in pasting all of this code into my page template, so I needed to define it externally, referencing it where appropriate (see below).  As such, I created a <code>nav-menu.php</code> file in my child theme folder and copied in the example code.</p>
<p>4. Note that the example code creates a single instance of a mega menu. To recreate an entire nav bar, we&#8217;ll need to reproduce each additional primary nav item and the secondary links that we want in the mega menu dropdown. For each new mega menu, we have to add a new declaration line in the head scripts as well, identifying the anchor ID and menu ID.</p>
<pre>&lt;script type="text/javascript"&gt;
//jkmegamenu.definemenu("anchorid", "menuid", "mouseover|click")
jkmegamenu.definemenu("megaanchor1", "megamenu1", "mouseover")
jkmegamenu.definemenu("megaanchor2", "megamenu2", "mouseover")
&lt;/script&gt;</pre>
<p>5. I need to remove the default Thematic menu and add our new nav bar. A single PHP <code>include</code> declaration will reference the <code>nav-menu.php</code> file that I created.</p>
<pre>// First we need to remove the action creating the menu
function remove_access($content) {
remove_action('thematic_header','thematic_access',9);
}
add_action('init', 'remove_access');

// Now we need to rebuild it
function childtheme_access() { ?&gt;
&lt;div id="access"&gt;
&lt;div&gt;&lt;a href="#content" title="&lt;?php _e('Skip navigation to the content',
'thematic'); ?&gt;"&gt;&lt;?php _e('Skip to content', 'thematic'); ?&gt;&lt;/a&gt;&lt;/div&gt;
&lt;?php include 'nav-menu.php'; ?&gt;
&lt;/div&gt;&lt;!-- #access --&gt;
&lt;?php }
add_action('thematic_header','childtheme_access',9);</pre>
<p>Alternately, for testing purposes, I added the <code>include</code> declaration to the &#8220;belowheader&#8221; section, allowing me to compare the normal Thematic/WordPress menu with my manual mega menus.</p>
<pre>// Add mega menu below header
function childtheme_megamenu() {
include 'nav-menu.php';
}
add_action('thematic_belowheader','childtheme_megamenu',1);</pre>
<p>6. From here, you&#8217;ll just need to add the appropriate CSS to display your primary list items in a horizontal fashion &#8212; you should be able to crib that from Thematic&#8217;s default CSS declarations. Be sure to put a div wrapper in your <code>nav-menu.php</code> file or around the <code>include</code> declaration with a easy ID reference (not &#8220;menu&#8221; or &#8220;sf-menu&#8221; if you want to use both nav schemes together for a while!)</p>
<p>Overall, the result works and gives me the nav control that I&#8217;m looking for. I&#8217;m not excited about having the menus hard coded and would rather leverage WordPress&#8217; <code>wp_list_pages()</code> or <code>wp_page_menu()</code> functions to automatically generate the links inside each mega menu, but that&#8217;ll have to be for another time. I don&#8217;t think I&#8217;ll be able to fully automate everything, since there are specific IDs that have to be included for the JavaScript to work, but even automatically generating the second- and third-level links would be a step in the right direction.</p>
<p><strong>Caveat:</strong> I am a JavaScript newbie and will not admit to much more expertise than what I&#8217;ve described doing above. If anyone has different or better thoughts on accomplishing this task, please feel free to add a comment below. Thanks!</p>
<p><span style="color: #ff0000"><strong>** UPDATE **</strong></span><br />
A quick test since writing the above post shows that replacing the individual page lists in the <code>nav-menu.php</code> file with <code>&lt;?php wp_list_pages('child_of=ID&amp;depth=1&amp;title_li=') ?&gt;</code> works just fine, where ID is replaced by the parent page ID.</p>
<pre>&lt;div class="column"&gt;
&lt;h3&gt;Category Title&lt;/h3&gt;
&lt;ul&gt;
&lt;?php wp_list_pages('child_of=287&amp;depth=1&amp;title_li=') ?&gt;
&lt;/ul&gt;
&lt;/div&gt;</pre>
<p>I&#8217;m still using the include file and hand coding the layout categories, but the page title and link generation is being handled by WordPress. Much better!</p>
<div style="background:#eee;padding:10px;border:1px solid #ccc;margin-top:20px"><strong>Update:</strong> Be sure to read &#8220;<a  href="http://www.elshaddai-edwards.com/2010/04/megamenus-redux/" target="_self">Mega Menus Redux</a>&#8221; for my latest work on integrating this navigation style with WordPress.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2009/adding-mega-menus-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Why your meeting request just ruined my day</title>
		<link>http://www.justaguydesign.com/2009/why-your-meeting-request-just-ruined-my-day/</link>
		<comments>http://www.justaguydesign.com/2009/why-your-meeting-request-just-ruined-my-day/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 07:08:54 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[Development Notes]]></category>
		<category><![CDATA[meetings]]></category>
		<category><![CDATA[office]]></category>
		<category><![CDATA[schedules]]></category>

		<guid isPermaLink="false">http://www.elshaddai-edwards.com/?p=679</guid>
		<description><![CDATA[A coworker passed along a link to an interesting article, "Maker’s Schedule, Manager’s Schedule", yesterday. Essentially the author identifies two ways of approaching the schedule of a working day, which he calls the manager’s schedule and the maker’s schedule.]]></description>
			<content:encoded><![CDATA[<p>A coworker passed along a link to an article, <a  href="http://www.paulgraham.com/makersschedule.html" target="_blank">Maker&#8217;s Schedule, Manager&#8217;s Schedule</a>, yesterday and while I&#8217;ve already tweeted it, I thought it was good enough to commit to the longer-term archives. Essentially the author identifies two ways of approaching the schedule of a working day, which he calls the manager&#8217;s schedule and the maker&#8217;s schedule.</p>
<blockquote><p>The manager&#8217;s schedule is for bosses. It&#8217;s embodied in the traditional appointment book, with each day cut into one hour intervals. You can block off several hours for a single task if you need to, but by default you change what you&#8217;re doing every hour. When you use time that way, it&#8217;s merely a practical problem to meet with someone. Find an open slot in your schedule, book them, and you&#8217;re done.</p></blockquote>
<p><span id="more-679"></span>In contrast, makers:</p>
<blockquote><p>generally prefer to use time in units of half a day at least. You can&#8217;t write or program well in units of an hour. That&#8217;s barely enough time to get started. When you&#8217;re operating on the maker&#8217;s schedule, meetings are a disaster. A single meeting can blow a whole afternoon, by breaking it into two pieces each too small to do anything hard in.</p></blockquote>
<p><a  href="http://www.justaguydesign.com/wp-content/uploads/2009/10/OutlookCalendar.jpg" class="thickbox no_icon" rel="gallery-679" title="OutlookCalendar"><img class="alignright size-medium wp-image-3214" title="OutlookCalendar" src="http://www.justaguydesign.com/wp-content/uploads/2009/10/OutlookCalendar-300x225.jpg" alt="" width="300" height="225" /></a>I am a maker and couldn&#8217;t agree more with this generalization. When I have an hour between meetings, I usually end up doing administrative work that is of no productive value &#8211; that is certainly not enough time to get engaged on project work and really produce. The author writes working &#8220;<em>from dinner till about 3 am every day, because at night no one could interrupt me.</em>&#8221; I like getting to the office several hours before &#8220;normal office hours&#8221; for similar reasons. No interruptions=more productive work.</p>
<p>The author suggests some tricks for makers to use in balancing meeting requests and their preferred work schedule, ultimately concluding that:</p>
<blockquote><p>Those of us on the maker&#8217;s schedule are willing to compromise. We know we have to have some number of meetings. All we ask from those on the manager&#8217;s schedule is that they understand the cost.</p></blockquote>
<p>Are you a maker or a manager?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2009/why-your-meeting-request-just-ruined-my-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A &#8220;fix&#8221; to PhatFusion&#8217;s Image Menu script</title>
		<link>http://www.justaguydesign.com/2009/a-fix-to-phatfusions-image-menu-script/</link>
		<comments>http://www.justaguydesign.com/2009/a-fix-to-phatfusions-image-menu-script/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 00:16:42 +0000</pubDate>
		<dc:creator>ElShaddai Edwards</dc:creator>
				<category><![CDATA[Development Notes]]></category>
		<category><![CDATA[image menu]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[phatfusion]]></category>

		<guid isPermaLink="false">http://elshaddai-edwards.com/?p=461</guid>
		<description><![CDATA[I’m using phatfusion’s Image Menu script on a new client project. It’s a pretty cool script, using a set of images to build a horizontal menu that expands and collapses as you rollover each image.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-3216" title="imagemenu" src="http://www.justaguydesign.com/wp-content/uploads/2009/07/imagemenu.jpg" alt="" width="300" height="200" />I&#8217;m using phatfusion&#8217;s <a  href="http://www.phatfusion.net/imagemenu/" target="_blank">Image Menu</a> script on a new client project. It&#8217;s a pretty cool script, using a set of images to build a horizontal menu that expands and collapses as you rollover each individual image.</p>
<p>After seeing the demo script, my client requested that the &#8220;active&#8221; photo for each page be loaded as &#8220;open&#8221; when that page was accessed. This is something that should be apparent based on the developers&#8217; description, but proved to be quite difficult to track down. Based on the basic documentation, setting the id or index of a menu item in the &#8220;open&#8221; field would open it on start, the default value being &#8220;null&#8221;. However, that was as far as the documentation went, leaving the rest to experimentation&#8230;</p>
<p><span id="more-461"></span>The first problem was where to set &#8220;the id or index of a menu item&#8221;&#8230; a few Google searches turned up a few old forum posts that indicated the id should be set on the &#8216;a&#8217; in the menu HTML. However, using text strings caused the default images to revert to a nonactive state after any mouseover, so I went back to the default IDs: 0, 1, 2, 3. The HTML line looked like this:</p>
<pre>var myMenu = new ImageMenu($$('#imageMenu a'),{openWidth:500,
open:0, border:0,onOpen:function(e,i){window.location=(e);}});</pre>
<p>The key addition was &#8220;open:0&#8243;, which was not included in the default script files. However, the sticky image behavior worked for default IDs 1-3, but not 0. Based on my searching, I wasn&#8217;t the only to be confounded by this issue. Eventually, buried in a long comment thread, I found an answer. Changing this line in the JavaScript file:</p>
<pre>if(this.options.open){,</pre>
<p>to this:</p>
<pre>if(this.options.open!=null){</pre>
<p>fixed the problem. All of the images opened correctly and stayed open on their respective pages. Whew! A lot of non-billable time spent tracking down a behavior that could have been much more clearly documented in the code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.justaguydesign.com/2009/a-fix-to-phatfusions-image-menu-script/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

