<?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>Thoughts on WordPress &#187; draggable</title>
	<atom:link href="http://wp.michaelwalsh.org/tag/draggable/feed/" rel="self" type="application/rss+xml" />
	<link>http://wp.michaelwalsh.org</link>
	<description>Stuff of interest to me for WordPress developers</description>
	<lastBuildDate>Thu, 11 Mar 2010 03:13:58 +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>Header Image Options in LEGO Theme</title>
		<link>http://wp.michaelwalsh.org/2009/09/17/header-image-options-in-lego-theme/</link>
		<comments>http://wp.michaelwalsh.org/2009/09/17/header-image-options-in-lego-theme/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 18:32:20 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[draggable]]></category>
		<category><![CDATA[droppable]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[LEGO]]></category>
		<category><![CDATA[Sandbox]]></category>

		<guid isPermaLink="false">http://wp.michaelwalsh.org/2009/09/17/header-image-options-in-lego-theme/</guid>
		<description><![CDATA[I have been working on a re-write of the Sandbox LEGO WordPress theme.&#160; It is taking a lot longer than I thought it would, mostly because I have made the problem more complicated than I initially thought it would be.
One of the main things I wanted to offer in this theme was the ability to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a re-write of the Sandbox LEGO WordPress theme.&#160; It is taking a lot longer than I thought it would, mostly because I have made the problem more complicated than I initially thought it would be.</p>
<p>One of the main things I wanted to offer in this theme was the ability to choose a color scheme from an pre-set offering of about 8-10 choices.&#160; This wasn’t too hard, I had done some similar in the original Sandbox Soccer theme.</p>
<p>As I worked on it I decided it would be nice to allow the user to define what the header should look like including their own image.&#160; WordPress offers the ability to upload and use a custom theme header but this didn’t do quite what I wanted.&#160; I decided to let the user choose a header image from the media library.&#160; But what if the user wants multiple header images?&#160; Hmmm.&#160; This problem could get very complicate very quickly.&#160; I decided to constrain the problem by providing the ability to define up to three (3) header images:&#160; Left, center, and right.&#160; Doing this would support the 3-4 sites I expect to use this theme on (my own <a href="http://www.carolinatrainbuilders.com">CarolinaTrainBuiders.com</a> site, <a href="http://www.nclug.us">NCLUG</a>, <a href="http://www.ncltc.us">NCLTC</a>, and <a href="http://www.iltco.org">ILTCO</a>).</p>
<p>Now that I knew what I wanted, how to implement it.&#160; Simply showing the image options on a Theme Options page could potentially result in an enormous page.&#160; I mentioned <a href="http://jqueryui.com/demos/accordion/">jQuery Accordion</a> in a prior post, dividing the various options into sections using the <a href="http://jqueryui.com/demos/accordion/">Accordion</a> made sense and was pretty straightforward once I upgrade to WordPress 2.8.4.</p>
<p>Once the Accordion was working I decided I wanted an elegant way to select the images.&#160; Since this effort is a hobby and I largely do projects likes this to learn something, I decided I wanted to use a drag and drop mechanism to select the images.&#160; Again, jQuery to the rescue, namely the <a href="http://jqueryui.com/demos/draggable/">jQuery draggable</a> and <a href="http://jqueryui.com/demos/droppable">jQuery droppable</a> plugins.&#160; In particular, the <a href="http://jqueryui.com/demos/droppable/#photo-manager">Simple Photo Manager</a> demo was very close to what I had envisioned.</p>
<p>It has taken me a little while, mostly because I haven’t had a lot of time to work on it but I finally have a pretty slick theme options page working where the header images can be selected from the media library using drag and drop.&#160; I am by no means a jQuery guru but I have learned a fair amount working this problem out.&#160; The code I have isn’t ideal and I’ll continue to refine it but it is working so I can continue to develop the theme.&#160; Once I get it running and released I will go back and clean up the jQuery code.&#160; For now, getting it working and doing what I wanted was the primary task.</p>
]]></content:encoded>
			<wfw:commentRss>http://wp.michaelwalsh.org/2009/09/17/header-image-options-in-lego-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
