Eeek! The load-page-new.php and load-page.php actions have vanished!

So WordPress 3.0 is out, and some of the useful admin area load-* hooks that I use have vanished or changed. To refresh your memory, there are individual and specific hooks which run whenever WordPress loads an admin page. These hooks are named after the PHP file in the URL to the admin page, for example the URL to create a new post is post-new.php so the action you can hook when this page is loaded is “load-post-new.php“. All good. Very handy.

In WordPress 3.0 the URLs to create a post and edit a post are now all post-new.php and post.php, with the post type being passed in a GET parameter like so: post-new.php?post_type=page… i.e. load-page-new.php and load-page.php action hooks have both vanished! Never fear, there are two ways around this problem, read on… Continue reading Eeek! The load-page-new.php and load-page.php actions have vanished!

I’ve made a useless WordPress plugin…

…which you might find useful if you develop plugins with system requirements, like a particular version of PHP. This plugin is a simple proof of concept for a method of messaging the user when they activate a plugin.

Continue reading I’ve made a useless WordPress plugin…

Exclude Pages now hides child pages where appropriate

Exclude Pages (my WordPress plugin which allows you to remove pages from site navigation) now handles child pages more gracefully. Previously, when you excluded a page any child page would drop down a level, taking it’s place… not what I wanted, and not something I’d noticed because I was only dealing with single level navigation when I wrote the plugin. Continue reading Exclude Pages now hides child pages where appropriate

Exporting from MySQL to CSV

Everytime I need to do this I go into at least five minutes of Googling for a decent solution. The problem is that a lot of people don’t have access to the commandline, so the solutions all reference PHPMyAdmin which is, you know, OK, but I don’t use it or want to install it just to export some quick reports. Other solutions are similarly indirect.

Continue reading Exporting from MySQL to CSV

Staggering onwards is not good

For animals, pain is a signal that something is wrong and it needs fixing. If pain didn’t exist we’d all be accidentally leaving our hand on the burning gas hob, or on the electric bar fire and wondering about the burning smell long after we’d been injured. We want to know when something isn’t right, and we want to know as quickly and “loudly” as possible.

Writing (programming) a web application is similar. Continue reading Staggering onwards is not good

Disappearing Photoshop cursors

I’ve had a problem for some time now: my cursors in Photoshop CS3 on OS X are invisible. I’ve no idea why, or how it happened, but it’s really awkward when you can’t see where your mask is going to start, or where you text cursor is going to blink into being.

The solution

After a lot of Googling I came across another person (maybe called Mark, from detective work in his Flickr stream) with a similar problem, which started me off to find a solution. So far the only way I’ve found of solving this is (and this is OS X specific):

  1. Quit Photoshop
  2. In Finder, Go to Folder: ~/Library/Preferences/Adobe Photoshop CS3 Settings/
  3. Delete, or move to another folder temporarily, this file:Adobe Photoshop CS3 Prefs.psp
  4. Restart Photoshop and (hopefully) breathe a sigh of relief…

There must be a better way of doing it, and I still don’t know what triggered the problem, but at least the cursors are back. Cursors! I kiss you!

The Government double charges us for data

I’ve just felt sufficiently exercised to write to my MP, about the UK government charging for information they’ve collected with our (the UK taxpayers) money. For example, I’m doing a location based events search for Arts & Kids. The data underpinning this has been collected by OS and the Royal Mail, using tax payers money, and yet the charity is having to pay for it in order to provide a free service to UK citizens.

Continue reading The Government double charges us for data