<?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 &#187; Technology</title>
	<atom:link href="http://thinkclay.com/category/technology/feed" rel="self" type="application/rss+xml" />
	<link>http://thinkclay.com</link>
	<description>Creative Media Design, Powered by Wordpress</description>
	<lastBuildDate>Thu, 29 Jul 2010 18:35:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Must-have Magento Extensions</title>
		<link>http://thinkclay.com/technology/must-have-magento-extensions</link>
		<comments>http://thinkclay.com/technology/must-have-magento-extensions#comments</comments>
		<pubDate>Sun, 13 Jun 2010 19:14:45 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[zend]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=1232</guid>
		<description><![CDATA[As Magento grows, so does it&#8217;s base for extensions and contributions. I often find myself browsing the collection of them, and try to experiment with a new extension on every site that I build. This is my list of must-haves and favorite magento extensions thus far, and hopefully I&#8217;ll add to this list as time [...]]]></description>
			<content:encoded><![CDATA[<p>As Magento grows, so does it&#8217;s base for extensions and contributions. I often find myself browsing the collection of them, and try to experiment with a new extension on every site that I build. This is my list of must-haves and favorite magento extensions thus far, and hopefully I&#8217;ll add to this list as time goes on.</p>
<h3>Developer Extensions</h3>
<p>Developer toolbar:</p>
<p>http://www.magentocommerce.com/extension/2271/developer-toolbar</p>
<p>Blueprint Theme:</p>
<p>http://www.magentocommerce.com/extension/2245</p>
<h3>Free Magento Extensions</h3>
<p>Product Image lightbox:</p>
<p>http://www.magentocommerce.com/extension/1487/magento-easy-lightbox</p>
<p>Product Detail tabbing:</p>
<p>http://www.magentocommerce.com/extension/1725/magento-easytabs</p>
<p>Teaser Box:</p>
<p>http://www.magentocommerce.com/extension/1778/teaserbox</p>
<h3>Free Magento Themes</h3>
<p>Absolute Magento Theme</p>
<p>http://www.magentocommerce.com/extension/2031/magento-absolute-theme</p>
<h3>Paid Magento Extensions</h3>
<p>Abandoned Cart Alerts</p>
<p>http://adjustware.com/shop/magentomods_abandoned_carts_alerts.html</p>
<p>Quickview</p>
<p>http://www.magentocommerce.com/extension/574/quickview-1.1</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/must-have-magento-extensions/feed</wfw:commentRss>
		<slash:comments>4</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>Sun, 06 Jun 2010 15:16:32 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[magento]]></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>10</slash:comments>
		</item>
		<item>
		<title>Compatible Operating Systems for Web Hosting</title>
		<link>http://thinkclay.com/technology/compatible-operating-systems-for-web-hosting</link>
		<comments>http://thinkclay.com/technology/compatible-operating-systems-for-web-hosting#comments</comments>
		<pubDate>Tue, 18 May 2010 14:43:28 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=1348</guid>
		<description><![CDATA[Best compatible operating system for web hosting When you are choosing web hosting, one of the first things you need to choose is the operating system. If you are a techie, this is probably an easy choice, but if you don&#8217;t have technical background, then the very question &#8220;Operating system?! What is this?&#8221; will pop [...]]]></description>
			<content:encoded><![CDATA[<h3>Best compatible operating system for web hosting</h3>
<p>When you are <a href="http://www.webhostingsearch.com/">choosing web hosting</a>, one of the first things you need to choose is the operating system. If you are a techie, this is probably an easy choice, but if you don&#8217;t have technical background, then the very question &#8220;Operating system?! What is this?&#8221; will pop up in your head.</p>
<h3>What is an Operating System?</h3>
<p>There are many definitions of what an operating system is but since you are not a techie, you will hardly be willing to delve into the technical details. To put it into layman&#8217;s terms, an operating system is a piece of software you need in order to install applications and to access the underlying hardware.</p>
<p>Hardware is nothing without software to manage it and this is why you need software (i.e. the operating system) to tell the hardware what to do. On the other hand, an operating system doesn&#8217;t perform tasks an application can and this is why you need to install applications within the operating system in order to perform tasks such as browsing the Net, logging into your web host, etc. It is true that most operating systems come bundled with applications but still applications are separate from the operating  system.</p>
<h3>Popular Web Hosting  Operating Systems?</h3>
<p>There are hundreds of operating systems in use but the most popular ones are Windows and Linux. As an end-user, you are probably already familiar with Windows because you are probably using it on your computer. As far as web hosting is concerned, <a href="http://www.webhostingsearch.com/windows-web-hosting.php">Windows hosting</a> doesn&#8217;t use exactly the same version of Windows that you may be running on your computer; but still both versions are very similar.</p>
<p>The second popular web hosting operating system is Linux. You  might have heard about it but probably you have never used it. Unlike Windows, Linux is primarily a server operating system (though there are many Linux distributions that are intended as a desktop operating system). In addition to Windows and Linux, there are other web hosting operating systems, such as </span><a href="http://en.wikipedia.org/wiki/UNIX">UNIX=</a>, <a href="http://apple.com">MAC</a>, HP  varieties, or Solaris, but we won&#8217;t discuss those here.</p>
<h3>Is Linux Hosting or Windows Hosting Best?</h3>
<p>Usually when you have to choose the operating system for your web hosting, the choice is between Windows hosting and Linux hosting. Both Windows hosting and <a href="http://www.webhostingsearch.com/linux-web-hosting.php">linux hosting</a> have their advantages and  disadvantages and it is not possible to recommend one of them as the  better option. In some situations Linux hosting is the way to go, while in others Windows hosting is the better alternative.</p>
<p>For a novice, who is familiar with neither Linux hosting, nor Windows hosting, Linux hosting could be a bit more difficult to master. However, once you pass the initial stages, you will see that Linux administration is not terribly difficult.</p>
<p>Actually, the biggest deciding factor between Linux hosting versus Windows hosting are your applications. There are applications, which can be run only under Windows/Linux and if your applications fall into this group,  you have no choice but to go for Linux hosting/Windows hosting.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/compatible-operating-systems-for-web-hosting/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My experience at F8 2010</title>
		<link>http://thinkclay.com/technology/my-experience-at-f8-2010</link>
		<comments>http://thinkclay.com/technology/my-experience-at-f8-2010#comments</comments>
		<pubDate>Thu, 29 Apr 2010 22:18:06 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[F8]]></category>
		<category><![CDATA[Facebook]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=1342</guid>
		<description><![CDATA[I&#8217;ll be posting all of my notes from the Facebook F8 conference on Capture the Conversation blog. I&#8217;ll come back to this post and provide some more technical notes and insight later, but for now read all about my experience at the links below: Facebook f8: Open Graph and Open Source Facebook f8: Default is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll be posting all of my notes from the Facebook F8 conference on <a href="http://capturetheconversation.com">Capture the Conversation</a> blog. I&#8217;ll come back to this post and provide some more technical notes and insight later, but for now read all about my experience at the links below:</p>
<p><a href="http://www.capturetheconversation.com/technology/facebook-f8-open-graph-open-source">Facebook f8: Open Graph and Open Source</a><br />
<a href="http://www.capturetheconversation.com/social-community/facebook-f8-default-social">Facebook f8: Default is Social pt1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/my-experience-at-f8-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup SVN in Hostmonster Shared Hosting</title>
		<link>http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting</link>
		<comments>http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting#comments</comments>
		<pubDate>Tue, 27 Apr 2010 06:09:26 +0000</pubDate>
		<dc:creator>Clay McIlrath</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[developer tools]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[resources]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[Versioning]]></category>
		<guid isPermaLink="false">http://thinkclay.com/?p=1335</guid>
		<description><![CDATA[<a href="http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting"><img src="http://thinkclay.com/wp-content/uploads/2010/04/svn-hostmonster.jpg" alt="" title="svn-hostmonster" width="300" height="200" class="alignleft" /></a>
I've had my fair share of installs in <strong>shared hosting</strong>, but sometimes simple things like <strong>SVN</strong> can get very tricky with providers like <strong>Hostmonster</strong> or <strong>BlueHost</strong>. I hope that this shell will work as well for you as it has for me. Just copy the code and paste into a file on your server <em>svninstall.sh</em> and then to run just execute <em>. .svninstall.sh</em> and you're off! Comment here if you get and errors and I'd be glad to help.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had my fair share of installs in <strong>shared hosting</strong>, but sometimes simple things like <strong>SVN</strong> can get very tricky with <strong>hosting providers</strong> like <strong>Hostmonster</strong> or <strong>BlueHost</strong>. I hope that this shell will work as well for you as it has for me. Just copy the code and paste into a file on your server (i called mine <em>svninstall.sh</em>) and then to run just execute <em>. .svninstall.sh</em> and you&#8217;re off! Comment here if you get and errors and I&#8217;d be glad to help.</p>
<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#!/bin/sh
&nbsp;
export svn=1.6.9
export ipath=$HOME/tools64/
export dev=$HOME/dev/svn
&nbsp;
mkdir -p $ipath
mkdir -p $dev
cd $dev
&nbsp;
if [ ! -f $dev/subversion-deps-$svn/__download ] ; then
	rm subversion-deps-$svn.tar.bz2*
	wget http://subversion.tigris.org/downloads/subversion-deps-$svn.tar.bz2 &amp;&amp; \
		tar -xjf subversion-deps-$svn.tar.bz2 &amp;&amp; \
		mv subversion-$svn subversion-deps-$svn &amp;&amp; \
		touch  subversion-deps-$svn/__download
	rm subversion-deps-$svn.tar.bz2.*
fi
if [ ! -f $dev/subversion-$svn/__download ] ; then
	rm subversion-$svn.tar.bz2*
	wget http://subversion.tigris.org/downloads/subversion-$svn.tar.bz2 &amp;&amp; \
		tar -xjf subversion-$svn.tar.bz2 &amp;&amp; \
		touch  subversion-$svn/__download
	rm subversion-$svn.tar.bz2*
fi
&nbsp;
&nbsp;
export o=&quot; --prefix=$ipath LDFLAGS=&quot;-L$ipath/lib&quot; CPPFLAGS=&quot;-I$ipath/include&quot; CFLAGS=&quot;-I$ipath/include&quot; &quot;
export oapr=&quot; --with-apr=$ipath/bin/apr-1-config &quot;
export oapu=&quot; --with-apr-util=$ipath/bin/apu-1-config &quot;
&nbsp;
export pdep=$dev/subversion-deps-$svn
export psvn=$dev/subversion-$svn
&nbsp;
export PATH=$ipath/bin:$PATH
&nbsp;
#compile zlib
cd $pdep/zlib
export CFLAGS='-fPIC'
if [ ! -f _done ] ; then
	make clean
	./configure --prefix=$ipath
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# compile APR
cd $pdep/apr
if [ ! -f _done ] ; then
	make clean
	./configure $o
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# compile neon
cd $pdep/neon
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr
	make &amp;&amp; touch _done
fi
make install
&nbsp;
#compile sqlite
cd $pdep/sqlite-amalgamation
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# compile Berkeley DB
cd $pdep
if [ ! -f db-5.0.21/__download ] ; then
	rm db-5.0.21.tar.gz*
	wget http://download.oracle.com/berkeley-db/db-5.0.21.tar.gz &amp;&amp; \
		tar -xzf db-5.0.21.tar.gz &amp;&amp; \
		touch  db-5.0.21/__download
	rm db-5.0.21.tar.gz*
fi
cd $pdep/db-5.0.21/build_unix
if [ ! -f _done ] ; then
	make clean
	../dist/configure $o $oapr
	make &amp;&amp; touch _done
fi
make install
&nbsp;
&nbsp;
# compile APR-util after Berkeley. This way svn find berkeley automatically
cd $pdep/apr-util
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr --with-berkeley-db=$ipath/include:$ipath/lib
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# compile serf
cd $pdep/serf
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr $oapu
	make &amp;&amp; touch _done
fi
make install
&nbsp;
# finaly, build svn
cd $psvn
if [ ! -f _done ] ; then
	make clean
	./configure $o $oapr
	make &amp;&amp; touch _done
fi
make install</pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://thinkclay.com/technology/setup-svn-in-hostmonster-shared-hosting/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<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 canvas, but not so much in tabs).</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>8</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>24</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>
	</channel>
</rss>
