Economies of abundance

This really struck a chord with me:

“Making money from open source is a hack though, as our currencies are based in scarcity and our peer economies are based in abundance. In the latter, the more people participating means the more everyone benefits.”
Daniel Bachhuber – an economy of abundance

Experiments with WP Cron

I’ve got a couple of projects coming up which are going to require scheduling tasks in WordPress either to go off and get stuff, or to check whether posts displayed are still accurate, etc. Luckily, WordPress has a pseudo-Cron implementation which I plan to use to .

Let’s take a step back first and remember what Cron is: Cron is the scheduling service for UNIX-like systems which can set tasks occur at specific times or to recur at specific intervals. So you can use Cron to tell your system to do something at 12:47 on the 14th April, 2009 or to perform a task at 12 minutes past midnight every Monday, it’s a very useful service.

WordPress is not naturally a proactive beast, so unfortunately your WP site will not spend it’s day checking the time and seeing if it’s got anything to do. This is where the pseudo come in, with the WordPress pseudo-Cron we’re relying on a constant flow of visitors to trigger WordPress into checking for scheduled tasks. The upshot of this is that we cannot rely on WordPress to precisely schedule events, but the system is good enough for most things. (We can always increase the frequency of visitors artificially by targetting the site with five minute checks by Pingdom or similar, with the added benefit that the site is now monitored for downtime.)

So let’s get into the details of how all this stuff works, shall we? Continue reading Experiments with WP Cron

Adding GET params to a URL in WordPress with add_query_arg

I am finding myself using this function a lot now, and I constantly forget the function name:

add_query_arg();

It allows you to pass in some additional parameters, and a URL, and receive back the URL with the query string params added. For example:

$some_url = "http://simonwheatley.co.uk/?stuff=whatever";
$params = array( 'wp_siteurl' => "http://www.example.com" );
$some_url = add_query_arg( $params, $some_url );

This will result in a url something like this:

http://simonwheatley.co.uk/?stuff=whatever&wp_siteurl=http%3A%2F%2Fwww.example.com

Pretty cool, huh? So now you don’t need to worry about what parameters are already in the URL, you can just hand all that hassle to add_query_arg.

Update: See also remove_query_arg.

BarCamp Leeds – “my last project”

If you’re attending BarCamp Leeds, I need YOU.

I’d love to know what you’ve been up to recently, and what better way to find out than for you to tell me (and everyone else) as part of an open mic “my last project” session.

Continue reading BarCamp Leeds – “my last project”

Firefox autocomplete and dual monitors on OS X

There’s an irritating bug on Firefox for OSX when you’re using it with dual monitors. If you plugin the monitor after you’ve started Firefox, and it is in the secondary monitor, the autocomplete for URLs and for search queries will appear on the primary monitor. Very confusing. The solution is to restart Firefox (which retains the current set of opened websites in tabs and windows), for which I use the Restart Firefox plugin recommended by Sam Clark.

Tom Smith: Things you don’t know, but might, at BarCamp Leeds 2007

Tom Smith, of Everything Ability, gave an entertaining & refreshing talk for the last of my BarCamp Leeds sessions. A wonderful roll call, reminder and rallying cry for what he felt were great but neglected ideas things.

Continue reading Tom Smith: Things you don’t know, but might, at BarCamp Leeds 2007

Mark Rushworth & Dominic Hodgson: SEO Clinic at BarCamp Leeds 2007

Around the campfires late at night, old Leeds GeekUppers tell tales of the legendary SEO (Search Engine Optimisation) clash of Hodgson and Rushworth at a Leeds GeekUp many moons ago. Apparently Hodgson is (I’m hoping someone can fill me in). Apparently Rushworth is (not sure, I wasn’t there). Anyway, it was heated, let’s just leave it there. At BarCamp Leeds 2007 a gauntlet slapped down on the York stone steps and was accepted, scores were to be settled, the stage was set.

Continue reading Mark Rushworth & Dominic Hodgson: SEO Clinic at BarCamp Leeds 2007