<?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>david (b) hayes &#187; Ikiru Design</title>
	<atom:link href="http://www.davidbhayes.com/category/ikiru-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidbhayes.com</link>
	<description>That&#039;s My Name!</description>
	<lastBuildDate>Sat, 04 Feb 2012 01:29:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A Mission Statement</title>
		<link>http://feedproxy.google.com/~r/ikiru/~3/79zliPPNrjE/</link>
		<comments>http://feedproxy.google.com/~r/ikiru/~3/79zliPPNrjE/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 21:42:22 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=557</guid>
		<description><![CDATA[One of the things that I constantly struggle with is the difference between all the different things that this site could, or perhaps should, be and what really drove me to make it in the first place. So this is a small public statement (for myself first and anyone else second) about what this site [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that I constantly struggle with is the difference between all the different things that this site could, or perhaps should, be and what really drove me to make it in the first place. So this is a small public statement (for myself first and anyone else second) about what this site is and isn&#8217;t which will hopefully help me better understand and focus on it&#8217;s reasons for existing and what my goals are for it.</p>
<p>If there&#8217;s a single reason I maintain a website devoted to working with WordPress, it&#8217;s this: WordPress is the best tool that currently exists for internet publishing, and my primary goal today is to be an internet author (and by extension publisher). My goal, with all things I create is to make better WordPress tools that help internet publishers to makes better looking, more approachable internet content. Even if no one but me ever finds value in the things I create and share here, the tools and learning I put here will have helped me to become a better internet publisher.</p>
<p>It&#8217;s not about making money. It&#8217;s not about making the kind of things that get me copious internet traffic. It&#8217;s not about getting people to hire me to do things with WordPress for them. It&#8217;s about making better, more approachable, and thus more read, internet sites using WordPress. That&#8217;s it.</p>
<img src="http://feeds.feedburner.com/~r/ikiru/~4/79zliPPNrjE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/12/01/a-mission-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Right Way to Style WordPress Plugins</title>
		<link>http://feedproxy.google.com/~r/ikiru/~3/OKOKS_CjqAk/</link>
		<comments>http://feedproxy.google.com/~r/ikiru/~3/OKOKS_CjqAk/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 17:27:45 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=541</guid>
		<description><![CDATA[From the time I first touched WordPress until a few days ago, I styled plugins wrong. Heck, I put my PHP in the wrong place too, so obviously there&#8217;s a lot I was doing poorly. None the less, in the hopes of saving someone some headache, here&#8217;s what I believe to be the best way [...]]]></description>
			<content:encoded><![CDATA[<p>From the time I first touched WordPress until a few days ago, I styled plugins wrong. Heck, I put <a href="http://www.ikirudesign.com/2011/10/14/dont-put-it-in-the-theme/">my PHP in the wrong place too</a>, so obviously there&#8217;s a lot I was doing poorly. None the less, in the hopes of saving someone some headache, here&#8217;s what I believe to be the best way to deal with CSS for any type of plugin today.</p>
<p>Quickly though, here is the basic progression of how I&#8217;ve tried to add CSS to plugin output in the past.</p>
<ol>
<li>Doing it purely inline with <code>&lt;style=" ... "&gt;</code>. (This does have a very small place on the internet&thinsp;&#8212;&thinsp;when you truly want to apply a unique style to a single element&thinsp;&#8212;&thinsp;but I wasn&#8217;t using that.)</li>
<li>Adding bare CSS with an action hook to <code>wp_head</code>. I was just spitting it all in the head of theme making the files bigger, and the source more convoluted.</li>
<li>Appending my own .css file with a script I found somewhere and didn&#8217;t really understand.</li>
<li>What I&#8217;m about to show you: Appending my own .css file, but allowing the theme to replace it by putting sensibly named alternative in it&#8217;s style directory.</li>
</ol>
<p>Essentially, for that Post Meta Box plugin I mentioned in the aforelinked post, I wanted to be able to modify the basic styling but not affect all the places I&#8217;m trying to use it. So, I did what made the most sense to me, copied the master CSS file (postmetabox.css) to my active themes directory and modified it there. And because this script I&#8217;m about to give you is so smart, that became the active styling without any problems. So here it is:</p>
<p>(A quick note: I&#8217;ve kept all references to &#8220;pmb&#8221;, my shortcut for making things local to my Post Meta Box plugin. If you&#8217;re using this function, I&#8217;d do a find and replace with whatever shorthand you use to refer to your plugin. I could have find-and-replaced it to &#8220;my-plugin,&#8221; but we&#8217;re smart people, so I&#8217;ll spare us that unnecessary step.)</p>
<pre>add_action('wp_print_styles', 'add_pmb_stylesheet');

function add_pmb_stylesheet() {
	$theme_style_url = get_stylesheet_directory_uri() . '/postmetabox.css';
	$theme_style_file = get_stylesheet_directory() . '/postmetabox.css';
	$pmb_style_url = plugins_url() . '/post-meta-box/postmetabox.css';

	if ( file_exists($theme_style_file) ) {
		wp_register_style('themepmb', $theme_style_url);
		wp_enqueue_style( 'themepmb');
	}
	else {
		wp_register_style('pmb', $pmb_style_url);
		wp_enqueue_style( 'pmb');
	}
}</pre>
<p>First and foremost, that <code>add_action</code> call is (half of) the proper way to append any stylesheet in WordPress. There are many other things you can do that will function for you (the aforementioned <code>wp_head</code> method is probably the worst of them). Essentially, all it&#8217;s doing is calling my function when it gets to any place it typically reaches for style sheets.</p>
<p>So what our function does is hand it the right style sheet. And which stylesheet is right depends on whether or not the user has created one for their current theme, or if they just want to rely on ours. So essentially, we&#8217;re just looking to see if the user has created the file to hold their own stylesheet (<code>$theme_style_file</code>), if they have, we use that. If they haven&#8217;t, we use our own.</p>
<p>There&#8217;s nothing in here that a seasoned PHP and WordPress person should be stunned by, but there&#8217;s a lot of little bits that your average tinkerer will not have known about. Like that PHP can easily check if a file exists&thinsp;&#8212;&thinsp;that function&#8217;s in every version of PHP ever&thinsp;&#8212;&thinsp;but does it with local addresses, so you need to know where the style sheet is both locally and internet-wise. And the commands <code>wp_regiester_style</code> and  <code>wp_enqueue_style</code>&thinsp;&#8212;&thinsp;which round out the proper way to add a style sheet&thinsp;&#8212;&thinsp;were completely unknown to me until I ran across a little tutorial (by I think Justin Tadlock, though after 20 minutes of looking I gave up on definitively finding who it was).</p>
<p>I wondered for some time about the possibility of keeping some sensible defaults for my plugin&#8217;s visual output and always using them, but if for some reason the user wants to overwrite what seem to me to be sensible defaults I want to make that easy. And since I think most anyone inspired to modify my styling would take the sensible advice to copy the original file and put it in their theme and modify it there, that&#8217;s what we&#8217;re allowing for.</p>
<p>It&#8217;s entirely possible that another years of dinking around with WordPress will convince me that this method is as foolish, or outdated, or bad, as my previous methods, but the more I think about that the less likely it seems to me.</p>
<img src="http://feeds.feedburner.com/~r/ikiru/~4/OKOKS_CjqAk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/10/24/the-right-way-to-style-wordpress-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don’t Put it in the Theme</title>
		<link>http://www.ikirudesign.com/2011/10/14/dont-put-it-in-the-theme/</link>
		<comments>http://www.ikirudesign.com/2011/10/14/dont-put-it-in-the-theme/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 21:43:42 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=534</guid>
		<description><![CDATA[If there&#8217;s one lesson I can think of that I wish I&#8217;d learned sooner in the whole WordPress plugin and theme area it&#8217;s this: unless you can make a convincing argument that it belongs in the theme, it doesn&#8217;t. Over the weekend, I finally did some work I&#8217;d been meaning to for a while. I [...]]]></description>
			<content:encoded><![CDATA[<p>If there&#8217;s one lesson I can think of that I wish I&#8217;d learned sooner in the whole WordPress plugin and theme area it&#8217;s this: <em>unless you can make a convincing argument that it belongs in the theme, it doesn&#8217;t.</em></p>
<p>Over the weekend, I finally did some work I&#8217;d been meaning to for a while. I moved the &#8220;post meta data&#8221;&thinsp;&#8212;&thinsp;tags, similar posts, last and previous post links, etc&thinsp;&#8212;&thinsp;which I used to have in the sidebar of <a href="http://www.frozentoothpaste.com/">Frozen Toothpaste</a> back to the bottom of the posts. (Every post on the site will show it, but this is <a href="http://www.frozentoothpaste.com/2007/06/21/opw-anthony-bourdain/">a shorter one</a>.) It seems obvious to me (now; there&#8217;s a then when it wasn&#8217;t) that this is the right place for it to be, there for when someone has finished with one post and can easily get a good &#8220;next action&#8221; right there, rather than scrolling back to the top and then looking to the sidebar.</p>
<p>All of that&#8217;s tangential to the point that when I started to build this new &#8220;post meta box&#8221; I went to start writing the code for it into my current theme. But I&#8217;ve meant to change my theme for nearly a year, and it occurred to me that it would really suck to have to move all this code over next time I change the theme.</p>
<p>So I went with the obvious solution to this problem, and the best answer to the generic question of &#8220;<em>Well, then where should I put code that does stuff in my theme?&#8221;</em> I made a plugin.</p>
<p>Some of this is simply personal preference and coding style. There&#8217;s probably a reasonable argument that could be made for keeping at least some of the code that makes those post meta boxes appear local to the theme. I&#8217;m convinced it&#8217;s possible that you could convince someone of that argument. But I doubt you could have convinced me that&#8217;s what I should do for me. And that&#8217;s really all that matters. If you can&#8217;t convince yourself it belongs in the theme, it doesn&#8217;t. If you&#8217;re able to convince yourself, do whatever you like.</p>
<p>To most people who spend a significant amount of time futzing with WordPress plugins and themes, this is probably self-evident. But I struggle to recall a time when I didn&#8217;t make at least a few poor decisions because I&#8217;d never heard the pretty damn good advice: if it doesn&#8217;t obviously belong in your WordPress theme, don&#8217;t put it in your WordPress theme.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/10/14/dont-put-it-in-the-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress, Money, and Freedom</title>
		<link>http://feedproxy.google.com/~r/ikiru/~3/n59f6c-AOHs/</link>
		<comments>http://feedproxy.google.com/~r/ikiru/~3/n59f6c-AOHs/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 01:17:09 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=503</guid>
		<description><![CDATA[I see a creeping scourge overtaking the free ethos of the WordPress community, and I don&#8217;t like it. It&#8217;s not necessarily menacing, or threatening, or even really a scourge (as I know I just called it) but it&#8217;s a thing I don&#8217;t like and it took a plugin I&#8217;ve used for years being discontinued for [...]]]></description>
			<content:encoded><![CDATA[<p>I see a creeping scourge overtaking the free ethos of the WordPress community, and I don&#8217;t like it. It&#8217;s not necessarily menacing, or threatening, or even really a scourge (as I know I just called it) but it&#8217;s a thing I don&#8217;t like and it took a plugin I&#8217;ve used for years being discontinued for me to more clearly see the problem.</p>
<p>WordPress as a whole&thinsp;&#8212;&thinsp;the community more than the tool&thinsp;&#8212;&thinsp;is less-free now than it was a year ago, and less so still than it was five years ago. That&#8217;s the nature of what I see as the problem. But the reason I&#8217;m so tentative to call it a problem is that WordPress is also a far better tool now than it was a year ago, and certainly far more than it was five years ago. And like it or not, I think this fundamental creeping unfreedom has, at the least, contributed to the rate at which WordPress has become a better tool than it has ever been.</p>
<p>In my estimation, the first foot-fall of this unfree menace (again, I say that but don&#8217;t wholly mean it) were the &#8220;premium&#8221; themes. Someone, I think it was <a href="http://www.briangardner.com/">Brian Gardner</a>, had the reasonable thought that rather than making money solely by purpose-building WordPress themes for clients paying $500 and north, they could fill a market-gap with a well-made theme priced around $100. For users who wanted more than a free theme could give them, but less than hiring a designer would, they got a product that pretty well sat that gap.</p>
<p>One could debate endlessly whether there are more or less good free themes being made today, but judgement about that is inherently subjective and thus not worth making. What is almost certainly true is that free themes are no longer the only non-exclusive themes that exist. And while I, as a rather poor person certainly preferred it when all themes I could hope to use were free-as-in-beer, it&#8217;s not an unmitigated catastrophe that they aren&#8217;t.</p>
<p>It is worrying how likely it is that because &#8220;premium&#8221; themes aren&#8217;t free-as-in-beer, they&#8217;re not building on each other. Being harder to get makes them less likely to be publicly modified and enhanced by others, and to be used to make other similar themes better. Again, we need to balance these facts with the fact that there are more better-quality themes generally, etc, but the effect is not negligible.</p>
<p>Now the other day, the <a href="http://wordpress.org/extend/plugins/stats/">WordPress.com Stats plugin</a> declared to me it has been discontinued in preference to <a href="http://jetpack.me/">Jetpack</a>, which Automattic portrays as the plugin to &#8220;blast-off&#8221; into the fun world of WordPress.com features. It&#8217;s also, almost certainly, going to give Automattic a convenient place to get self-hosted WordPress users to enter the world of paying for some features, as has always been the available on WordPress.com.</p>
<p>Again, this isn&#8217;t ransom or anything. It&#8217;s a completely sensible&thinsp;&#8212;&thinsp;even admirable&thinsp;&#8212;&thinsp;business move, but it&#8217;s not exactly fostering freedom and building better software for all users. How many features might not be built into the core of WordPress because Automattic has a money-making Jetpack feature that does the same thing? (Is the reason there is no backup functionality in the WordPress core that VaultPress exists?) Questions like this always contain some alarmism, but that doesn&#8217;t mean we should just ignore the potential for a conflict of interest.</p>
<p>These type of vague but indefensible concerns are precisely why I bristled at the thought of replacing what was a relatively lean and fast plugin with the colossus that is Jetpack. I have no concrete reason to think the WordPress core will suffer so Automattic can make more money, but that fact that a I&#8217;m seeing more and more avenues by which this could come to pass definitely gives me pause. And that, I guess, is all I&#8217;m really trying to say.</p>
<img src="http://feeds.feedburner.com/~r/ikiru/~4/n59f6c-AOHs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/09/26/wordpress-money-and-freedom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A WordPress Plugin to Pester Delinquent Posters</title>
		<link>http://feedproxy.google.com/~r/ikiru/~3/X_R61RoY2og/</link>
		<comments>http://feedproxy.google.com/~r/ikiru/~3/X_R61RoY2og/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 21:52:38 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=489</guid>
		<description><![CDATA[I&#8217;ve been keeping a posting schedule here for a few months, and I&#8217;ve been using it over there for over a year. And the whole time I&#8217;ve been doing so it felt a little constrictive. I&#8217;d have the next post all polished and ready to publish, but I was scared to break the schedule because [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been keeping a posting schedule here for a few months, and I&#8217;ve been using it <a href="http://www.frozentoothpaste.com/">over there</a> for over a year. And the whole time I&#8217;ve been doing so it felt a little constrictive. I&#8217;d have the next post all polished and ready to publish, but I was scared to break the schedule because where would I be without publishing dates to provide a sense of order?</p>
<p>It was while I was giving this idea some further consideration recently that I  recalled a plugin that was <a href="http://wpcandy.com/broadcasts/the-sweet-plugin/day-18">featured on WPCandy</a>. When I first saw <a href="http://wordpress.org/extend/plugins/blog-update-reminder/">Blog Update Reminder</a> I couldn&#8217;t really think of a reason I would use it. But giving some thought to trying to update my blogs more frequently it suddenly occurred to me that it would be pretty cool if I could just get some kind of alert that it had been a while since I&#8217;ve posted and maybe I should.</p>
<p>And this is exactly what Blog Update Reminder does. If you haven&#8217;t published a post to a blog in a set interval of days, it sends you an email that says something to the extent of, &#8220;Hey, maybe you should update.&#8221;</p>
<p>It&#8217;s also worth noting that, at least for now, scheduled posts count toward the good. That is: if I have a post scheduled for a week from now and I set my pester interval to two days, I won&#8217;t get bothered until two days after I have no more scheduled posts (nine days). So you could cheat the system by scheduling a post far away and never publishing. But it&#8217;s a tool meant for your benefit, not your pain, so I&#8217;m not sure that really gets scored as a problem.</p>
<p>Mostly I like the idea of the plugin as a way to keep me honest. The game can be built so that with scrupulous posting I&#8217;ll never see a reminder. Such that when I see the reminder I know that I&#8217;ve lost the game. It&#8217;s only when I&#8217;ve failed to maintain the frequency with which I intend to post that I&#8217;ll get reminders (or notifications of defeat).</p>
<p>Substance-wise, I only have two potential niggly points about the plugin. The first is the name. Anytime I see someone uses the word &#8220;update&#8221; with any proximity of the word WordPress, I think of the need to keep my blog software up-to-date for security and feature reasons, not publishing stuff on my blog. I&#8217;d have called this plugin something like &#8220;No Post Pesterer&#8221;. Yes it&#8217;s a trivial point, but I warned you these were niggly.</p>
<p>The other issue is that I can&#8217;t know what the email message will say short of editing the plugin or falling delinquent myself. Again niggly, but I&#8217;d love to be able to send a test email to myself, and easily set the email message to say:</p>
<blockquote><p>Hey Loser,</p>
<p>You&#8217;ve been neglecting your responsibility to yourself and your readership by not updating [blogname] in [dayssince] days. Remember, you think you should post every [setinterval] and you&#8217;re letting yourself down by not keeping up that rate.</p></blockquote>
<p>Obviously coding the ability to easily customize the message text is a nontrivial task, and probably not really worth it for the modest benefit it provides. The stock text is a little more formal than I am with myself, but that never did anyone any harm. And editing it in the plugin itself is hardly rocket science.</p>
<p>Overall, I&#8217;m excited by this plugin that I didn&#8217;t understand initially. I think it&#8217;ll be a great excuse for me to see if I can keep myself posting to my blogs with a reasonable frequency with just this single modest crutch. And if you think you could use such a crutch, this seems like a good one.</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/ikiru/~4/X_R61RoY2og" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/09/05/plugin-pester-no-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Pros and Cons of Moving to WordPress Multisite</title>
		<link>http://www.ikirudesign.com/2011/08/25/the-pros-and-cons-of-moving-to-wordpress-multisite/</link>
		<comments>http://www.ikirudesign.com/2011/08/25/the-pros-and-cons-of-moving-to-wordpress-multisite/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 16:39:47 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=472</guid>
		<description><![CDATA[It&#8217;s not a problem many people have, but for the rare person who suddenly looks down and realizes they&#8217;re updating WordPress, its plugins, and themes across many different instances each time they change, the siren song of a multisite WordPress install (previously known as multi-user, or WPMU) is strong. And since they integrated this feature [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not a problem many people have, but for the rare person who suddenly looks down and realizes they&#8217;re updating WordPress, its plugins, and themes across many different instances each time they change, the siren song of a multisite WordPress install (previously known as multi-user, or WPMU) is strong. And since they integrated this feature into the WordPress core back in 3.0, that call has only gotten stronger.</p>
<p>I&#8217;ve been idly thinking about how good this could be every time a new version of WordPress drops and I&#8217;m forced to manually go through each of the five instances of WordPress I maintain online for personal use and update them. Mercifully, this has become massively easier in the last few years, but it&#8217;s still an annoying and time consuming process compared with updating everything once.</p>
<p>Since laziness drives many of my technical decisions, I know I&#8217;m not likely to take the time to do this without a thorough consideration of the things gained and lost. And since I feel rather confident that this could prove valuable for another person who finds themselves in a similar situation, I&#8217;ve decided to weigh the value of the transition in public. So here it is, a list of what I see as the good and bad parts of migrating mulitple disparate WordPress installs to a single WordPress Multisite one.</p>
<h3>The Good</h3>
<ul>
<li><strong>The aforementioned maintenance benefits.</strong> Being able to update WordPress once is unquestionably better than having to do it multiple different times. The same goes for keeping plugins and themes up-to-date. Once is massively better than five times.</li>
<li><strong>Plugin propagation.</strong> Similarly, when I discover a new awesome plugin with my current setup, I have to manually put it on every blog on which I want to use it. Because with multisite you keep plugins in one place and use them on all blogs, it&#8217;s a clear win.</li>
<li><strong>New blog creation is easier.</strong> Five already seems like too many for me, but I still think about the possibility of creating new sites for various reasons. The ability to just start a new blog without having to reupload WordPress, never mind populate plugins and themes, is huge potential benefit of this process.</li>
</ul>
<h3>The Bad</h3>
<ul>
<li><strong>Upfront costs.</strong> These are numerous, and non-trivial. Essentially, to get all the long-term maintenance benefits requires a lot of one-time costs in the form of exports, imports, and setting resets. The export/import process to move your blog posts along couldn&#8217;t really be simpler. This process, however, doesn&#8217;t include the blogroll, plugins and settings, widgets, and your blog&#8217;s tagline. And we haven&#8217;t even considered the headache of a nearly inevitable period of polluted RSS feeds and unreadable sites.</li>
<li><strong>The learning curve.</strong> While WordPress Multisite isn&#8217;t hugely complicated, there are a number of things that work differently than with standalone blogs. Thus there will inevitably a period of ignorance and learning, even if short it&#8217;s not negligible.</li>
<li><strong>Embedded HTML.</strong> This isn&#8217;t one I&#8217;d been aware of before investigating, but because Multisite is built for creating a blog network that the general public can use, they made reasonable security concessions in curbing your ability to use <code>&lt;iframe&gt;</code>s and <code>&lt;embed&gt;</code>s which could be a headache if you&#8217;ve used them for say, Amazon affilitate panels in posts, embedded YouTube videos, etc. There are <a href="http://wordpress.org/extend/plugins/unfiltered-mu/">solutions</a> to this issue, but it&#8217;s definitely a potential problem.</li>
<li><strong>Those upfront costs again</strong>. I&#8217;m not kidding. If you&#8217;re not completely comfortable with either server or WordPress administration this is significantly more complex than a standard WordPress install. And if, like I would be, you&#8217;re doing it in an existing account at the same host, you&#8217;ve got a bit of an acrobatic headache ahead.</li>
</ul>
<p>I&#8217;m not fully decided on the question of whether or not I&#8217;ll do it. I do have to say that making the list has already made me think that maybe my reason for wanting to do it is a bit ill-considered. I think for now I&#8217;ll personally keep playing with the one I&#8217;ve already setup in my development environment and see how I like it. So for me at least, the idea is currently on hold.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/08/25/the-pros-and-cons-of-moving-to-wordpress-multisite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Best Free WordPress Backup Plugin I’ve Found</title>
		<link>http://www.ikirudesign.com/2011/08/05/best-free-wordpress-backup/</link>
		<comments>http://www.ikirudesign.com/2011/08/05/best-free-wordpress-backup/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 18:07:32 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=429</guid>
		<description><![CDATA[If there&#8217;s one thing I&#8217;m certain of in the world of computers, it&#8217;s the value of a good backup. A good backup has three traits: It&#8217;s effortless. It captures everything you care about. It can easily be used to make things as they were. For a long time, my WordPress backup was one of these [...]]]></description>
			<content:encoded><![CDATA[<p>If there&#8217;s one thing I&#8217;m certain of in the world of computers, it&#8217;s the value of a good backup. A good backup has three traits:</p>
<ul>
<li>It&#8217;s effortless.</li>
<li>It captures everything you care about.</li>
<li>It can easily be used to make things as they were.</li>
</ul>
<p>For a long time, my WordPress backup was one of these three. I&#8217;ve been using <a href="http://wordpress.org/extend/plugins/wp-db-backup/">WordPress Database Backup</a> since I started using WordPress. It is great at doing what it advertises: backing up your database. But that&#8217;s all it does. So all your themes and plugins, all your uploaded photos and movies, everything that doesn&#8217;t reside in the database isn&#8217;t backed up.</p>
<p>I was able to justify this to myself because there weren&#8217;t many good backup solutions for WordPress when I started using it four years ago. And mercifully, my web host never had any catastrophic loss of data that made me regret my laziness. But depending on any single entity (including yourself) to not use lose your data is foolish.</p>
<p>When <a href="http://vaultpress.com/">VaultPress</a> came out I thought (for a second) that it might be my long awaited solution. And though I&#8217;ve never used it, I&#8217;m fairly confident that Automattic has created the best WordPress backup (and more) product available on the market. If you use VaultPress, they&#8217;re backing up your whole blog at sane intervals and make restoring from those as easy as it can be. It fulfills all three of the mentioned criteria, but at a minimum of $15 per site per month costs way more than I&#8217;m willing to spend to back up my three blogs. (If I didn&#8217;t have three, I&#8217;d have been far more likely to take that rate seriously.)</p>
<p>With the potential for an official free solution looking dim, I started thinking about other options. When <a href="http://www.roytanck.com/2010/11/12/wp-time-machine-free-off-site-backups-for-wordpress/">Roy Tanck blogged about</a> a Dropbox-utilizing option last November, I was intrigued. (I, like most of you, have a Dropbox account with plenty of space left. If you don&#8217;t have one, go <a href="http://db.tt/NQEWmsS">signup</a>. It&#8217;s free and a great way to access your files from anywhere.)  But when he mentioned that making it work well would require setting up cron jobs, the laziness that had me only backing up my database beat out my desire to have this issue solved.</p>
<p>And then, a few months ago I saw <a href="http://wpcandy.com/reports/wordpress-backup-to-dropbox-plugin-released">on WPCandy</a> Michael De Wildt&#8217;s <a href="http://www.mikeyd.com.au/projects/wordpress-backup-to-dropbox/">WordPress Backup to Dropbox plugin</a> and there finally seemed to be an easy-enough solution. It&#8217;s not a perfect solution (more on that in a bit), but it&#8217;s easy enough and complete enough that I finally, for the first time, have full backups of all my WordPress sites that I can use to quickly restore things to a pre-disaster state. There&#8217;s no need to create a cron job, no need to do anything much at all once you&#8217;ve set it up and told it when you want to backup your stuff. It just works seamlessly, only alerting you to its functioning when Dropbox tells you that it&#8217;s pushing the backups to your computer.</p>
<p>As I said though, it&#8217;s not perfect. The highest number of demerits are due to the setup. It can be a bit of bear, especially if you&#8217;re not all that comfortable with web server administration. It&#8217;s not that the plugin doesn&#8217;t work, but that depending on your hosting plan you&#8217;ll have to figure out how to change a few PHP defaults that can stop the plugin as it works.</p>
<p>To save resources many hosts use low defaults for things like the time a process can work (<code>max_execution_time</code>) and the amount of memory it can take (<code>memory_limit</code>). This isn&#8217;t a problem for something like WordPress where no process monopolizes many server resources, but building and uploading a backup takes time and memory greater than my default PHP install permitted, and this meant it was killing the process the plugin was trying to use to do it&#8217;s work. (If you&#8217;re wondering, I believe the defaults in my host&#8217;s php.ini were 60 and 8M, the values that I used to get the plugin working without error are 600 and 128M.) My defaults seems a bit anomalous, and De Wildt has also <a href="http://www.mikeyd.com.au/2011/05/26/wordpress-backup-to-dropbox-0-8/">made great strides</a> in minimizing these problems by changing the way the plugin works, so it&#8217;s entirely possible you won&#8217;t encounter these issues.</p>
<p>Nonetheless, this default problem can easily lead to you thinking your data&#8217;s secure when it&#8217;s truly not. And this is where the plugin could be better: when backups fail repeatedly, it would be good if users would get a big warning on their Dashboard announcing that their data isn&#8217;t secure. As it is, you have to go to the plugin&#8217;s setting page to find out that the plugin you were running for two weeks never managed to do much of anything.</p>
<p>Finally, it&#8217;s worth touching on restoring, which is not currently something the plugin will do for you. If you have a catastrophic loss of data, all you need to do is upload the data the plugin has downloaded and import the database backup into your new MySQL instance. In the interest of being thorough, I tried this locally and it seems to work just as expected. All my plugins were running, my pictures were there, and my themes were available. It&#8217;s not the easiest imaginable restore (I&#8217;m sure many people are still scared by phpMyAdmin), but I don&#8217;t think there&#8217;s a better option available for no charge.</p>
<p>Even with my noted issues, I can wholeheartedly say that <a href="http://wordpress.org/extend/plugins/wordpress-backup-to-dropbox/">WordPress Backup to Dropbox</a> is the first WordPress backup plugin that I feel satisfies all three of my essential backup criteria without costing more than I&#8217;m willing to spend. If you run your own WordPress blog and aren&#8217;t currently running a thorough backup plugin, you no longer have a good excuse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/08/05/best-free-wordpress-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The New and Much Improved Mini Quilt Plugin</title>
		<link>http://feedproxy.google.com/~r/ikiru/~3/fe_WGO7L_Qg/</link>
		<comments>http://feedproxy.google.com/~r/ikiru/~3/fe_WGO7L_Qg/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 21:19:44 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=409</guid>
		<description><![CDATA[After having done some work on my date-to-color algorithm, I got to thinking about all the weak points in the first and only WordPress plugin I&#8217;d published, Mini Quilt. While I do think that the quilts it created were pretty, they had a single and very strong weakness: without hovering there was no way to [...]]]></description>
			<content:encoded><![CDATA[<p>After having done some work on <a href="http://www.ikirudesign.com/2011/07/05/annual-color-algorithm/">my date-to-color algorithm</a>, I got to thinking about all the weak points in the first and only WordPress plugin I&#8217;d published, <a href="http://www.ikirudesign.com/plugins/mini-quilt/">Mini Quilt</a>. While I do think that the quilts it created were pretty, they had a single and very strong weakness: without hovering there was no way to know anything but the approximate date of the posts it was linking to.</p>
<p>The fact that there was no way to know post titles&thinsp;&#8212;&thinsp;or anything else&thinsp;&#8212;&thinsp;without hovering with your mouse pointer wasn&#8217;t a problem I grasped while building it because hovering over links to see what&#8217;s under them is second nature to me. But as time passed, I noticed two situations where even this excuse was failing to justify the poor design decision.</p>
<p>The first is browsers without a persistent information bar. If you don&#8217;t know, the information bar was a compulsory part of browsers until, I think Safari (though it could be Chrome). This was a bar at the bottom of every browser window that would show you the addresses links pointed to when you hovered over them, as well as offer other details about browser plugins you might be running, popups the browser blocked, and in the real old days, the load status of the page you were looking at. With that going away, you could still get some good information by hovering long enough that the link&#8217;s title would appear beside your cursor. But that was at best slow and of moderate usefulness.</p>
<p>Besides, the other problem made that way of dealing with the problem irrelevant. In the last five years, there has been a vast increase in use of touch-based computers for web browsing. Essentially from the time the iPhone brought the full web to cellphones, there&#8217;s been a rapidly growing contingent of people who may see your blog but have no way at all to hover over links. The only way you can find out where a link points with a touch-based browser is to visit it. So without a way to get any description of what was behind those colored boxes, they were really just mysterious distractions.</p>
<p>In the latest version of the plugin I&#8217;ve solved that problem by making it possible (but not mandatory) to show the title of the posts that a patch corresponds to. This way quilts are like a more visually interesting list of recent posts, rather than a mere pretty accoutrement for your sidebar (not that there&#8217;s anything wrong with that).</p>
<p>I&#8217;ve also, because I thought it would be fun, made it possible to randomize a quilt, putting posts into random rather than reverse-chronological order. And because of the randomize option and the proliferation of widget areas in themes, it&#8217;s now possible for you to literally use the Mini Quilt widget 1,000,000 times in 1,000,000 different widgetized ares. I hope for your sake you don&#8217;t have that many, I&#8217;m just letting you know it&#8217;s possible.</p>
<p>Finally, and least important to most users, I&#8217;ve greatly cleaned and polished everything under the hood so that it&#8217;s vastly easier to modify and much easier to understand. (As I broke into the code after two years, there were a number of things that I couldn&#8217;t make sense of, so someone who hadn&#8217;t written it almost certainly had no hope.)</p>
<p>Enough talk, let&#8217;s see it in action. Because this screenshot captures the whole thing so well, it&#8217;s the only one I&#8217;m offering. This is three different instances of the Mini Quilt widget being used in the Coraline theme. The big one is showing post titles and is arrayed as a quilt.</p>
<p><a href="http://www.ikirudesign.com/wp-content/uploads/2011/07/screenshot-1.png"><img class="aligncenter size-medium wp-image-437" title="Mini Quilt on Coraline" src="http://www.ikirudesign.com/wp-content/uploads/2011/07/screenshot-1-545x408.png" alt="Three iterations of the widget running on Automattic's Coraline theme" width="545" height="408" /></a></p>
<p>The second (left side) one is what I call a &#8220;Mini Bar,&#8221; it&#8217;s a single column (hence bar) of patches with the titles visible and the columns wide and the heights automatically tall enough to hold all the words of the title. This one is also randomized, choosing just five posts at random from among everything you&#8217;ve ever published. (For the sake of CSS, you can&#8217;t have a conventionally blocky quilt with variable heights. Well, technically, the plugin does allow it but it looks like junk and isn&#8217;t recommended.)</p>
<p>The final (right side) instance is the traditional old Mini Quilt, much as it was with the original plugin. The only difference is that this one is randomized. Thus there&#8217;s not the gradual gradient you can see in the first quilt, but rather random and abrupt color changes. Like I&#8217;ve described, there&#8217;s no way someone on an iPad will know anything but the date of the posts those patches represent unless they tap them, but it does have a visual charm that the other layouts could be seen to lack.</p>
<p>That&#8217;s what&#8217;s new in the updated version (0.8.0) of the Mini Quilt plugin, which you can get <a href="http://wordpress.org/extend/plugins/mini-quilt/">from the Extend WordPress plugin repository</a> or simply by simply clicking Add New from the Plugins menu in your WordPress installation and searching for Mini Quilt. Enjoy!</p>
<img src="http://feeds.feedburner.com/~r/ikiru/~4/fe_WGO7L_Qg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/07/25/new-improved-mini-quilt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I Made an Annual Color Algorithm</title>
		<link>http://www.ikirudesign.com/2011/07/05/annual-color-algorithm/</link>
		<comments>http://www.ikirudesign.com/2011/07/05/annual-color-algorithm/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 19:32:10 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=215</guid>
		<description><![CDATA[The foundation of my Kaleidoscope theme and Mini Quilt plugin is the color algorithm. For those who don&#8217;t know, the Kaleidoscope theme for WordPress is a simple theme I made (almost three years ago) that changes the colors of its pages based on when posts were written. (It&#8217;s the theme currently being used here.) It [...]]]></description>
			<content:encoded><![CDATA[<p>The foundation of my <a href="http://www.ikirudesign.com/themes/kaleidoscope/">Kaleidoscope theme</a> and <a href="http://www.ikirudesign.com/plugins/mini-quilt/">Mini Quilt plugin</a> is the color algorithm. For those who don&#8217;t know, the Kaleidoscope theme for WordPress is a simple theme I made (almost three years ago) that changes the colors of its pages based on when posts were written. (It&#8217;s the theme currently being used here.) It features quilts, which show recent posts in blocks of color. The small multicolored quilt in the sidebar of the theme is available separately, and can be added to any theme as a sidebar widget with the Mini Quilt plugin.</p>
<p>Both the theme and plugin are rather primitive by today&#8217;s WordPress standards because they&#8217;ve seen no changes in two and half years. But their current outdatedness is irrelevant to value of the underlying color algorithm. This article exists because someday someone may have the same idea I did and find this guide of what I did&thinsp;&#8212;&thinsp;both programmatically and philosophically&thinsp;&#8212;&thinsp;helpful. They may even find it useful to just lift my code&thinsp;&#8212;&thinsp;which is all GPL licensed&thinsp;&#8212;&thinsp;and use it as is. I&#8217;m not entirely satisfied that the methods I used here are the best possible ones, but I feel certain that anyone interested in the idea will benefit from knowing them.</p>
<h3>The Mother Function</h3>
<p>Let&#8217;s start with the primary function that either my theme or plugin calls. (Technically the currently available versions, call a similarly named but different function. As I&#8217;ve been working on getting better at web stuff, I decided to recode that version. If and when I update the theme or plugin, they&#8217;ll have this algorithm.)</p>
<pre>function date_to_color( $day, $year ) {

	$red = color_maker( $day, $year, 20, 134 ); //18, 134
	$green = color_maker( $day, $year, 20, 240 ); //20, 240
	$blue = color_maker( $day, $year, 10, 0 ); // 10, 0

	return $rgb = "{$red}{$green}{$blue}"; //concanate the calculated colors and return them
}</pre>
<p>Essentially, this is the function that is called anywhere&thinsp;&#8212;&thinsp;in WordPress the call looks like <code>date_to_color(get_the_time('z'), get_the_time('Y'))</code>&thinsp;&#8212;&thinsp;the color for a day is needed. You&#8217;ll notice that all this does is call the <code>color_maker</code> function three times and then return the concatenated (joined) six digit hexadecimal number to wherever it was called. The one thing I&#8217;d call your attention to is that it&#8217;s passing along four values to that function&thinsp;&#8212;&thinsp;the day and year that are submitted when this function is called, and two values that you&#8217;ll see later I call <code>$broaden</code> and <code>$shift</code>.</p>
<p>(If you&#8217;re wondering, it is considered good form to name functions you write with a prefix like <code>kal_function_name</code>. This prevents pollution of the global name space. For the purposes of this tutorial, I&#8217;ve left off the prefixes.)</p>
<h3>The Color Determining Equation</h3>
<p>Here we&#8217;ll begin the important function, <code>color_maker</code>. I&#8217;ve broken it into three separate sections that reflect the conceptual underpinnings of the function. Not coincidentally, when I first made this algorithm (the version that&#8217;s currently in the theme &amp; plugin) these three parts were three separate functions. It was only upon looking at what I&#8217;d done at some distance that I saw that that was needless complexity.  Anyway, here&#8217;s the first conceptual unit.</p>
<pre>function color_maker( $day, $year, $broaden=0, $shift=0 ) {

	$in_degree = .986*$day; // from 365.25=&gt;360

	/* pshift =
	New degree value = incoming period shift + degree from year - sine function
	Sine Function = Random value * sine of shifted value
		&gt; This essentially works to make the coming cosine function stay near its peak for a while
		&gt; based on the magnitude of the random value
	*/
	$pshift = $shift+$in_degree-($broaden*sin((M_PI*($in_degree+$shift))/180));</pre>
<p>The first line here&thinsp;&#8212;&thinsp;one of two that isn&#8217;t actually a comment&thinsp;&#8212;&thinsp;does a pretty simple thing. It converts from days of the year (of which there are 365.25), and makes that into 360 degrees in a circle. This is utterly straightforward.</p>
<p>The next part is a bit more complicated. Essentially, what we&#8217;re doing is getting a value (<code>$pshift</code>) ready for the next step,  a cosine function that really determines the color, by shifting our period values into more appropriate inputs to the next function. For example, January 23 needs different values for red, green, and blue in order to give the color I want. I do that here by shifting each color by the value passed on (<code>$shift</code>) from the first function. My shift values are 134 for red, 240 for green, and 0 for blue. This means that for January 23 we&#8217;ll pass along values of about 150, 260, and 20. If you know trigonometry well, you&#8217;re beginning to get a sense of what colors we&#8217;ll make.</p>
<p>There&#8217;s another component here though, which is that <code>$broaden</code> value I mentioned earlier. The need for broadening was something I realized as I started to see the colors the cosine wave function generated. They were frequently washed out and drab. I realized that if I was able to make the function&#8217;s peaks broader I&#8217;d have more color saturation which would correct that problem. That&#8217;s what that <code>$broaden</code> variable and sine function are doing. They&#8217;re creating values&thinsp;&#8212;&thinsp;with the yin and yang relationship of sine and cosine&thinsp;&#8212;&thinsp;that will favor the peaks of cosine and shrink the valleys. I don&#8217;t want to get too much into the math here (though if you&#8217;re interested I&#8217;d be happy to explain further), but just know that the larger the value I passed to <code>$broaden</code> in the first function, the stronger the peak-favoring effect is.</p>
<p>Determining what values to use for <code>$broaden</code> and <code>$shift</code> for red, green, and blue is more an art than a science. It&#8217;s where I drew on what aesthetic power I had (and the color accuracy of an uncalibrated old LCD) and where there could be the most room for improvement. To figure out what values to use, I created a page with boxes for each day of the year and fiddled until I felt the basic proportions of red, green, and blue were about right for a given season and day. Had I been using a different monitor in different lighting conditions, I may have settled on different (better) values.</p>
<h3>The Darkness Determining Equations</h3>
<p>Having gotten a single degree value (<code>$pshift</code>) for each color for a day, we need to make that into a color. That&#8217;s what this section does:</p>
<pre>	$year_diff = date('Y')-$year;
	$hshift = .08*$year_diff; // to be used for further away years fading
	if ( $hshift &gt; 1 ) { //this assures that the colors are always valid otherwise we could get negative numbers
		$hshift = 1;
	} 

	$HBASE = .82; //the center of the function; set between 0 and 2, lower are more saturated (darker)
	if ( $HBASE &gt; 1 ) {
		$HSAFE = 2-$HBASE; // $hsafe is to ensure no final values greater than 2, which would create invalid colors
	} else {
		$HSAFE = $HBASE;
	}

	/* calced_color ==
	Use Cosine to create a weighted set of results between 0 and 2
	Multiply by 127.5 to get results between 0 and 255
	dechex for results between 0 and FF
	+Change the first (and only the first) +/- to toggle fade/darken
	*/
	$calced_color = dechex(127.5*(($HBASE-($HSAFE*$hshift))+(($HSAFE-($HSAFE*$hshift))*(cos((M_PI*($pshift))/180)))));</pre>
<p>It&#8217;s important to realize that much of this is preamble. The last line&thinsp;&#8212;&thinsp;the one that begins &#8220;<code>$calcedColor = ...</code>&#8220;&thinsp;&#8212;&thinsp;is the important one. Everything else is just tuning up before the show.</p>
<p>The first part of this related to the year. In addition to deriving a different color for each day, my color function also determines brightness based on age. Two posts from July 5, one from today and one from four years ago, will be noticeably different shades. This means that a quick glance at a color derived from the date can tell not only that a post is from Julyish, but Julyish a few years ago.</p>
<p>To do this we essentially figure out how much the submitted year&thinsp;&#8212;&thinsp;passed on from the preliminary function&thinsp;&#8212;&thinsp;differs from the current year, and then make an <code>$hshift</code> value for it. Because a post could conceivably be more than 12 years old&thinsp;&#8212;&thinsp;which is when they become uniformly black&thinsp;&#8212;&thinsp;any value over one that might arise is just adjusted down to uniformly black.</p>
<p>The next block of stuff are a number of constants that I keep around only for the sake of future tuning of the function. <code>$HBASE</code> is essentially what will be the center point of our cosine function, and <code>$HSAFE</code> just assures that no value of <code>$HBASE</code> will break the cosine function. They&#8217;re not really doing much here, but if I or anyone else feel like tweaking the function, I&#8217;d rather it be easy and obvious to edit than hard. (If you are interested in tweaking, higher values of <code>$HBASE</code> give lighter colors. Setting it to 1.3 gives pastel colors, setting it to .6 gives significantly darker hues.)</p>
<p>Finally we&#8217;re to that important final line, which does about twelve different things. The important ones, starting from the right and working left are: uses  multiplication with some <code>$h</code> values and cosine to get a basic value for a given color, and them shifts that around by adding and subtracting more <code>$H</code> values to get a value between 0 and 2. Then it multiplies by 127.5 to get a value between 0 and 255, the limit of two-digit hexadecimal numbers, and converts that number into hexadecimal, yielding a final range between 0 and FF. (Again, vagueness on the math is intentional, because otherwise this thing would be even longer than its current too-long length. I&#8217;m happy to provide more detail if desired.)</p>
<h3>The Kludge</h3>
<p>This final bit is a kludge that I couldn&#8217;t find a way around (even while I think there must be one.)</p>
<pre>	if ( strlen( $calced_color ) &lt; 2 ) { //single digit calced_color values give invalid colors
	  $calced_color = "0".$calced_color; // so add a zero if it's a single digit
	}	

	return $calced_color;
}</pre>
<p>Essentially, after each color&#8217;s (red, green, and blue) value was determined between 0 and FF, I had a problem. If the red value was 253 in decimal, that converted to the two digit hexadecimal number FD. That was all well and good, but if the value of red had instead been 3 in decimal I would get 3 in hexadecimal. Because a five-digit color value like <code>3FDFD</code> isn&#8217;t valid, I need to ensure that I instead get <code>03FDFD</code>, which was assured by this function. Its essential logic is: &#8220;Is this number shorter than two digits? If yes, put a zero on the front.&#8221; Thus FD stays FD, but 3 becomes 03, and D become 0D.</p>
<p>After that kludge, the function returns its two digit hex number to the primary function, where it&#8217;s melded with the two others it derived to give a single six-digit value back to the theme or plugin that asked for a color. Thus given values like 188 (today&#8217;s day of the year) and 2011 (this year), it derives this sort of brownish yellow that you&#8217;re reading this post on. I think it conveys pretty well the dried out heat that I think of in July. It does this by iterating three time (once each for red, green, and blue) through a function with three steps. Those steps are essentially (1) shift to account for the amount of a given color that&#8217;s appropriate for the time of year (2) figure out the two digit hexadecimal value to get the right quantity for that color and (3) ensure success in making a six digit hexadecimal color.</p>
<p>I&#8217;ve not cured cancer for you, I know. But I hope I&#8217;ve given a new way to look at colors, and some valuable knowledge about one way to play with them. Before I close, it seems appropriate to note that I was turned on to this idea by <a href="http://si10.shauninman.com/">Shaun Inman</a>, though the implementation is all mine. I&#8217;m hoping that if my discussion has gotten you interested in this game, you now have some idea how to start.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/07/05/annual-color-algorithm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twice Monthly</title>
		<link>http://feedproxy.google.com/~r/ikiru/~3/jJqpmv7OhKo/</link>
		<comments>http://feedproxy.google.com/~r/ikiru/~3/jJqpmv7OhKo/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 21:13:36 +0000</pubDate>
		<dc:creator>david (b) hayes</dc:creator>
				<category><![CDATA[Ikiru Design]]></category>

		<guid isPermaLink="false">http://www.ikirudesign.com/?p=406</guid>
		<description><![CDATA[I&#8217;ve been giving it some thought, and I think I&#8217;ll be better off publishing this site twice a month rather than once. Doing so will allow my to keep momentum, and make me feel more comfortable publishing more &#8220;here&#8217;s a thought or plugin you might not know&#8221; stuff. So instead of the first of every [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been giving it some thought, and I think I&#8217;ll be better off publishing this site twice a month rather than once. Doing so will allow my to keep momentum, and make me feel more comfortable publishing more &#8220;here&#8217;s a thought or plugin you might not know&#8221; stuff. So instead of the first of every month, I&#8217;ll be publishing here on the 5th and 25th of every month. (If you&#8217;re wondering why such odd dates, it&#8217;s because I like the number 5 and these comfortably allow me to keep up my every 15th schedule at <a href="http://www.frozentoothpaste.com/">Frozen Toothpaste</a>).</p>
<img src="http://feeds.feedburner.com/~r/ikiru/~4/jJqpmv7OhKo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.ikirudesign.com/2011/07/01/twice-monthly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

