<?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>Hodgson Marketing&#187; HowTo</title>
	<atom:link href="http://www.hodgsonco.com/category/howto/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hodgsonco.com</link>
	<description>Organic Marketing, Custom Design, WordPress</description>
	<lastBuildDate>Wed, 28 Dec 2011 16:21:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>HTML5 Map Visualization, a HowTo</title>
		<link>http://www.hodgsonco.com/html5-map-visualization-a-howto</link>
		<comments>http://www.hodgsonco.com/html5-map-visualization-a-howto#comments</comments>
		<pubDate>Thu, 13 Oct 2011 16:48:20 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=682</guid>
		<description><![CDATA[What could be more boring than data? Ever seen a huge long list of numbers, sliding down into infinity? Horrible! Forget about a glass of wine or a sleeping pill, friends. If you are having trouble drifting off, I suggest reading a spreadsheet. Of course, analyzed data can be crucial, but doing the analysis is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/png-300x171.png" alt="" title="png" width="300" height="171" class="alignright size-medium wp-image-683" />What could be more boring than data? Ever seen a huge long list of numbers, sliding down into infinity? Horrible! Forget about a glass of wine or a sleeping pill, friends. If you are having trouble drifting off, I suggest reading a spreadsheet. </p>
<p>Of course, <em>analyzed</em> data can be crucial, but doing the analysis is a complicated process best left to mathematicians locked in a basement with a couple of computers and a prodigious supply of coffee. Even then, the analysis is usually pretty hard to understand.</p>
<p><strong>Every now and then, though, someone comes up with a pretty way to view data, and it can be both informative and fun to look at. </strong></p>
<h2>The Walmart Visualization</h2>
<p>One of those great convergences of data and design came with the <a href="http://projects.flowingdata.com/walmart/">Walmart Visualization</a> by Flowing Data. Click and watch the animation. Pretty neat, huh?</p>
<p>That was forwarded to me by a client of mine with the question &#8220;Can we do this?&#8221;</p>
<p>Unfortunately, in animal kingdom programmer rankings I come in somewhere between an adolescent dachshund and the North American Blue Heron, as depicted in the graphic below. </p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/programmingrank.jpg" alt="" title="programmingrank" width="600" height="271" class="aligncenter size-full wp-image-685" /></p>
<p>I also suffer from high self esteem, however, so I decided to give it a try anyway.</p>
<h2>The first clue, Tile 5</h2>
<p><a href="http://tile5.org"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/10/png-1-261x300.png" alt="" title="png-1" width="261" height="300" class="alignright size-medium wp-image-698" /></a>As I have <a href="http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto" title="The Great jQuery Interactive Map Saga, a HowTo: Part One">stated previously</a>, I would much rather lie down in traffic than work with Flash. I&#8217;d also probably rather spend a day wearing underpants made of pine cones, but that is neither here nor there.</p>
<p>What is both here and there is that I wanted a HTML 5 way of reproducing the FlowingData visualization. The first clue I had that this could be done came from a library called <a href="http://www.tile5.org/">Tile5</a>, even though I have no idea what Tile5 does. </p>
<p>I did, however, see <a href="http://www.tile5.org/demos/playground/#visualization/walmart">this demonstration</a> on their page which looked a lot like what I was trying to achieve. Unfortunately, the code was too hard for someone of my level to comprehend and I never quite got it to work despite the expert help of Tile5 mastermind, <a href="http://twitter.com/#!/DamonOehlman">Damon Oehlman</a>.</p>
<p>From his example, though, I learned about something called CloudMade, who have what they call a <a href="http://developers.cloudmade.com/projects/show/web-maps-studio">Web Maps Studio</a>.</p>
<h2>The Map Takes Shape</h2>
<p>That&#8217;s when things started to take off. Check out my proof of concept code. Mind you, it has to shovel 10,000 lines of data into memory, so it takes a few seconds to load:<br />
<a href="http://hodgsonco.com/map/poc.html">http://hodgsonco.com/map/poc.html</a></p>
<p>As you can see, I only need two javascript libraries loaded to get going:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>13
14
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">  &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;http://tile.cloudmade.com/wml/latest/web-maps-lite.js&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<p>Then, in the body of the html document, I declare a div with the id mapContainer. There&#8217;s also a div in there with the id &#8220;date&#8221; which I am using to output the date information as the visualization runs.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>33
34
35
36
37
38
39
40
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">  &lt;div id=&quot;mapContainer&quot;/&gt;&lt;div id=&quot;date&quot;&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;script type=&quot;text/javascript&quot;&gt;
&nbsp;
    var cloudmade = new CM.Tiles.CloudMade.Web({key: 'GET YOUR OWN API KEY FROM CLOUDMADE', styleId: 999});
    var map = new CM.Map('mapContainer', cloudmade);
    map.setCenter(new CM.LatLng(37.16, -96.68), 4);
&nbsp;
  &lt;/script&gt;</pre></td></tr></table></div>

<p>That code alone will produce a blank map centered on the US that can be zoomed and dragged just like Google Maps. </p>
<p>Speaking of Google Maps, you might think they&#8217;d have an API for creating cool visualizations like this. You might even be especially disappointed in them when they don&#8217;t have said API <em>and</em> you are a stockholder who desperately wants their stock price to rise. No such luck, lunch meat. </p>
<h2>You want dots? We got dots!</h2>
<p>From there all I had to do was slap some dots on the map. I had a huge list of dates with zipcode information to work with, which are the dates that an email sent by my client was opened. My friend K.C. Young of <a href="http://codeguard.com">CodeGuard</a> helped turn that zipcode data into latitude/longitude data, which Cloudmade can use to place a marker on the map. </p>
<p>I discovered I could also specify my own image to use as a marker, so I made a mostly-transparent white dot for this purpose. In this way, I could mark the events and also show how they clustered up in certain areas. </p>
<p>Here&#8217;s how the code works. First of all, I wanted to step through the huge list of opens (10,000 records) by day. I used <a href="http://www.w3schools.com/jsref/met_win_setinterval.asp">setInterval()</a> to do this.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>42
43
44
45
46
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">  &lt;script type=&quot;text/javascript&quot; src=&quot;zipsnlats.js&quot;&gt;&lt;/script&gt;
  <span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
  <span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
  <span style="color: #003366; font-weight: bold;">var</span> currentdate <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
  intid <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;stepthrough()&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">250</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>That fires the following function 4 times a second, which we use to gather up all the events for a certain date.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">  <span style="color: #003366; font-weight: bold;">function</span> stepthrough<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;">//figure out first date.</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>currentdate <span style="color: #339933;">==</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #006600; font-style: italic;">// we've not been run before</span>
      currentdate <span style="color: #339933;">=</span> opens<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;date&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>currentdate <span style="color: #339933;">==</span> opens<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;date&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      addpoint<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      i<span style="color: #339933;">++;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">//set the date for next iteration</span>
    currentdate <span style="color: #339933;">=</span> opens<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;date&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div#date'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>currentdate<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>i<span style="color: #339933;">&gt;=</span><span style="color: #CC0000;">5000</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">//if (!opens[i][&quot;date&quot;]) {</span>
      console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Clearing interval&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      clearInterval<span style="color: #009900;">&#40;</span>intid<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div#date'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Limited at 5000 records&quot;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Each time the function above finds a matching date, it fires this function to add a point to the map. The end result is that all the points that match display pretty much simultaneously.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>69
70
71
72
73
74
75
76
77
78
79
80
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">  <span style="color: #003366; font-weight: bold;">function</span> addpoint<span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> myMarkerLatLng <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> CM.<span style="color: #660066;">LatLng</span><span style="color: #009900;">&#40;</span>opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;latitude&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;longitude&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;I: &quot;</span> <span style="color: #339933;">+</span> index <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; LAT: &quot;</span> <span style="color: #339933;">+</span> opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;latitude&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; LONG: &quot;</span> <span style="color: #339933;">+</span> opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;longitude&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #003366; font-weight: bold;">var</span> icon <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> CM.<span style="color: #660066;">Icon</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    icon.<span style="color: #660066;">image</span>  <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://hodgsonco.com/map/transdot.png&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #006600; font-style: italic;">//icon.iconSize = new CM.Size(32, 32);</span>
    <span style="color: #006600; font-style: italic;">//icon.iconAnchor = new CM.Point(16, 32);</span>
    <span style="color: #003366; font-weight: bold;">var</span> myMarker <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> CM.<span style="color: #660066;">Marker</span><span style="color: #009900;">&#40;</span>myMarkerLatLng<span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>title<span style="color: #339933;">:</span> opens<span style="color: #009900;">&#91;</span>index<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;date&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> icon<span style="color: #339933;">:</span> icon<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    map.<span style="color: #660066;">addOverlay</span><span style="color: #009900;">&#40;</span>myMarker<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>I think the <a href="http://hodgsonco.com/map/poc.html">end result</a> looks nicer this way, but I also let it run as fast as it wanted to a few times and the end result was that my new 17&#8243; MacBook ground to a halt before all 10,000 records were displayed. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/html5-map-visualization-a-howto/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Great jQuery Interactive Map Saga, a HowTo: Part Two</title>
		<link>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto-part-two</link>
		<comments>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto-part-two#comments</comments>
		<pubDate>Mon, 26 Sep 2011 18:11:12 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=639</guid>
		<description><![CDATA[I am on a quest. Yes, a great and epic quest to construct an interactive map for my client that is both lovely and editable from within WordPress. In Part One I covered the arduous task of using jQuery plugins to make an imagemap do some things it was never designed to do. Now we [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_641" class="wp-caption alignright" style="width: 310px"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Frodo-300x204.jpg" alt="" title="Frodo" width="300" height="204" class="size-medium wp-image-641" /><p class="wp-caption-text">Frodo, delighted upon hearing that he&#039;ll never have to develop Actionscript ever again.</p></div>I am on a quest. Yes, a great and epic quest to construct an interactive map for my <a href="http://lascatalinascr.com">client</a> that is both lovely and editable from within WordPress. In <a href="http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto" title="The Great jQuery Interactive Map Saga, a HowTo: Part One">Part One</a> I covered the arduous task of using jQuery plugins to make an imagemap do some things it was never designed to do. Now we forge onward, and make our content easy to update!</p>
<p>&#8220;But Jim,&#8221; you might be saying, &#8220;how in the name of Frodo are we going to pass information back and forth from WordPress to javascript?&#8221; Still your hearts, friends. We will get there in due course. </p>
<p>It goes without saying that some of the weaker developers will be killed and eaten along the way, but the strong among us will prevail. </p>
<h2>Step One: Getting the correct information from WordPress</h2>
<p>This is going to be kind of specific to my application, but I&#8217;m going to go over it anyway. It&#8217;s specific to me because my client is using the Genesis theme framework from <a href="http://studiopress.com">Studiopress</a>, and the AgentPress child theme on top of that. </p>
<p>So here&#8217;s what I did to get the posts I needed:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    // load WordPress information into an associative array
    var lots = <span style="color: #000000; font-weight: bold;">&lt;?</span>
      <span style="color: #666666; font-style: italic;">// Now make the JS array happen</span>
      <span style="color: #000088;">$lots_query</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category_name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'properties'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'posts_per_page'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$x</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$lots_data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$lots_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$lots_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">/* get custom agentpress data. This is stupefying */</span>
        <span style="color: #000088;">$ap_options</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$n</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$n</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">11</span><span style="color: #339933;">;</span><span style="color: #000088;">$n</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$label</span> <span style="color: #339933;">=</span> genesis_get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'features_1_col'</span><span style="color: #339933;">.</span><span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'_'</span><span style="color: #339933;">.</span><span style="color: #000088;">$n</span><span style="color: #339933;">,</span> AP_SETTINGS_FIELD<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'_features_1_col'</span><span style="color: #339933;">.</span><span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'_'</span><span style="color: #339933;">.</span><span style="color: #000088;">$n</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> genesis_get_custom_field<span style="color: #009900;">&#40;</span><span style="color: #000088;">$name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #666666; font-style: italic;">//print &quot;\n\n&lt;!-- BLARGH $label $name --&gt;\n\n&quot;;</span>
            <span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$label</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
          <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Site:'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Lot Number:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$lots_data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Site:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Lot Number:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> the_title<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #000088;">$lots_data</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Site:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$ap_options</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Lot Number:'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'text'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> get_the_post_thumbnail<span style="color: #009900;">&#40;</span><span style="color: #000088;">$lots_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">75</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span><span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'tipcontent'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>get_the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
      <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">echo</span> <span style="color: #990000;">json_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lots_data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">?&gt;</span>;</pre></td></tr></table></div>

<p>If you&#8217;re just using regular WordPress, you can get your post info however you like. As you can see from my snarky comment at line 8, I&#8217;m none too pleased with the kludgy nature of this solution, but as someone who learned to write code in PERL, I&#8217;m not <em>that</em> bothered. </p>
<p>The important bit is that I constructed myself a multi-dimensional array in PHP and then used PHP&#8217;s hand-dandy <a href="http://php.net/manual/en/function.json-encode.php">json_encode()</a> function. I didn&#8217;t even know that existed and would totally have constructed a js array by hand had Jon Manuzak not alerted me to it. Thanks Jon!</p>
<p>By the way, do you guys still say &#8220;kludge?&#8221; I&#8217;m 37 years old now. I&#8217;m no longer too hip with what the kids are doing. Clue me in, here, skinny jeans. </p>
<h2>Step Two: Refer to your JSON data in the javascripts</h2>
<p>Now, this <a href="http://www.json.org/">JSON</a> business may sound fancy&#8230; perhaps too fancy for someone who might, say, stare at a computer for a significant portion of the day wearing only his underpants. In truth, it&#8217;s just a fancy name for the javascript version of what I&#8217;d call a <a href="http://en.wikipedia.org/wiki/Hash_table">hash</a> or an <a href="http://en.wikipedia.org/wiki/Associative_array">associative array</a>.</p>
<p>Here&#8217;s what my data looked like:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> lots <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;5&quot;</span><span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;Lot Number 5&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;&lt;img width=<span style="color: #000099; font-weight: bold;">\&quot;</span>75<span style="color: #000099; font-weight: bold;">\&quot;</span> height=<span style="color: #000099; font-weight: bold;">\&quot;</span>75<span style="color: #000099; font-weight: bold;">\&quot;</span> src=<span style="color: #000099; font-weight: bold;">\&quot;</span>http:<span style="color: #000099; font-weight: bold;">\/</span><span style="color: #000099; font-weight: bold;">\/</span>lascatalinascr.com<span style="color: #000099; font-weight: bold;">\/</span>wp-content<span style="color: #000099; font-weight: bold;">\/</span>uploads<span style="color: #000099; font-weight: bold;">\/</span>2011<span style="color: #000099; font-weight: bold;">\/</span>09<span style="color: #000099; font-weight: bold;">\/</span>punta-penca-views-150x150.jpg<span style="color: #000099; font-weight: bold;">\&quot;</span> class=<span style="color: #000099; font-weight: bold;">\&quot;</span>tipcontent wp-post-image<span style="color: #000099; font-weight: bold;">\&quot;</span> alt=<span style="color: #000099; font-weight: bold;">\&quot;</span>punta-penca-views<span style="color: #000099; font-weight: bold;">\&quot;</span> title=<span style="color: #000099; font-weight: bold;">\&quot;</span>punta-penca-views<span style="color: #000099; font-weight: bold;">\&quot;</span> <span style="color: #000099; font-weight: bold;">\/</span>&gt;Lot 5, like all Punta Penca lots, is among the most beautiful plots of land in the world. The views will astonish and amaze.&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>&#8230;and here is how I referenced that data:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">     <span style="color: #003366; font-weight: bold;">var</span> lottitle <span style="color: #339933;">=</span> <span style="color: #3366CC;">'Lot Number '</span> <span style="color: #339933;">+</span> jQuery<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;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'alt'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
     <span style="color: #003366; font-weight: bold;">var</span> lotnumber <span style="color: #339933;">=</span> jQuery<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;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'alt'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
     <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>lots <span style="color: #339933;">&amp;&amp;</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>lotnumber<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;&amp;</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>lotnumber<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       lottext <span style="color: #339933;">=</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>lotnumber<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;text&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
       lottitle <span style="color: #339933;">=</span> lots<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;Punta Penca&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span>lotnumber<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>So I just referred to every level of data with its name in brackets. Such is the magic of JSON. </p>
<h2>All is Bliss on the Intertubes</h2>
<p>So that&#8217;s a wrap for Part Two, friends. Remember, you can always go back to <a href="http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto" title="The Great jQuery Interactive Map Saga, a HowTo: Part One">Part One</a> to see how I built the map to begin with, and you can always get in touch with me if you have questions. </p>
<p>I&#8217;ll probably have wrong answers, but I&#8217;ll give &#8216;em a shot anyways. </p>
<p>Stay tuned for Part Three, in which I add even more areas of information and things get seriously fancy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto-part-two/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Great jQuery Interactive Map Saga, a HowTo: Part One</title>
		<link>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto</link>
		<comments>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto#comments</comments>
		<pubDate>Thu, 15 Sep 2011 19:43:18 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=583</guid>
		<description><![CDATA[One of my amazing clients is in the real estate business, which is great. After all, they say that everyone should get into real estate because there&#8217;s only so much real estate to own. Tell that to those wacky Japanese or the fun lovers in Dubai. Those guys construct islands like I scramble eggs. My [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/04_maps.png" alt="" title="04_maps" width="128" height="128" class="alignright size-full wp-image-584" />One of my <a href="http://lascatalinascr.com">amazing clients</a> is in the real estate business, which is great. After all, they say that everyone should get into real estate because there&#8217;s only so much real estate to own. </p>
<p>Tell that to those wacky <a href="http://en.wikipedia.org/wiki/Kansai_International_Airport">Japanese</a> or the fun lovers in <a href="http://en.wikipedia.org/wiki/Burj_Al_Arab">Dubai</a>. Those guys construct islands like I scramble eggs.</p>
<p>My clients asked what I thought about coming up with an interactive map to show the placement of their home sites. Google <a href="http://maps.google.com/">Maps</a> sprang to mind, but as the development in question is new, and the satellite images for it were taken in the dry season, it wouldn&#8217;t do. After all, it is important to look our best. This is why I campaign tirelessly to have all photos that show my love handles removed from Facebook.</p>
<h2>Death before Flash</h2>
<div id="attachment_588" class="wp-caption alignleft" style="width: 100px"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/noflash-90x90.jpg" alt="" title="noflash" width="90" height="90" class="size-thumbnail wp-image-588" /><p class="wp-caption-text">Hey, instead of using Flash, let&#039;s lie down in the street.</p></div>
<p>For this application I wanted the ability to highlight each property on mouseover, and I wanted to be able to show popups with further information. Above all, I didn&#8217;t want to use Flash. In fact, I&#8217;d rather punch myself directly in the gut than develop a Flash application, and I punch pretty hard. </p>
<p>That left <a href="http://jquery.com/">jQuery</a>. Now, I&#8217;m not much of a programmer, but I think Javascript is painful and annoying, kind of like air travel. Trusty jQuery, though, is like having a cocktail on your flight. You still have to go through some hassle, but it&#8217;s a little easier to bear. </p>
<p>Looking around a bit on yonder Google netted me <a href="http://www.gethifi.com/blog/jquery-vs-flash-for-interactive-map">this article</a> from the fine folks at <a href="http://gethifi.com">GetHifi</a>. It was slick, but not exactly what I wanted. Every other article on the Internet seemed to link back to this one, as well.</p>
<p>So, like countless others before me, I descended into the nerd mines and began a-hackin&#8217;.</p>
<p><a href="http://abhinavsingh.com/blog/2009/03/using-image-maps-in-javascript-a-demo-application/"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-2.54.26-PM.png" alt="" title="Screen shot 2011-09-15 at 2.54.26 PM" width="243" height="291" class="alignright size-full wp-image-595" /></a></p>
<h2>Abhi Singh to the rescue</h2>
<p>The first promising nugget I found was on the web page of <a href="http://abhinavsingh.com/blog/2009/03/using-image-maps-in-javascript-a-demo-application/">Abhi Singh</a>, who had a sweet little map of India that did some map highlighting and had a tooltip as well. Again, it wasn&#8217;t exactly what I wanted, but it was getting close. He also has a little javascript tool that will help you make your AREA coords. </p>
<p>Speaking of AREA coords, even though I have taught a class on Dreamweaver and know that it is as stupefying as any modern software can be, I used Dreamweaver to make my image map, because it&#8217;s installed on my computer for some reason. Hope springs eternal, I guess. </p>
<p>I was punished for that hope.</p>
<h2>Step one: Make an Image Map</h2>
<p>Mind you, it has been many a long year since I even thought of making an image map, but in this case it seemed like the best idea. The properties in question weren&#8217;t square, though, and I wanted the thing to behave nice-like, so I thought that polygon-shaped image maps were the key. </p>
<p>Here are my polygonal image map shapes all laid out in Dreamweaver. The light blue areas are them.<br />
<img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-3.00.29-PM.png" alt="" title="Screen shot 2011-09-15 at 3.00.29 PM" width="614" height="489" class="aligncenter size-full wp-image-597" /></p>
<p>That looks like this in code form:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;img src=&quot;puntapenca.jpg&quot; width=&quot;600&quot; height=&quot;477&quot; border=&quot;0&quot; usemap=&quot;#Map&quot; /&gt;
&lt;map name=&quot;Map&quot; id=&quot;Map&quot;&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;522,40,552,54,554,64,547,83,533,84,509,65,514,63,509,56,515,48,515,36&quot; href=&quot;#&quot; alt=&quot;5&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;497,65,522,87,517,89,511,92,506,97,502,103,498,109,493,110,486,106,485,95,484,74,496,66&quot; href=&quot;#&quot; alt=&quot;7&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;459,83,461,83,474,84,477,119,442,114,445,97,460,78&quot; href=&quot;#&quot; alt=&quot;9&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;441,116,475,121,476,135,466,142,457,151,424,134,430,127,438,123,441,116&quot; href=&quot;#&quot; alt=&quot;11&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;421,139,455,156,447,173,420,170,412,159,413,151,422,139&quot; href=&quot;#&quot; alt=&quot;13&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;426,176,447,179,435,209,413,207,414,201,412,193,415,186,419,178,425,179,426,175&quot; href=&quot;#&quot; alt=&quot;15&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;423,219,443,220,425,256,398,239,396,235,398,226,404,222,408,217&quot; href=&quot;#&quot; alt=&quot;17&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;393,242,394,244,397,242,422,256,409,284,377,265,391,242&quot; href=&quot;#&quot; alt=&quot;19&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;374,267,407,286,402,296,404,313,361,289,361,282,367,275,371,272,374,267&quot; href=&quot;#&quot; alt=&quot;21&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;337,341,318,345,299,357,284,321,288,319,298,322,302,319,314,331,326,338,337,340&quot; href=&quot;#&quot; alt=&quot;25&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;307,314,304,300,312,292,289,269,255,284,274,300,283,320,287,318,298,321,302,318,306,314&quot; href=&quot;#&quot; alt=&quot;27&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;315,258,334,250,338,258,354,270,351,277,349,284,349,291,350,297,351,302,352,310,350,318,340,321,324,295,314,258&quot; href=&quot;#&quot; alt=&quot;20&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;340,249,340,252,358,266,369,257,383,235,363,226,357,243,339,249&quot; href=&quot;#&quot; alt=&quot;18&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;376,199,398,210,393,212,390,217,388,220,386,225,385,230,383,234,363,225,376,200&quot; href=&quot;#&quot; alt=&quot;16&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;400,201,378,191,397,157,405,165,407,170,408,174,406,178,402,182,401,185,400,190,400,194,400,200&quot; href=&quot;#&quot; alt=&quot;14&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;440,84,415,80,415,114,426,116,431,112,432,107,433,101,434,96,437,89,441,84&quot; href=&quot;#&quot; alt=&quot;12&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;423,79,428,71,432,64,436,60,441,58,449,54,457,52,462,54,465,57,469,62,471,68,466,67,460,67,455,69,452,72,447,77,447,76,441,83,423,80&quot; href=&quot;#&quot; alt=&quot;10&quot; /&gt;
  &lt;area shape=&quot;poly&quot; coords=&quot;362,291,403,315,402,329,345,340,343,337,349,335,354,332,357,328,361,324,363,319,364,313,364,306,363,301,362,296,362,291&quot; href=&quot;#&quot; alt=&quot;23&quot; /&gt;
&lt;/map&gt;</pre></td></tr></table></div>

<p>And here&#8217;s how Dreamweaver punished me: every time you make a new polygonal image map area thingy, you see this message, which you then have to click on to dismiss. Yeah. Every frickin&#8217; time. </p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-3.04.32-PM.png" alt="" title="Screen shot 2011-09-15 at 3.04.32 PM" width="507" height="212" class="aligncenter size-full wp-image-599" /></p>
<p>Hey, look, I am all about compliance and accessibility, but do I really need to see that message for each and every shape I make? Jeez! OH well, I got through it. </p>
<h2>Step Two: maphilight</h2>
<p>The next phase of this Saga has a name. Yes, a beautiful name, as though from the lips of Venus herself: <a href="http://davidlynch.org/js/maphilight/docs/">maphilight</a>. Okay, I guess it&#8217;s not that fancy, but what it does is. See, it takes your handy-dandy image map you made and <a href="http://davidlynch.org/js/maphilight/docs/demo_usa.html">highlights each AREA</a> in whatever way you tell it to. Impressed? You should be. </p>
<p>All you have to do is download the little js file and load &#8216;er up in your header like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script type='text/javascript' src='/things/n/stuff/jquery.maphilight.min.js?ver=1.1'&gt;&lt;/script&gt;</pre></div></div>

<p>Then tell the magical gnomes that live in your computer that they should use that script on the image map in question like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> 
jQuery<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>
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.map'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">maphilight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	strokeColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'00ff00'</span><span style="color: #339933;">,</span>
	strokeWidth<span style="color: #339933;">:</span> <span style="color: #CC0000;">2</span><span style="color: #339933;">,</span>
	neverOn<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
	groupBy<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">,</span>
	wrapClass<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
	shadow<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
	shadowX<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
	shadowY<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
	shadowRadius<span style="color: #339933;">:</span> <span style="color: #CC0000;">6</span><span style="color: #339933;">,</span>
	shadowColor<span style="color: #339933;">:</span> <span style="color: #3366CC;">'000000'</span><span style="color: #339933;">,</span>
	shadowOpacity<span style="color: #339933;">:</span> <span style="color: #CC0000;">0.8</span><span style="color: #339933;">,</span>
	shadowPosition<span style="color: #339933;">:</span> <span style="color: #3366CC;">'outside'</span><span style="color: #339933;">,</span>
	shadowFrom<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">false</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: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>There are some extraneous options listed above that I used for my purposes which you can ignore, but I&#8217;ll leave them in in case someone else wonders how to use settings other than the defaults. It took me a bit of tinkering, but as I say, I am a crap programmer. </p>
<p>Anyway, the good news is we&#8217;re getting close. Like an old man with gross ears, all we need is a qtip!</p>
<h2>Step Whatever I&#8217;m On Now</h2>
<p>To get the tooltips, I used a plugin called <a href="http://craigsworks.com/projects/qtip/">qTip</a>. The developers of qTip are very smart, and also very excited to make sure we all know that qTip version two is coming out and version one will soon be obsolete. </p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/png2.png" alt="" title="png" width="765" height="260" class="aligncenter size-full wp-image-604" /></p>
<p>Okay, well, I guess I might be willing to test out some experimental software. After all, what could go wrong, right? Oh God!</p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/qtip.jpg" alt="" title="qtip" width="599" height="177" class="aligncenter size-full wp-image-606" /></p>
<p>This being a production site, I just decided to stick with version 1. In the end it worked out really nice like. </p>
<p>Once again, I inserted a bit of code to let my computer gnomes know that they needed to get off their lazy butts and do some work already. I&#8217;m not running a day care center here, after all, you freakin shiftless gnomes.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;example&quot;</span> type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> 
<span style="color: #006600; font-style: italic;">// Create the tooltips only when document ready</span>
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;">// Use the each() method to gain access to each elements attributes</span>
   jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'area'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</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>
      jQuery<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;">qtip</span><span style="color: #009900;">&#40;</span>
      <span style="color: #009900;">&#123;</span>
         content<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
            text<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&lt;img class=&quot;tipcontent&quot; src=&quot;punta-penca-views-s.jpg&quot;&gt;Punta Penca lots are among the most beautiful parcels of land in the world.'</span><span style="color: #339933;">,</span>
            title<span style="color: #339933;">:</span> <span style="color: #3366CC;">'Lot Number '</span> <span style="color: #339933;">+</span> jQuery<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;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'alt'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// Use the ALT attribute of the area map</span>
         <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
         style<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'cream'</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// Give it the preset cream style</span>
            border<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
               width<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> 
               radius<span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span> 
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 
            tip<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span> <span style="color: #006600; font-style: italic;">// Apply a tip at the default tooltip corner</span>
         <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
         hide<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> fixed<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> delay<span style="color: #339933;">:</span> <span style="color: #CC0000;">500</span> <span style="color: #009900;">&#125;</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>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>If you have any questions about the qTip options, just saunter on over to the <a href="http://craigsworks.com/projects/qtip/docs/">qTip documentation</a>. It&#8217;s very well done. Nice work, qTippers!</p>
<h2>Conclusion!</h2>
<p>And that, as they say, or would if you paid them enough, is that. The finished product looks something a little bit like this:</p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Screen-shot-2011-09-15-at-3.37.59-PM.png" alt="" title="Screen shot 2011-09-15 at 3.37.59 PM" width="600" height="476" class="aligncenter size-full wp-image-613" /></p>
<p>Notice that lot number 27 is highlighted, and there&#8217;s a sweet corresponding tooltip looking thing. With the options I have set for qTip, I can even put some clicky links and whatnot in the tip window if I want to. </p>
<p><a href="http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto-part-two" title="The Great jQuery Interactive Map Saga, a HowTo: Part Two"><br />
<h2>Update! Part Two now exists (and is awesome)</h2>
<p>Part Two is now complete</a>. Go forward and see how I hooked all this madness up to WordPress!</p>
<p>Now get back to work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/the-great-jquery-interactive-map-saga-a-howto/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How To Style Categories in BigCommerce</title>
		<link>http://www.hodgsonco.com/how-to-style-categories-in-bigcommerce</link>
		<comments>http://www.hodgsonco.com/how-to-style-categories-in-bigcommerce#comments</comments>
		<pubDate>Thu, 01 Sep 2011 22:48:59 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=552</guid>
		<description><![CDATA[In the past, I have had just about the same enthusiasm for setting up e-commerce solutions as I had for putting pine cones down my pants. Thankfully, the process has gotten a lot better in recent years. One solution I have been using is BigCommerce, originally recommended to me by my buddy Christopher Darrell. In [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/Ecommerce-Software.png" alt="" title="Ecommerce Software" width="291" height="65" class="alignright size-full wp-image-554" />In the past, I have had just about the same enthusiasm for setting up e-commerce solutions as I had for putting pine cones down my pants. Thankfully, the process has gotten a lot better in recent years. One solution I have been using is <a href="http://bigcommerce.com">BigCommerce</a>, originally recommended to me by my buddy Christopher Darrell. </p>
<p>In fact, I like them so much that I applied for and have been accepted to their &#8220;<a href="http://www.bigcommerce.com/partners/certified-resellers.php">Certified Partner Program</a>,&#8221; so I get a little slice of cheddar whenever I refer them. </p>
<p>The only thing that bugs me about BigCommerce is how zealous their control panel is about logging me out. If you&#8217;re idle for any length of time, say, because you&#8217;re editing HTML in another window, the BigCommerce control panel gets mad and takes its toys and goes home. I guess it&#8217;s a security measure so you don&#8217;t leave the window open at a public library and end up having some homeless guy&#8217;s poems for sale on your site, but it&#8217;s mildly annoying. </p>
<p>Just recently, one of my clients who is using BigCommerce asked if each of their product categories could be styled differently. It took me a little work to figure it out, but in the end it was not too tricky. Here&#8217;s how I did it. <a href="http://ckdake.com"></a></p>
<p>First of all, the whole process is streamlined heavily by three tools I use very often. Use these:</p>
<ol>
<li><a href="http://code.google.com/chrome/devtools/docs/overview.html">Chrome&#8217;s developer tools</a></li>
<li><a href="http://fetchsoftworks.com/">Fetch for Mac</a></li>
<li><a href="http://macromates.com/">Textmate</a></li>
</ol>
<p>PC people, I don&#8217;t know what to tell you. There are probably similar tools that match your <a href="http://www.hodgsonco.com/wp-content/uploads/2011/09/my-hair-is-aliens.jpeg">unnatural alien</a> ways, but I don&#8217;t know what they are. </p>
<h2>1. Download BigCommerce Template Files</h2>
<p>BigCommerce makes a zipfile available that is a big pile of all the template files you might need to change the look of your store. Just click on the word &#8220;Design&#8221; at the top of your control panel once you&#8217;re logged in, and then click the &#8220;Download Template Files&#8221; button. </p>
<div id="attachment_565" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-2.png" rel="lightbox"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-2-300x229.png" alt="" title="png-2" width="300" height="229" class="size-medium wp-image-565" /></a><p class="wp-caption-text">Click to Embiggen</p></div>
<h2>2. Log Into FTP</h2>
<div id="attachment_558" class="wp-caption alignright" style="width: 100px"><a href="http://www.hodgsonco.com/wp-content/uploads/2011/09/png.png" rel="lightbox"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-90x90.png" alt="" title="png" width="90" height="90" class="size-thumbnail wp-image-558" /></a><p class="wp-caption-text">Click to Embiggen</p></div>
<p>Now you gotta get logged into your BigCommerce FTP site. To find that information, log into your BigCommerce control panel, then click on Settings and FTP Settings as shown in the image at right. </p>
<p>Once you do that, you&#8217;ll see a screen that looks like the below image, except your info won&#8217;t be blurred out. If it is, you might want to clean your computer screen and maybe stop eating Spaghetti-O&#8217;s so close to it. </p>
<div id="attachment_563" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-1.png" rel="lightbox"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-1-300x234.png" alt="" title="png-1" width="300" height="234" class="size-medium wp-image-563" /></a><p class="wp-caption-text">Click to Embiggen</p></div>
<h2>3. Upload a copy of category.html</h2>
<p>Once you unzip the template files, make a copy of category.html. Call it whatever you want, but make sure it has an underscore as the first character, e.g. _custom_category.html. Now take that copy and upload that to your FTP site. Put it right into the directory that you are in when you log in. </p>
<p>Now just edit that sucker using Fetch and Textmate, and add an ID to the body tag like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
%%Panel.HTMLHead%%
&lt;body id=&quot;whatever&quot;&gt;&lt;!-- LOOKEY HERE. SEE WHAT I DID THERE? --&gt;
The rest of your template goes here.</pre></td></tr></table></div>

<p>What this does for you is it allows you to scope your CSS, a trick I learned from <a href="http://ckdake.com">Chris Kelly</a>, who has a great big brain. Like, way bigger than mine. </p>
<h2>4. Install your custom template</h2>
<p>Select your awesome template on the category page. Get there by clicking Products, then Categories, then Edit next to the proper category like so:</p>
<div id="attachment_574" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-3.png" rel="lightbox"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-3-300x229.png" alt="" title="png-3" width="300" height="229" class="size-medium wp-image-574" /></a><p class="wp-caption-text">Click to Embiggen</p></div>
<p>And then select your template here:</p>
<div id="attachment_580" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-41.png" rel="lightbox"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/09/png-41-300x229.png" alt="" title="png-4" width="300" height="229" class="size-medium wp-image-580" /></a><p class="wp-caption-text">Click to Embiggen</p></div>
<p>Aw yeah, now we&#8217;re ready to hack some CSS like it was our birthday, or something. </p>
<h2>5. Make a custom.css file</h2>
<p>Now all you have to do is upload a custom CSS file in the Styles directory of your BigCommerce FTP site, and then get jiggy with it like so</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Mmm, Beer! */</span>
body<span style="color: #cc00cc;">#beer</span> <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>  <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">Background.jpg</span><span style="color: #00AA00;">&#41;</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;Palatino Linotype&quot;</span><span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Book Antiqua&quot;</span><span style="color: #00AA00;">,</span> Palatino<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
body<span style="color: #cc00cc;">#beer</span> <span style="color: #cc00cc;">#Wrapper</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
body<span style="color: #cc00cc;">#beer</span> a<span style="color: #00AA00;">,</span>
body<span style="color: #cc00cc;">#beer</span> <span style="color: #6666ff;">.ProductPrice</span><span style="color: #00AA00;">,</span> 
body<span style="color: #cc00cc;">#beer</span> <span style="color: #6666ff;">.ProductList</span> em<span style="color: #00AA00;">,</span>
body<span style="color: #cc00cc;">#beer</span> <span style="color: #cc00cc;">#TopMenu</span> li div<span style="color: #00AA00;">,</span>
body<span style="color: #cc00cc;">#beer</span> <span style="color: #cc00cc;">#Footer</span> p<span style="color: #00AA00;">,</span> 
body<span style="color: #cc00cc;">#beer</span> <span style="color: #6666ff;">.SortBox</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">white</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>And that&#8217;s all she wrote, friends! Enjoy the fame and wealth that will pour into your life thanks to Internet Commerce!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/how-to-style-categories-in-bigcommerce/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Add An AgentShield Widget Area using Genesis Framework</title>
		<link>http://www.hodgsonco.com/how-to-add-an-agentshield-widget-area-using-genesis-framework</link>
		<comments>http://www.hodgsonco.com/how-to-add-an-agentshield-widget-area-using-genesis-framework#comments</comments>
		<pubDate>Wed, 31 Aug 2011 20:21:01 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=540</guid>
		<description><![CDATA[I came across AgentShield in the course of editing a WordPress site for one of my clients. The client in question is a real estate development company with some additional dabblings in vacation rental. AgentShield is basically a wrapper around a developer&#8217;s web site which hides the developer&#8217;s contact info, or replaces it with the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.agentshield.com/"><img src="http://www.hodgsonco.com/wp-content/uploads/2011/08/png.png" alt="" title="png" width="109" height="117" class="alignright size-full wp-image-541" /></a></p>
<p>I came across <a href="http://www.agentshield.com/">AgentShield</a> in the course of editing a WordPress site for one of my clients. The client in question is a real estate development company with some additional dabblings in vacation rental. </p>
<p>AgentShield is basically a wrapper around a developer&#8217;s web site which hides the developer&#8217;s contact info, or replaces it with the contact info of a sales agent. They do this because a real estate agent doesn&#8217;t want to show their client the developer&#8217;s web site, then have that client contact the developer directly and thus cut said agent out of the deal. </p>
<p>This way, the real estate agent doesn&#8217;t have to develop their own marketing materials about every new development. They can use the materials on that development&#8217;s site without fear of losing their leads. </p>
<p>Unfortunately, in my case, I was not aware of any of this, so when I made some changes to my clients site, I made them without adding new AgentShield code. Oops!</p>
<p>Thankfully, AgentShield employs a very helpful gentleman by the name of Jason Dolle, who sent me exactly the code I needed to fix everything up. Basically it consists of a div with a special class to wrap around anything we might want to hide. The div looks like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;agentshield_hide&quot;&gt;&lt;/div&gt;</pre></td></tr></table></div>

<p>They also have tags for adding contact forms that go to the agent and so on, but I&#8217;m going to concentrate on the hiding in this case. </p>
<p>So, one problem was that I added a <a href="http://mailchimp.com">MailChimp</a> WordPress widget to the sidebar. Everyone knows that MailChimp is awesome, but what&#8217;s not necessarily awesome is having a lead sign up to an email list they didn&#8217;t mean to. So, the block with the MC Signup widget needed to be hideable. </p>
<p>I made a brand new widget area for it. Note that I&#8217;m using a child theme for the Genesis plugin in this case, but regular WordPress should be pretty similar. Only the hook names should change (e.g. register_sidebar </p>
<p>1. I added the new widget area in the functions.php file. Note that there are before_widget and after_widget considerations for AgentShield.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">genesis_register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'Hidden Sidebar'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'description'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'This sidebar will be hidden by AgentShield'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_title'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'&lt;h4 class=&quot;widgettitle&quot;&gt;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'after_title'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'&lt;/h4&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;div class=&quot;agentshield_hide&quot;&gt;&lt;!-- Begin Agentshield--&gt;&lt;div class=&quot;widget&quot;&gt;&lt;div class=&quot;widget-wrap&quot;&gt;'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;/div&gt;&lt;!-- End AgentShield --&gt;&lt;/div&gt;&lt;/div&gt;'</span>
<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>2. I added that new widget area to the sidebar.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">add_action <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'genesis_before_sidebar_widget_area'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'hidebar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> hidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Hidden Sidebar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>3. I added my MailChimp widget to the new sidebar on the widgets page. </p>
<p><img src="http://www.hodgsonco.com/wp-content/uploads/2011/08/png-1.png" alt="" title="png-1" width="302" height="167" class="alignnone size-full wp-image-546" /></p>
<p>Aaaand bingo! That fixed &#8216;er all up. Now my client is happy, their agents are happy&#8230; everyone&#8217;s happy! Easy as pie!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/how-to-add-an-agentshield-widget-area-using-genesis-framework/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add an Image to a WordPress Post or Page</title>
		<link>http://www.hodgsonco.com/how-to-add-an-image-to-a-wordpress-post-or-page</link>
		<comments>http://www.hodgsonco.com/how-to-add-an-image-to-a-wordpress-post-or-page#comments</comments>
		<pubDate>Wed, 19 Jan 2011 14:30:04 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=397</guid>
		<description><![CDATA[This is a short video on how to add an image to a WordPress Post, and it also applies to adding images to WordPress pages. Check it out! www.youtube.com/watch?v=wvWG6NnPn2Q]]></description>
			<content:encoded><![CDATA[<p>This is a short video on how to add an image to a WordPress Post, and it also applies to adding images to WordPress pages. Check it out!</p>
<p><a href="http://www.youtube.com/watch?v=wvWG6NnPn2Q">www.youtube.com/watch?v=wvWG6NnPn2Q</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/how-to-add-an-image-to-a-wordpress-post-or-page/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails for Designers: Getting Stylish with ERB</title>
		<link>http://www.hodgsonco.com/ruby-on-rails-for-designers-getting-stylish-with-erb</link>
		<comments>http://www.hodgsonco.com/ruby-on-rails-for-designers-getting-stylish-with-erb#comments</comments>
		<pubDate>Sat, 15 Jan 2011 18:12:09 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=367</guid>
		<description><![CDATA[I just spent a week working with my friends at Highgroove studios &#8212; boom! &#8212; on one of their projects, and I learned a lot that I&#8217;d like to share. This is my second experience with design for rails and I&#8217;m slowly getting a grasp on how people who do that type of work operate. [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent a week working with my friends at <a href="http://highgroove.com">Highgroove studios</a> &#8212; boom! &#8212; on one of their projects, and I learned a lot that I&#8217;d like to share. This is my second experience with design for rails and I&#8217;m slowly getting a grasp on how people who do that type of work operate. Hopefully some other non-programmer types will find this helpful. </p>
<p>I&#8217;ve only used the <a href="http://corelib.rubyonrails.org/classes/ERB.html">ERB</a> (Embedded Ruby Templating) package so far, so I&#8217;ll concentrate on that. </p>
<p><strong>Installation</strong><br />
First check out the official guide on layouts and rendering here:<br />
<a href="http://guides.rubyonrails.org/layouts_and_rendering.html">http://guides.rubyonrails.org/layouts_and_rendering.html</a></p>
<p>Also let me direct your attention to <a href="http://net.tutsplus.com/tutorials/ruby/ruby-on-rails-for-designers/">this guide</a> on installing rails on Nettuts. It says it is for designers, but it looks like an install guide for sysadmins. If all that text frightens you as much as it does me, let me just go ahead and tell you that you&#8217;re going to be doing a lot of command line work. </p>
<p>Obviously, the best possible answer to this problem is to hire someone to do the text editing for you so you can concentrate on things like horn-rimmed glasses and the Helvetica typeface, but sometimes you just have to get your hands dirty your own self. </p>
<p>If you&#8217;re down with the CLI &#8212; <em>yeah you know I, uh.. am!</em> &#8211;then let&#8217;s move on.</p>
<p><strong>Tip Number One: Rails Layout</strong><br />
First of all, just be aware as you&#8217;re trying to apply your awesome design that the files you&#8217;ll need to edit are all over the place. I assume you&#8217;re already hip to either <a href="http://getfirebug.com/">Firebug</a> for Firefox and/or the <a href="http://code.google.com/chrome/devtools/">Chrome Developer Tools</a>. These will help show you what styles are being displayed for a given element, but you then have to track down in the code where that stuff is generated. </p>
<p>As you can see from the <a href="http://net.tutsplus.com/tutorials/ruby/ruby-on-rails-for-designers/">Nettuts tutorial</a>, there are a lot of directories going on, but if you&#8217;re just trying to apply a design you&#8217;re going to be mostly concerned with the /app/views/layouts directory. </p>
<p>The stylesheet and javascript files are located in /public/stylesheets/ and /public/javascripts/ respectively, but when its time to get down with the actual layouts, things get tricky</p>
<p><strong>Clues to Rails Files</strong><br />
Figuring out where to put CSS clases or IDs onto HTML tags so you can apply your styles can be a bit of a pig, but there are some clues. I referred often to the terminal window where I started rails server on my local machine. Every time you refresh the site, rails will tell you exactly what it is rendering from what files, like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">Started GET &quot;/user_session/new&quot; for 127.0.0.1 at Tue Jan 11 12:20:21 -0500 2011
  Processing by UserSessionsController#new as HTML
Rendered layouts/_header.html.erb (6.2ms)
  SQL (0.6ms)  SELECT COUNT(*) AS count_id FROM (LOL BORING SQL)) AS subquery
Rendered layouts/_navbar.html.erb (19.6ms)
Rendered layouts/_message.html.erb (2.7ms)
Rendered layouts/_noticeerror.html.erb (1.8ms)
Rendered layouts/_footer.html.erb (0.8ms)
Rendered user_sessions/new.html.erb within layouts/user_session (73.4ms)
Completed 200 OK in 243ms (Views: 83.5ms | ActiveRecord: 0.6ms)</pre></td></tr></table></div>

<p>If you&#8217;re familiar with templating, you&#8217;re straight away going to be looking for the master template file that tells everything where to be. Most of the time you&#8217;re going to have a file called /app/views/layouts/application.html.erb which is the one you&#8217;re looking for, but in this case, as you can see from line 9 above, there&#8217;s a different master layout file being used. Check this out:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>9
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">Rendered user_sessions/new.html.erb within layouts/user_session (73.4ms)</pre></td></tr></table></div>

<p>See how that says &#8220;layouts/user_session&#8221; instead of &#8220;layouts/application&#8221;? That&#8217;s because the controller, mentioned on line 2 of the server output, has this in it:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">class UserSessionsController &lt; ApplicationController
  layout &quot;user_session&quot;</pre></td></tr></table></div>

<p>You use controllers this way to tell ruby what layouts to load based on what got requested. Sneaky, huh? Now, let&#8217;s talk about partials.</p>
<p><strong>I&#8217;m partial to partials, and so is the marshall</strong><br />
Those files listed like this are partials:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">Rendered layouts/_header.html.erb (6.2ms)</pre></td></tr></table></div>

<p>You can tell because it has an underscore as the first character in the file name. You can also tell because you&#8217;ll see this in the master layout file that called it:</p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;%</span>= <span style="color:#5A0A0A; font-weight:bold;">render</span> <span style="color:#ff3333; font-weight:bold;">:partial</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'layouts/header'</span> <span style="color:#006600; font-weight:bold;">%&gt;</span></pre></div></div>

<p>A partial is a bit of layout code that you know you&#8217;ll be using again. You <a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself">don&#8217;t want to repeat yourself</a>, so if you discover a slice of templating code that is in more than one file, abstract that mother out to a partial and render it like a boss. That way you don&#8217;t have to change it more than once if you should need to. </p>
<p>Last, but not least, let&#8217;s talk about adding a class.</p>
<p><strong>How to add a class to a tag</strong><br />
You won&#8217;t see a lot of raw HTML in these .erb files. Instead you will see code like this that saves the developers a lot of time, but doesn&#8217;t include an obvious place to add a class selector so you can style whatever it is:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;%</span>= <span style="color:#5A0A0A; font-weight:bold;">form_for</span> <span style="color:#0066ff; font-weight:bold;">@user</span>, <span style="color:#ff3333; font-weight:bold;">:url</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> users_path <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
  <span style="color:#006600; font-weight:bold;">&lt;%</span>= f.<span style="color:#9900CC;">error_messages</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
  <span style="color:#006600; font-weight:bold;">&lt;%</span>= <span style="color:#5A0A0A; font-weight:bold;">render</span> <span style="color:#ff3333; font-weight:bold;">:partial</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;form&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:locals</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>:f <span style="color:#006600; font-weight:bold;">=&gt;</span> f<span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
  <span style="color:#006600; font-weight:bold;">&lt;%</span>= f.<span style="color:#9900CC;">submit</span> <span style="color:#996600;">&quot;Create&quot;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#006600; font-weight:bold;">%&gt;</span></pre></td></tr></table></div>

<p>If you want to add a class to that submit button so that it doesn&#8217;t look like a visual fart from 2002, just add this bit of magic to line 4:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>4
</pre></td><td class="code"><pre class="rails" style="font-family:monospace;">  <span style="color:#006600; font-weight:bold;">&lt;%</span>= f.<span style="color:#9900CC;">submit</span> <span style="color:#996600;">&quot;Create&quot;</span>, :<span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;class_name&quot;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span></pre></td></tr></table></div>

<p><strong>Conclusion</strong><br />
That&#8217;s pretty much all I know so far and I&#8217;m learning every time I dive into this stuff. Please help me by correcting or adding thoughts to anything I have written here! Thanks to <a href="http://ckdake.com">Chris Kelly</a> at <a href="http://highgroove.com">Highgroove</a> for fielding my questions during the week!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/ruby-on-rails-for-designers-getting-stylish-with-erb/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to start a blog</title>
		<link>http://www.hodgsonco.com/how-to-start-a-blog</link>
		<comments>http://www.hodgsonco.com/how-to-start-a-blog#comments</comments>
		<pubDate>Fri, 23 Oct 2009 03:20:29 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://www.hodgsonco.com/?p=254</guid>
		<description><![CDATA[Blogs are getting more and more popular every day, but the technical particulars on how to set one up can be a bit confusing. This guide aims to straighten out everything there is to know on how to set up a blog. If you find any of this confusing, then throw your computer out a [...]]]></description>
			<content:encoded><![CDATA[<p>Blogs are getting more and more popular every day, but the technical particulars on how to set one up can be a bit confusing. This guide aims to straighten out everything there is to know on how to set up a blog. If you find any of this confusing, then throw your computer out a window. </p>
<p>Just kidding! If this guide fails to straighten anything out, or you&#8217;d like someone to do the work for you, you can leave a comment on this post or get in touch with me at <a href="mailto:jim@hodgsonco.com">jim@hodgsonco.com</a> or by phone at <b>(404) 492-9692</b>. I&#8217;m your guy.  </p>
<p>But now, to business! First of all, you should think about how much control you&#8217;d like to have over the look and feel of your blog. If you are just starting out and you&#8217;ve never written a single word before, then I recommend that you start with a free blogging service to get your feet wet. The good news is, there are lots of free options. </p>
<h1>If you are brand new to Blogging&#8230;</h1>
<p>Did you keep a diary as a kid? Do you miss being able to write down all those weird feelings you have? Don&#8217;t lie, we all know you have wierd feelings!</p>
<p>If this blog is for writing those sorts of personal journal style entries only, then I suggest trying out these options:</p>
<ul>
<li><a href="http://www.livejournal.com/">Livejournal</a></li>
<li><a href="http://www.diaryland.com/">Diaryland</a></li>
</ul>
<p>On either of these sites, you&#8217;ll be given an address like http://newblog.diaryland.com where people can see what you are writing. They don&#8217;t really have an option (as far as I know) for using your own domain name. </p>
<p>As I said, these two sites are more for personal journal entries. They tend to emphasize the community of other journal writers around you. They offer the ability to do things like add friends and follow other people&#8217;s journals, as well as comment on entries and that sort of thing. They are both great choices to get started, but they might not be what you&#8217;re looking for if you are going for a more serious blog. </p>
<h1>I want to get a little more advanced!</h1>
<p>If you are starting something a little more serious like a blog for your work or a music review site, or you just want to be your own blog and not really part of a journal writing community, then there are some free services that cater to you as well. </p>
<ul>
<li><a href="http://blogger.com">Blogger</a></li>
<li><a href="http://wordpress.com">WordPress</a></li>
</ul>
<p>These two have the ability to look a little more serious, and provide some options for changing the look and feel of your blog using themes. Their free options, however, still don&#8217;t allow you to have your own domain name, so you will be http://newblog.wordpress.com or blogger.com. </p>
<p>Let&#8217;s have a quick disambiguation about WordPress.</p>
<blockquote class="definition"><p>
<a href="http://wordpress.com">WordPress</a> can refer to the site at <b>wordpress.com</b> where one can get a free blog, but more often when I am speaking of it I am referring to the free blog software that anyone can download and use on their own servers. It&#8217;s also called WordPress.
</p></blockquote>
<p>It should be said that one of my favorite blogs, <a href="http://bikesnobnyc.blogspot.com">BikeSnobNYC</a> has a wildly successful blog for free at Blogspot, appears regularly on NPR to talk about bikes, and has even been asked to write a regular column for Bicycling magazine. So, you can take a free blog without a custom domain name about as far as any blog can go. </p>
<h1>I want to be able to control everything&#8230;</h1>
<p>If you want some more control over your blog, and you want to be able to add things like themes and widgets, then you might consider some pay options. </p>
<p>Let me talk shortly about themes and widgets in case these terms are foreign to you. My experience is mostly with WordPress, so my definitions hover around that. </p>
<blockquote class="definition"><p>
A <a href="http://codex.wordpress.org/Using_Themes">theme</a> is a collection of PHP code and HTML code and CSS styles (in the case of WordPress themes) that tell the pages how to look. The page you are looking at now uses a custom WordPress theme designed by myself and my friend <a href="http://krautstache.com">Kurt Rampton</a>. If you want to have a lot of control over how your blog looks, you need theme capability.
</p></blockquote>
<blockquote class="definition"><p>
A <a href="http://codex.wordpress.org/WordPress_Widgets">widget</a> is a little snippet of code that does one thing in particular. For instance, you might see somewhere on this page the words &#8220;Recent posts&#8221;. The code that generates that list and updates it automatically when a new post gets made is a widget. There are widgets for everything. Search widgets, photo displaying widgets&#8230; anything you can think of.
</p></blockquote>
<p>If you look at <a href="http://www.bbbsba.org/volunteer">this page</a> on the site for Big Brothers Big Sisters of the Bay Area, a site I&#8217;m proud to have worked on, you&#8217;ll see a box with an orange tab at the top on the left hand side of the page that contains a photo that changes every time the page loads. That is a simple example of a widget. </p>
<p>So, if you&#8217;ve decided you want your own domain name, or you want a little more control over how your site looks and what it can do, or both, then you probably want to host your own blog. So, what does that entail?</p>
<p>Without getting into too much detail, there are three main pieces. You need to register a domain, you need a server to host that domain, and you need blog software on the server. </p>
<p>Here are some more quick definitions to help out a bit:</p>
<blockquote class="definition"><p>
A <a href="http://en.wikipedia.org/wiki/Domain_name">domain name</a> is an identification label that defines a realm of administrative autonomy, authority, or control in the Internet, based on the Domain Name System (DNS).
</p></blockquote>
<p>In this page&#8217;s case, <b>hodgsonco.com</b> is the domain name. If you already have a company domain name you might want to use what&#8217;s called a subdomain, such as blog.yourcompany.com. </p>
<p>The upshot is that your domain name is like your street address, but for the internet. </p>
<blockquote class="definition"><p>
A <a href="http://en.wikipedia.org/wiki/Server_%28computing%29">server</a> is an application running on a computer that delivers a service.
</p></blockquote>
<p>The word &#8220;Server&#8221; is also used to refer to the computer on which server software runs, which is the kind of thing that technical people come up with to confuse non-technical people. Haha, gotcha!</p>
<p>In my previous metaphor, if your domain name is like your street address, then the server is kind of like your house. </p>
<blockquote class="definition"><p>
Blog software, like <a href="http://www.hodgsonco.com/2009/07/why-wordpress-is-so-incredible/">WordPress</a>, works with the server software to deliver content, and with you to help write content.
</p></blockquote>
<p>Basically, blog software is like a liason. The server talks in markup language (HTML) that your browser understands, telling your browser how to display the words and pictures that make up a web page. You could write this code by hand, and in fact that&#8217;s how it&#8217;s been done everywhere until recently when blog software started getting so good, but it&#8217;s kind of nerdy. Not everyone knows how to do it. </p>
<p>WordPress makes writing posts and pages as easy as editing a Microsoft Word document, so you don&#8217;t need a lot of technical knowledge to keep your site updated, which is critical for your ranking in search engines. </p>
<p>To stretch my metaphor even further, WordPress is like the furnishings that you put inside your house. Sure you could live in your house without it, but it wouldn&#8217;t be as nice!</p>
<p>So, how to get these three pieces together?</p>
<p>The best thing you can do is get in touch with my friend Chris Kelly over at <a href="http://ithought.org">ithought.org</a>. He runs a one-man hosting operation, so if you send him an email you are emailing him personally and he gets back to you fast.  He lives and works right here in Atlanta, has competitive prices, and is a smart guy.</p>
<p>I have a thing for using small local companies whenever I can, probably because I AM a small local company, but if you like larger companies there are also some options for getting what you need all in one place. Here are two companies:</p>
<ul>
<li><a href="http://www.dreamhost.com/">Dreamhost</a></li>
<li><a href="http://1and1.com">1and1.com</a></li>
</ul>
<p>These guys both offer you the ability to sign up for a new domain name, which costs about $20 or so a year, sign up for your server for around $10 a month give or take, and install <a href="http://www.hodgsonco.com/2009/07/why-wordpress-is-so-incredible/">WordPress</a> with a few clicks. They&#8217;ll handle renewing your domain and even upgrading the WordPress software for you. The WordPress software itself is free of charge. </p>
<p>Once that&#8217;s done, you will have a lot of options in <a href="http://www.hodgsonco.com/2009/07/why-wordpress-is-so-incredible/">WordPress</a> for things like naming your blog, choosing a theme, and then customizing your theme, but I&#8217;ll cover that stuff another time. </p>
<p>So, that&#8217;s my page on how to start a blog! Thanks for reading. Of course if you need custom themes or help with anything to do with the internet or social media, I can help, so leave a comment here, <a href="mailto:jim@hodgsonco.com">email me,</a> or call me up at 404.388.6951.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/how-to-start-a-blog/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to add a post to your WordPress blog</title>
		<link>http://www.hodgsonco.com/how-to-add-a-post-to-your-wordpress-blog</link>
		<comments>http://www.hodgsonco.com/how-to-add-a-post-to-your-wordpress-blog#comments</comments>
		<pubDate>Wed, 29 Jul 2009 16:04:06 +0000</pubDate>
		<dc:creator>jim</dc:creator>
				<category><![CDATA[HowTo]]></category>

		<guid isPermaLink="false">http://www.wangwins.com/?p=143</guid>
		<description><![CDATA[Adding a post to a WordPress site is as easy as falling off a log. You are going to love it. The first thing to do is login with your username and password on the screen that looks like the one pictured here. You should already have a username and password. If you don&#8217;t, talk [...]]]></description>
			<content:encoded><![CDATA[<p>Adding a post to a WordPress site is as easy as falling off a log. You are going to love it.</p>
<p>The first thing to do is login with your username and password on the screen that looks like the one pictured here. </p>
<div id="attachment_144" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.wangwins.com/wp-content/uploads/2009/07/login.png" rel="lightbox"><img class="size-medium wp-image-144" title="login" src="http://www.wangwins.com/wp-content/uploads/2009/07/login-300x230.png" alt="Wordpress login screen" width="300" height="230" /></a><p class="wp-caption-text">Wordpress login screen</p></div>
<p>You should already have a username and password. If you don&#8217;t, talk to whoever has the admin account on your blog. If you&#8217;re one of my clients, talk to me!</p>
<p>If you&#8217;re not one of my clients, still talk to me!</p>
<p>Once you are logged in, you will be looking at the main dashboard screen as pictured here.</p>
<div id="attachment_145" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.wangwins.com/wp-content/uploads/2009/07/clickpostsorusequickpost.png" rel="lightbox"><img class="size-medium wp-image-145" title="clickpostsorusequickpost" src="http://www.wangwins.com/wp-content/uploads/2009/07/clickpostsorusequickpost-300x187.png" alt="Click posts or uses Quick Post" width="300" height="187" /></a><p class="wp-caption-text">Click posts or uses Quick Post</p></div>
<p>You want to either click on Posts, then &#8220;Add New&#8221; under Posts, or use the Quickposts section. The Quickposts form is great for, as you might imagine, quickly adding a post to your blog, but it doesn&#8217;t allow you to choose the category that post will go into.</p>
<p>Most of the time this will be fine to use, and you can always change the category of the post that gets added with it later on, so Quick Post might be a good, fast option most of the time. Try it and see if it works out.</p>
<p>If things don&#8217;t show up where you think they should, don&#8217;t worry. <a href="mailto:jim@wangwins.com">Get in touch</a> with me and we&#8217;ll get you back on track.</p>
<p>If you don&#8217;t like the cut of Quick Post&#8217;s jib, use the main posting screen by choosing &#8220;Add New&#8221; under the Posts section in the menu bar on the left. That will take you to a screen that looks like this.</p>
<div id="attachment_146" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.wangwins.com/wp-content/uploads/2009/07/postwindow.png" rel="lightbox"><img class="size-medium wp-image-146" title="postwindow" src="http://www.wangwins.com/wp-content/uploads/2009/07/postwindow-300x198.png" alt="The post window" width="300" height="198" /></a><p class="wp-caption-text">The post window</p></div>
<p>Once here, just add your title and type your content. Getting familiar with the content editor is important to maximize the use of WordPress. It is a lot like a word processing program such as Word, only better because it produces clean HTML that won&#8217;t cause web browsers to cry.</p>
<p><em><strong>Note:</strong></em>Please be careful with using Microsoft products for pasting in copy. Microsoft adds HTML code behind the scenes that causes all kinds of havoc in non-IE browsers as well as IE. I&#8217;m told that sometimes pasting the stuff you want to use into Notepad, then selecting it again and copying it a second time removes a lot of this stuff, but I can&#8217;t vouch for the accuracy of this method.</p>
<p>Once you have a title and some content that you are happy with, try using the Media editor to add some photos to your post. This is another great feature of WordPress that you are going to love. To get started with it, click on the little icons to the right of the words &#8220;Upload/Insert&#8221; just above the content editor.</p>
<p>And once that&#8217;s all done, you are done editing! Now all we need to do is select a category and then publish this bad boy.</p>
<div id="attachment_147" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.wangwins.com/wp-content/uploads/2009/07/categories.png" rel="lightbox"><img class="size-medium wp-image-147" title="categories" src="http://www.wangwins.com/wp-content/uploads/2009/07/categories-300x205.png" alt="Editing categories on the posts screen" width="300" height="205" /></a><p class="wp-caption-text">Editing categories on the posts screen</p></div>
<p>You can see here that the Categories area, bottom right, is highlighted. You may never have to use this, but on some blogs it is useful. Notice here on the East Atlanta Kids Club blog that there is a category for Features and one for News. In their case, a new news item will go into the Features category, and then later on move into News when there is a new feature.</p>
<p>Different categories sometimes mean that the content is displayed different places, especially on templates that I have implemented, so look for that.</p>
<p>As always, if there are any further questions, do not hesitate to give me a ring at 404 492 9692 or send me an email at <a href="mailto:jim@hodgsonco.com">jim@hodgsonco.com</a>.</p>
<p>We&#8217;ll get you all straightened out in no time!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hodgsonco.com/how-to-add-a-post-to-your-wordpress-blog/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

