<?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>Clayton McIlrath</title>
	<atom:link href="http://thinkclay.com/feed" rel="self" type="application/rss+xml" />
	<link>http://thinkclay.com</link>
	<description>Creative Media Design, Powered by Wordpress</description>
	<lastBuildDate>Tue, 09 Mar 2010 02:26:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Getting Started with Facebook JS (FBJS)</title>
		<link>http://thinkclay.com/technology/getting-started-with-facebook-js-fbjs</link>
		<comments>http://thinkclay.com/technology/getting-started-with-facebook-js-fbjs#comments</comments>
		<pubDate>Thu, 25 Feb 2010 05:16:13 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[FBJS]]></category>
		<category><![CDATA[front-end]]></category>
		<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=1314</guid>
		<description><![CDATA[<a href="http://thinkclay.com/technology/getting-started-with-facebook-js-fbjs"><img src="http://thinkclay.com/wp-content/uploads/2010/02/facebook-js-fbjs.jpg" alt="" title="facebook-js-fbjs" width="300" height="200" class="alignleft" /></a>
I’ve only recently started developing Facebook Apps and being a strong front-end developer I was confident that I would be able to pickup FBJS quickly. My confidence what short-lived however, once i discovered that Facebook had a very restricting framework and cache system that would make JS programming something quite a bit less desirable than awesome frameworks like jQuery.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve only recently started developing Facebook Apps and being a strong front-end developer I was very confident that I would be able to pickup FBJS quickly like I have with many other Javascript Frameworks. My confidence what short-lived however, once I discovered that Facebook had a very restricting framework and cache system that would make JS programming something quite a bit less desirable than awesome frameworks like jQuery or Prototype</p>
<h3>What you CAN&#8217;T do in FBJS</h3>
<p>I learned very quickly, that Facebook JavaScript does not allow some very common native functions such as onload, arrays and alerts as well as access to many properties of the document or window level of the DOM. There are workarounds and alternative methods that you can use instead:</p>
<h4>window.onload in FBJS</h4>
<p>Instead of using <em>window.onload</em> to initialize your functions, use <em>setTimeout</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">setTimeout<span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>  <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Even an empty setTimout at the beginning of your script will kick start your functions which would normally auto init (this seems to work fine in tabs, but not so much in canvas).</p>
<h4>alert alternative for FBJS</h4>
<p>Since you can&#8217;t use alert or document.write, use Facebook&#8217;s dialog box:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">new</span> Dialog<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">showMessage</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Dialog'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'This is text'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>document.write alternative for FBJS</h4>
<p>Since you don&#8217;t have access to the document or window levels of the DOM, you&#8217;ll want to setup a little include for testing. I drop in this code when i want to quickly output:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script&gt;
function logOutput(){
    var text = &quot;This will be inserted into my log div&quot;;
    document.getElementById('log').setTextValue(text);
}
&lt;/script&gt;
&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;</pre></div></div>

<h4>Trouble with JS Arrays in Facebook</h4>
<p>For whatever reason, facebook also decided to rip out support for creating objects which also eliminated the way most of us make arrays:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// new Array() is not supported in FBJS</span>
<span style="color: #003366; font-weight: bold;">var</span> myarray <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>  
myarray<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'stuff'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// or</span>
myarray<span style="color: #009900;">&#91;</span><span style="color: #3366CC;">'foo'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'bar'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// or </span>
myarray.<span style="color: #660066;">push</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'another example'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>More to come as I wrestle further with Facebook. Any tips or comments are greatly appreciated!</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/getting-started-with-facebook-js-fbjs/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Valentines Day Fonts and Wallpapers</title>
		<link>http://thinkclay.com/creativity/valentines-day-design-fonts-wallpapers-graphics</link>
		<comments>http://thinkclay.com/creativity/valentines-day-design-fonts-wallpapers-graphics#comments</comments>
		<pubDate>Wed, 10 Feb 2010 10:02:58 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Creativity]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[wallpaper]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=637</guid>
		<description><![CDATA[<a href="http://thinkclay.com/creativity/valentines-day-design-fonts-wallpapers-graphics"><img class="alignleft" src="http://thinkclay.com/timthumb.php?src=http://thinkclay.com/wp-content/uploads/2008/11/vday-2009.png&#38;w=300&#38;h=200&#038;zc=1" alt="Valentines Day Graphic" /></a>
With <strong>Valentines Day</strong> coming up, some are probably looking for cutesy <strong>wallpapers</strong> and frilly <strong>fonts</strong>, and others are panicking and trying to decide what they're going to get their significant other for <strong>Valentines Day</strong>. Well fear and look no more, I've got a little collection for you to get started with.]]></description>
			<content:encoded><![CDATA[<p>With <strong>Valentines Day</strong> coming up, some are probably looking for cutesy <strong>wallpapers</strong> and frilly <strong>fonts</strong>, and others are panicking and trying to decide what they&#8217;re going to get their significant other for <strong>Valentines Day</strong>. Well fear and look no more, I&#8217;ve got a little collection for you to get started with.</p>
<h3>Valentines Day Fonts</h3>
<p><a href="http://www.dafont.com/valentine.font"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/picture-2.png&amp;w=470&amp;h=50" alt="Valentines Day Graphic Font" title="Valentines Day Graphic Font" /></a></p>
<p><a href="http://www.dafont.com/valentine-tw.font"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/picture-3.png&amp;w=470&amp;h=50" alt="valentines day girl font" title="valentines day font girly" /></a></p>
<p><a href="http://www.dafont.com/clb-valentine.font"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/picture-4.png&amp;w=470&amp;h=50" alt="Valentines Day Font with Roses" title="Valentines Day Font - Roses" /></a></p>
<p><a href="http://www.dafont.com/kr-valentine-heart.font"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/picture-5.png&amp;w=470&amp;h=50" alt="Valentines Day Font with Frilly Hearts" title="Valentines Day Font - Frilly Hearts" /></a></p>
<h3>Valentines Day Graphics (vector)</h3>
<p><a href="http://www.vecteezy.com/vf/842-HeartVectors"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/val_vec.gif&amp;w=135&amp;h=135&#038;zc=1" alt="valentines hearts" title="valentines day hearts vector" class="size-thumbnail" /></a><a href="http://www.vecteezy.com/vf/843-Grungehearts"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/vecteezy2.jpg&amp;w=135&amp;h=135&#038;zc=1" alt="grunge hearts" title="valentines day grunge hearts" class="size-thumbnail" /></a><a href="http://www.vecteezy.com/vf/792-Hearts"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/heartspre.jpg&amp;w=135&amp;h=135&#038;zc=1" alt="odd valentines day hearts" title="valentines day hearts" class="size-thumbnail" /></a></p>
<h3>Valentines Day Wallpapers</h3>
<p><a href="http://thinkclay.com/wp-content/uploads/2008/11/vday-2009.png"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2008/11/vday-2009.png&amp;w=135&amp;h=135" alt="Valentines Day 2009 Wallpaper" title="Valentines Day Wallpaper" class="size-thumbnail" /></a><a href="http://thinkclay.com/wp-content/uploads/2009/02/almost_perfected_by_divineerror.jpg"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/almost_perfected_by_divineerror.jpg&amp;w=135&amp;h=135" alt="Valentines Day - Almost Perfect" title="almost perfect valentines day" class="size-thumbnail" /></a><a href="http://thinkclay.com/wp-content/uploads/2009/02/valentines___by_kwedo.jpg"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/valentines___by_kwedo.jpg&amp;w=135&amp;h=135" alt="Valentines Day Candy Wallpaper" title="Candy Valentines Day" class="size-thumbnail" /></a><a href="http://thinkclay.com/wp-content/uploads/2009/02/happy_valentine__s_day_by_armene.jpg"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/happy_valentine__s_day_by_armene.jpg&amp;w=135&amp;h=135" alt="A valentines day card for men" title="Happy Valentines Day - For Guys"  class="size-thumbnail" /></a><a href="http://thinkclay.com/wp-content/uploads/2009/02/valentines_day_by_villanitadesign.jpg"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/valentines_day_by_villanitadesign.jpg&amp;w=135&amp;h=135" alt="Retro Valentines Day Wallpaper" title="Valentines Day - Retro Wallpaper"  class="size-thumbnail" /></a><a href="http://thinkclay.com/wp-content/uploads/2009/02/happy_valentines_day_by_plusone.jpg"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/02/happy_valentines_day_by_plusone.jpg&amp;w=135&amp;h=135" alt="Heart being shot at" title="Killer Valentines Day"  class="size-thumbnail" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/creativity/valentines-day-design-fonts-wallpapers-graphics/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to start a successful blog</title>
		<link>http://thinkclay.com/news/how-to-start-a-successful-blog</link>
		<comments>http://thinkclay.com/news/how-to-start-a-successful-blog#comments</comments>
		<pubDate>Sun, 31 Jan 2010 20:35:40 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[goals]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=1275</guid>
		<description><![CDATA[It&#8217;s been a year and a half since i started this blog, and it&#8217;s amazing to look at how far I&#8217;ve come. This blog started out as a playground, where my best designs were wallpapers and my experience with development was limited to mostly front-end. In those days, I was proud of my average of [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a year and a half since i started this blog, and it&#8217;s amazing to look at how far I&#8217;ve come. This blog started out as a playground, where my best designs were wallpapers and my experience with development was limited to mostly front-end. In those days, I was proud of my average of 30-40 hits per day, and now I&#8217;m surprised if my traffic falls below 250 in a single day. The point I&#8217;m coming to is this.. blogging takes <strong>time</strong>, <strong>effort</strong> and <strong>consistency</strong> all of which make a three-legged stool. The stool cannot stand if all three legs aren&#8217;t relatively even, and as a tribute to the wisdom and knowledge I&#8217;ve retained from the past year; I&#8217;d like to share some key points on starting/maintaining a successful blog.</p>
<h3>Doing your time</h3>
<p>Regardless of having one writer or multiple writers for a blog, it&#8217;s going to take a hefty amount of effort and time to build up your blogs content and traffic. One of the areas I attribute a lot of the success of this blog to is the time dedication I&#8217;ve had. I dropped other hobbies like playing guitar and watching TV to start blogging and reading more. This has been the key to my growth as a person and having one leg of my stool strong as steel. To make sure you put in the right amount of time, trying pacing yourself, or joining in a group like project 52, where you dedicate to writing one post per week. Just remember one important rule.. too much will cause readers to flee and too little will fail to attract them. I think once a week is a good frequency for a new blog.</p>
<h3>Putting in the effort</h3>
<p>You may be thinking, &#8220;isn&#8217;t putting in time the same as putting in effort?&#8221; .. and the answer is NO. Putting in effort usually means research, capital, and marketing. To run a successful blog, you need a few ingredients to help you along the way such as a professional design, an understanding of SEO, and the right marketing tools such as twitter and facebook. Putting in effort is somewhat misleading, because some of the effort is external, but it all comes back to you. Any money or learning you put into your blog is an effort that will help you keep this leg balanced. As I mentioned with time.. a weekly schedule to teach yourself something new will really help you along.</p>
<h3>Remaining Consistent</h3>
<p>I see two very common mistakes relating to consistency:</p>
<p><strong>Scenario A</strong> involves traffic, a blogger (whether new or veteran) sees the blog as a failure because traffic is low and doesn&#8217;t seem to be climbing. The worst thing you could do in Scenario A is give up on it. Think of a blog as real estate or stock.. it&#8217;s value may fluctuate significantly, but if you look at the course and direction of the internet as a whole, it&#8217;s value is always increasing. If you look at the short term, you&#8217;ll see failure, but dedication and consistency will almost always prove successful (combine that with a good exit strategy and you have yourself a business plan).</p>
<blockquote><p>Hype is like dessert: most of the time it&#8217;s incredible, but too much will make you sick</p></blockquote>
<p><strong>Scenario B</strong> involves lack of time or effort. Yes, I&#8217;m aware I&#8217;ve already mentioned these two points, but bare with me. If you&#8217;re putting a lot of time into your blog and it&#8217;s not growing you may be focusing on the wrong areas. I see lots of blog focus on social media or spend loads of money on advertising, and they feel highly successful because they see their numbers jump.. for a while. The problem is people get bored with hype, it&#8217;s like dessert: really great, but too much or too often will make you sick of it. People need meat and potatoes in their diet. Many loyal readers will favor quality over quantity. My site for example rivals others that have 300+ posts and write daily.. yet it only has around 60 posts.</p>
<h3>Put it all together</h3>
<p>The last piece is a not-so-secret ingredient, and doesn&#8217;t need a paragraph to explain.. you have to be passionate about what you share. Blogs can definitely be profitable, but if you content doesn&#8217;t communicate passion and true interest, people aren&#8217;t going to be interested in what you have to say. Write to share about what you love, not to make money. Once you&#8217;ve built up a successful blog of loyal readers, then try and strategize the financial successes. I&#8217;m sure other bloggers would tell you differently, but I&#8217;m telling you from my experience that heart has more value than profits. If you enjoy what you do, there&#8217;s no price that can replace that.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/news/how-to-start-a-successful-blog/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New MSU Spartans Logo</title>
		<link>http://thinkclay.com/creativity/new-msu-spartans-logo</link>
		<comments>http://thinkclay.com/creativity/new-msu-spartans-logo#comments</comments>
		<pubDate>Fri, 22 Jan 2010 02:36:15 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Creativity]]></category>
		<category><![CDATA[digital art]]></category>
		<category><![CDATA[graphic design]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=1240</guid>
		<description><![CDATA[<a href="http://thinkclay.com/creativity/new-msu-spartans-logo" title="New MSU Logo"><img src="http://thinkclay.com/wp-content/uploads/2010/01/msu-spartan-logo.jpg" alt="MSU Spartan Logos" title="MSU Spartan Logos" width="300" height="200" class="alignleft" /></a>
There's been a lot of speculation and arguing about the possibility of a "new" <a href="http://blog.mlive.com/ganggreen/2010/01/michigan_state_spartans_to_unv.html">logo design for MSU Spartans</a> (see the <a href="http://tarr.uspto.gov/servlet/tarr?regser=serial&#038;entry=77900317">trademark registration</a> and make your own guess as to why it exists). I won't spend a lot of time trying to speculate whether or not MSU is indeed changing their logo, but if I had a say, I would propose a cross between the original logo and the new trade mark...]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s been a lot of speculation and arguing about the possibility of a &#8220;new&#8221; <a href="http://blog.mlive.com/ganggreen/2010/01/michigan_state_spartans_to_unv.html">logo design for MSU Spartans</a> (see the <a href="http://tarr.uspto.gov/servlet/tarr?regser=serial&#038;entry=77900317">trademark registration</a> and make your own guess as to why it exists). I won&#8217;t spend a lot of time trying to speculate whether or not MSU is indeed changing their logo, but if I had a say, I would propose a cross between the original logo and the new trade mark (image shows original, new, and mine from left to right):</p>
<p><img src="http://thinkclay.com/wp-content/uploads/2010/01/msu-spartan-logo.png" alt="New MSU Spartans Logo" title="New MSU Spartans Logo" width="476" height="191" /></p>
<p>Or go a whole new direction completely and lose the plume:</p>
<p><img src="http://thinkclay.com/wp-content/uploads/2010/01/new-msu-logo.png" alt="New MSU Logo" title="New MSU Logo" width="476" height="154" /></p>
<p>What are your thoughts?</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/creativity/new-msu-spartans-logo/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Magento: Add New CMS Page Layout</title>
		<link>http://thinkclay.com/technology/magento-add-new-cms-page-layout</link>
		<comments>http://thinkclay.com/technology/magento-add-new-cms-page-layout#comments</comments>
		<pubDate>Mon, 14 Dec 2009 15:16:32 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=1221</guid>
		<description><![CDATA[<a href="http://thinkclay.com/technology/magento-add-new-cms-page-layout"><img src="http://thinkclay.com/timthumb.php?src=/wp-content/uploads/2009/12/Screen-shot-2009-12-14-at-8.05.52-AM.png&#38;w=300&#38;h=200&#038;zc=1" alt="Add a new CMS Page Layout" title="Add a new CMS Page Layout" class="alignleft" /></a>
Want to take your Magento Themes to the next level? Have multiple layouts? If you're looking to <strong>add a new page layout in Magento</strong>, <strong>create a custom layout</strong> or <strong>create a new theme layout</strong> then this solution is probably for you.]]></description>
			<content:encoded><![CDATA[<p>Want to take your Magento Themes to the next level? Have multiple layouts? If you&#8217;re looking to <strong>add a new page layout in Magento</strong>, <strong>create a custom layout</strong> or <strong>create a new theme layout</strong> then this solution is probably for you.</p>
<p><img src="http://thinkclay.com/wp-content/uploads/2009/12/Screen-shot-2009-12-14-at-8.05.52-AM.png" alt="Add a new CMS Page Layout" title="Add a new CMS Page Layout" width="476" height="268" /></p>
<p>First we have to create a module. Create file: <em>app/etc/modules/Mage_Page.xml</em></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Mage_Page<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;active<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/active<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;codePool<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>local<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/codePool<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Mage_Page<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Then copy this whole folder: <em>app/code/core/Mage/Page</em> to <em>app/code/local/Mage</em></p>
<p>What we&#8217;ve done is taken a core module and copied it into our local module. This lets us override any core functionality without have to worry about it breaking in future update (or undoing if you mess up).</p>
<p>Now we need to edit: <em>app/code/core/Mage/Page/etc/config.xml</em> and look around line 46 and you can define your own layout, I&#8217;m going to call mine &#8220;home&#8221;</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;layouts<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;home</span> <span style="color: #000066;">module</span>=<span style="color: #ff0000;">&quot;page&quot;</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Home<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page/home.phtml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page_home<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/home<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;empty</span> <span style="color: #000066;">module</span>=<span style="color: #ff0000;">&quot;page&quot;</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Empty<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page/one-column.phtml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page_empty<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/empty<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;one_column</span> <span style="color: #000066;">module</span>=<span style="color: #ff0000;">&quot;page&quot;</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1 column<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page/1column.phtml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page_one_column<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/one_column<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;two_columns_left</span> <span style="color: #000066;">module</span>=<span style="color: #ff0000;">&quot;page&quot;</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2 columns with left bar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page/2columns-left.phtml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page_two_columns_left<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/two_columns_left<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;two_columns_right</span> <span style="color: #000066;">module</span>=<span style="color: #ff0000;">&quot;page&quot;</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2 columns with right bar<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page/2columns-right.phtml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page_two_columns_right<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/two_columns_right<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;three_columns</span> <span style="color: #000066;">module</span>=<span style="color: #ff0000;">&quot;page&quot;</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>3 columns<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page/3columns.phtml<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/template<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>page_three_columns<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/layout_handle<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/three_columns<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/layouts<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Now all you have to do is make a template for this page. Navigate to your theme directory: <em>app/design/frontend/YOUR_THEME/YOUR_THEME/template/page/</em> and create a new template called <em>home.phtml</em>. I suggest using another existing template as a starting point, such as <em>3columns.phtml</em> so that you know what variables to work around. This will <strong>enable a custom layout option for CMS pages</strong> once you&#8217;re finished. I&#8217;ve tested this with 1.3 series but nothing previous or after that. If you have any comments or questions feel free to post them here or read the <a href="http://www.magentocommerce.com/boards/viewthread/1406/P30/">forum</a> on Magento&#8217;s site for more details.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/magento-add-new-cms-page-layout/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing Zend Framework on MAMP</title>
		<link>http://thinkclay.com/technology/installing-zend-framework-on-mamp</link>
		<comments>http://thinkclay.com/technology/installing-zend-framework-on-mamp#comments</comments>
		<pubDate>Wed, 09 Dec 2009 03:23:28 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[MAC]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=1209</guid>
		<description><![CDATA[As usual, I'm sharing a solution a problem that I personally encountered and couldn't find a great solution for. So I've been using my laptop more and more as my local development environment in order to keep things private and secure while in the dev stage. Among learning how to fully utilize SVN locally, I've been trying to setup my laptop to be a fully functional server while also being extremely easy to maintain and change my environment on the fly. To do this, I'm running MAMP (Mac Apache MySQL PHP) available for free at <a href="http://mamp.info">mamp.info</a> as well as the Zend Framework bundled with Zend Tool. ]]></description>
			<content:encoded><![CDATA[<p>As usual, I&#8217;m sharing a solution a problem that I personally encountered and couldn&#8217;t find a great solution for. So I&#8217;ve been using my laptop more and more as my local development environment in order to keep things private and secure while in the dev stage. Among learning how to fully utilize SVN locally, I&#8217;ve been trying to setup my laptop to be a fully functional server while also being extremely easy to maintain and change my environment on the fly. To do this, I&#8217;m running MAMP (Mac Apache MySQL PHP) available for free at <a href="http://mamp.info">mamp.info</a> as well as the <strong>Zend Framework</strong> bundled with <strong>Zend Tool</strong>. </p>
<ol>
<li>Get MAMP up and running, no special setup is needed here.</li>
<li>Download <a href="http://framework.zend.com/download/latest">Zend Framework</a> and place it wherever you&#8217;d like. I actually retrieved my copy via SVN so that I can easily upgrade it later. To do this open up terminal and follow these commands:
<pre>
cd /Applications/MAMP/
mkdir svn
cd svn
mkdir zendframework
cd zendframework
svn checkout http://framework.zend.com/svn/framework/standard/trunk
</pre>
</li>
<li>Now open your php.ini file located under <em>/Applications/MAMP/conf/php5/php.ini</em></li>
<li>Search for <strong>include_path</strong> (around line 411 on mine) and add the location of your zend framework:
<pre>include_path = ".:/usr/lib/php:/usr/local/lib/php:/Applications/MAMP/svn/zendframework/trunk/library"</pre>
<p>Make sure to include the <em>library</em> directory otherwise you&#8217;ll <strong>get a blank page in Zend Framework</strong>
</li>
<li>Zend Framework also comes with a shell script that will help you with RAD (Rapid Application Deployment), you can create a shortcut to Zend Tools in terminal by adding an alias to your profile under /etc/profile (thanks DS for pointing this out) and make sure to restart terminal after you&#8217;ve done so:
<pre>alias zf=/Applications/MAMP/svn/zendframework/trunk/bin/zf.sh</pre>
</li>
<li>Test if the Zend Tool is installed correctly by showing the version:
<pre>zf show version</pre>
</li>
<li>Finally navigate to the directory you&#8217;d like to create your first project in:
<pre>cd /Applications/MAMP/htdocs/</pre>
<p>and with Zend Tool creating a project is simple:</p>
<pre>zf create project test</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/installing-zend-framework-on-mamp/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Magento Custom Status in Admin</title>
		<link>http://thinkclay.com/technology/magento-custom-status-in-admin</link>
		<comments>http://thinkclay.com/technology/magento-custom-status-in-admin#comments</comments>
		<pubDate>Mon, 07 Dec 2009 19:19:07 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=1199</guid>
		<description><![CDATA[<img src="http://thinkclay.com/wp-content/uploads/2009/12/magento-order-status.png" alt="magento order status" title="magento order status" width="300" height="200" class="alignleft" />
After my own frustrations and time wasted trying to solve an issue that Magento's core really should handle better, I finally found a way to enable all custom statuses and manual overrides on Sales/Orders.  This little tutorial will help you setup a module to override the core and hopefully help you find peace to a very frustrating issue in the core.]]></description>
			<content:encoded><![CDATA[<p>I had to wrestle with a magento issue recently and thought it would be good the share my problem and solution with the rest of you. If you&#8217;re looking to <strong>set custom status in magento</strong>, <strong>create custom status in magento</strong> or <strong>control order status</strong> then this solution is probably for you.</p>
<p><img src="http://thinkclay.com/wp-content/uploads/2009/12/custom-order-status.png" alt="custom order status in Magento" title="custom order status" width="470" height="223" class="alignnone size-full wp-image-1206" /></p>
<p>First we have to create a module. Create file: <em>app/etc/modules/Mage_Sales.xml</em></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Mage_Sales<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;active<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/active<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;codePool<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>local<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/codePool<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Mage_Sales<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modules<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/config<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Then copy this whole folder: <em>app/code/core/Mage/Sales</em> to <em>app/code/local/Mage</em></p>
<p>What we&#8217;ve done is taken a core module and copied it into our local module. This lets us override any core functionality without have to worry about it breaking in future update (or undoing if you mess up).</p>
<p>Now we need to edit: <em>app/code/core/Mage/Sales/etc/config.xml</em> and look around line 544 and you&#8217;ll want to replace  tags with:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;order<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Pending<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/pending<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending_paypal</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Pending PayPal<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/pending_paypal<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;processing</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Processing<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/processing<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;holded</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>On Hold<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/holded<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;complete</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Complete<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/complete<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;closed</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Closed<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/closed<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;canceled</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Canceled<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/canceled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;states<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;new</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span> 
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>New<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;processing</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;holded</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;complete</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;closed</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;canceled</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/new<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Pending<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;processing</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;holded</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;complete</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;closed</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;canceled</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/pending<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;processing</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Processing<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;processing</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;holded</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;complete</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;closed</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;canceled</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/processing<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;complete</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Complete<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;complete</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;processing</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;holded</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;closed</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;canceled</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/complete<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;closed</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Closed<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;processing</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;holded</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;complete</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;closed</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;canceled</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/closed<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;canceled</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>Canceled<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;processing</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;holded</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;complete</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;closed</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;canceled</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/canceled<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;holded</span> <span style="color: #000066;">translate</span>=<span style="color: #ff0000;">&quot;label&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>On Hold<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/label<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;pending</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;processing</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;holded</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;complete</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;closed</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;canceled</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/statuses<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/holded<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/states<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/order<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><img src="http://thinkclay.com/wp-content/uploads/2009/12/Screen-shot-2009-12-07-at-11.55.40-AM.png" alt="order status" title="order status" width="124" height="247" class="alignleft" /><br />
This will <strong>enable all default magento statuses</strong> on the order page. In edition to enabling statuses you can also create your own <strong>custom order status</strong> here as well. As far as I know this solution works on Magento 1.1 up to 1.3 but if you have any comments or questions feel free to post them here or read the <a href="http://www.magentocommerce.com/boards/viewthread/9976/">forum</a> on Magento&#8217;s site for more details.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/magento-custom-status-in-admin/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zen Coding</title>
		<link>http://thinkclay.com/technology/zen-coding</link>
		<comments>http://thinkclay.com/technology/zen-coding#comments</comments>
		<pubDate>Mon, 23 Nov 2009 20:22:13 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[front-end]]></category>
		<category><![CDATA[MAC]]></category>
		<category><![CDATA[PC]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=1193</guid>
		<description><![CDATA[As a developer, I&#8217;m always looking for ways to improve my coding practices and efficiency. In the programming world, I work almost completely with frameworks such as Zend and CodeIgnitor using MVC at it&#8217;s fullest. On the front-end, I&#8217;ve learned to use Blueprint CSS combined with semantic markup to standardize my layouts. But now, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>As a developer, I&#8217;m always looking for ways to improve my coding practices and efficiency. In the programming world, I work almost completely with frameworks such as <a href="http://www.zend.com/">Zend</a> and <a href="http://codeigniter.com/">CodeIgnitor</a> using <a href="http://www.oreillynet.com/onlamp/blog/2007/06/what_is_mvc.html">MVC</a> at it&#8217;s fullest. On the front-end, I&#8217;ve learned to use <a href="http://blueprintcss.org">Blueprint CSS</a> combined with semantic markup to standardize my layouts. But now, I&#8217;ve added another INCREDIBLE tool to my belt, and I want to share it with all of you as well.. <strong>Zen Coding</strong></p>
<h2>What is Zen Coding?</h2>
<p>From a general perspective Zen Coding is simply the practice of making lightweight and reusable code to allow for peaceful coding and debugging (that&#8217;s my definition anyways). There has been a movement in the front-end development community towards finding new ways to use <a href="http://www.csszengarden.com/">CSS with semantic markup</a> in order to produce the desired layouts and styles. Now Sergey Chikuyonok has taken that to a whole new level. He&#8217;s reversed the idea of Zen Coding using HTML markup to generate CSS Selectors and allowed us to create our markup from using CSS Selectors. This might seem confusing, so lets look at some code:</p>
<p>Plain and simply put, the Zen Coding plugin (supported on multiple text editors) translates code like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">div<span style="color: #cc00cc;">#header</span><span style="color: #00AA00;">&gt;</span>ul.nav<span style="color: #00AA00;">&gt;</span>li<span style="color: #00AA00;">*</span><span style="color: #cc66cc;">5</span></pre></div></div>

<p>into this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;header&quot;&gt;
	&lt;ul class=&quot;nav&quot;&gt;
		&lt;li&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/li&gt;
		&lt;li&gt;&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;</pre></div></div>

<p>.. and yet, this is still nothing folks! Dive in deeper over at <a href="http://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-write-html-code/">Smashing Mag</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/zen-coding/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Add, Edit, Delete Cookies with JavaScript</title>
		<link>http://thinkclay.com/technology/add-edit-delete-cookies-with-javascript</link>
		<comments>http://thinkclay.com/technology/add-edit-delete-cookies-with-javascript#comments</comments>
		<pubDate>Mon, 19 Oct 2009 19:30:55 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[front-end]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=1187</guid>
		<description><![CDATA[<a href="http://thinkclay.com/wp-content/uploads/2009/10/cookie-in-js.jpg"><img src="http://thinkclay.com/wp-content/uploads/2009/10/cookie-in-js.jpg" alt="cookies in js" title="cookies in js" width="300" height="200" class="alignleft" /></a>There are many ways to communicate and store data from front-end to back-end, but many require AJAX which may take too much time to develop or might not fit the project correctly. A neat alternative to save data and be able to access that data from the server is using <strong>browser cookies</strong>. <a href="http://en.wikipedia.org/wiki/HTTP_cookie">Cookies</a> can be created and destroyed by javascript, and while the syntax can be confusing, I've gathered this little script that will make it easier to use...]]></description>
			<content:encoded><![CDATA[<p>There are many ways to communicate and store data from front-end to back-end, but many require AJAX which may take too much time to develop or might not fit the project correctly. A neat alternative to save data and be able to access that data from the server is using <strong>browser cookies</strong>. <a href="http://en.wikipedia.org/wiki/HTTP_cookie">Cookies</a> can be created and destroyed by javascript, and while the syntax can be confusing, I&#8217;ve gathered this little script that will make it easier to use:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/* COOKIES OBJECT */</span>
<span style="color: #003366; font-weight: bold;">var</span> Cookies <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">// Initialize by splitting the array of Cookies</span>
	init<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> allCookies <span style="color: #339933;">=</span> document.<span style="color: #660066;">cookie</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'; '</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</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>i<span style="color: #339933;">&lt;</span>allCookies.<span style="color: #660066;">length</span><span style="color: #339933;">;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> cookiePair <span style="color: #339933;">=</span> allCookies<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">split</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'='</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span>cookiePair<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> cookiePair<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
        <span style="color: #006600; font-style: italic;">// Create Function: Pass name of cookie, value, and days to expire</span>
	create<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #339933;">,</span>value<span style="color: #339933;">,</span>days<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>days<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> date <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			date.<span style="color: #660066;">setTime</span><span style="color: #009900;">&#40;</span>date.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>days<span style="color: #339933;">*</span><span style="color: #CC0000;">24</span><span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">*</span><span style="color: #CC0000;">60</span><span style="color: #339933;">*</span><span style="color: #CC0000;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> expires <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;; expires=&quot;</span><span style="color: #339933;">+</span>date.<span style="color: #660066;">toGMTString</span><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: #000066; font-weight: bold;">else</span> <span style="color: #003366; font-weight: bold;">var</span> expires <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
		document.<span style="color: #660066;">cookie</span> <span style="color: #339933;">=</span> <span style="color: #000066;">name</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;=&quot;</span><span style="color: #339933;">+</span>value<span style="color: #339933;">+</span>expires<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;; path=/&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> value<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
        <span style="color: #006600; font-style: italic;">// Erase cookie by name</span>
	erase<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">create</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #339933;">,-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#91;</span><span style="color: #000066;">name</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> undefined<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
Cookies.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Unfortunately, there&#8217;s no easy way to simple update a cookie (correct me if I&#8217;m wrong) but this will allow you to delete and re-create as needed:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Erase cookie &quot;test&quot;</span>
Cookies.<span style="color: #660066;">erase</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'test'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Recreate cookie &quot;test&quot; with a new value of &quot;cookievalue&quot; and set to expire in 10 days</span>
Cookies.<span style="color: #660066;">create</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'test'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'cookievalue'</span><span style="color: #339933;">,</span><span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/add-edit-delete-cookies-with-javascript/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Lightbox / Modal Plugin</title>
		<link>http://thinkclay.com/news/jquery-lightbox-modal-plugin</link>
		<comments>http://thinkclay.com/news/jquery-lightbox-modal-plugin#comments</comments>
		<pubDate>Fri, 25 Sep 2009 20:17:51 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://thinkclay.com/?p=1175</guid>
		<description><![CDATA[There are SO MANY different types of <a href="http://devsnippets.com/?cat=13">lightbox scripts in the wild</a>, and while most of them are absolutely fantastic (<a href="http://www.shadowbox-js.com/" title="Shadowbox Lightbox">shadowbox</a> being one of my favorites) most of them are very limited in the control that they give you over the style, function and code. To make things worse, most of these <strong>lightbox scripts</strong> are also 5k or bigger, which is 5k more than you need sometimes. If you're like me, and you do a lot of customization or want to tweak your code to be as fast as possible, then you'll want this simple little <strong>jquery lightbox plugin</strong>. <strong>Style your lightbox</strong> exactly how you'd like and then simple invoke the modal() function and you'll be able to trigger the lightbox.]]></description>
			<content:encoded><![CDATA[<p>There are SO MANY different types of <a href="http://devsnippets.com/?cat=13">lightbox scripts in the wild</a>, and while most of them are absolutely fantastic (<a href="http://www.shadowbox-js.com/" title="Shadowbox Lightbox">shadowbox</a> being one of my favorites) most of them are very limited in the control that they give you over the style, function and code. To make things worse, most of these <strong>lightbox scripts</strong> are also 5k or bigger, which is 5k more than you need sometimes. If you&#8217;re like me, and you do a lot of customization or want to tweak your code to be as fast as possible, then you&#8217;ll want this simple little <strong>jquery lightbox plugin</strong>. <strong>Style your lightbox</strong> exactly how you&#8217;d like and then simple invoke the modal() function and you&#8217;ll be able to trigger the lightbox.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery.<span style="color: #660066;">fn</span>.<span style="color: #660066;">modal</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</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>
	<span style="color: #003366; font-weight: bold;">var</span> ah <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> wh <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> nh <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>wh<span style="color: #339933;">/</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span>ah<span style="color: #339933;">/</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> aw <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> ww <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>window<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">width</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> nw <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>ww<span style="color: #339933;">/</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span>aw<span style="color: #339933;">/</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// Trim body height, append overlay, and disable scrolling (this can be undone with a custom close button)</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;body&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">height</span><span style="color: #009900;">&#40;</span>wh<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'overflow'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'hidden'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;div class=&quot;overlay&quot;&gt;&lt;<span style="color: #000099; font-weight: bold;">\/</span>div&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.overlay&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeTo</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #339933;">,</span> .8<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'top'</span><span style="color: #339933;">:</span>nh<span style="color: #339933;">,</span> <span style="color: #3366CC;">'left'</span><span style="color: #339933;">:</span>nw<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This code is what i use for the overlay, you can customize as you&#8217;d like. The actual div is appended to the body with JavaScript.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.overlay</span> <span style="color: #00AA00;">&#123;</span> 
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">0</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">0</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;"><span style="color: #cc66cc;">110</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1001</span><span style="color: #00AA00;">;</span>
	-moz-opacity<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0.8</span><span style="color: #00AA00;">;</span>
	opacity<span style="color: #00AA00;">:</span>.8<span style="color: #00AA00;">;</span>
	filter<span style="color: #00AA00;">:</span> alpha<span style="color: #00AA00;">&#40;</span>opacity<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">80</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>This is an example of a <a href="http://mycalorienumber.com/mynumber">modal/lightbox</a> i did using this plugin. Very simple CSS:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.modal</span> <span style="color: #00AA00;">&#123;</span> 
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#00121b</span><span style="color: #00AA00;">;</span> 
	<span style="color: #000000; font-weight: bold;">min-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">54.5em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">56.5em</span><span style="color: #00AA00;">;</span> 
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#111e24</span><span style="color: #00AA00;">;</span> 
	box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1em</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
	-moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1em</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
	-webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1em</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> 
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1002</span><span style="color: #00AA00;">;</span> 
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/news/jquery-lightbox-modal-plugin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
