Sorting on version numbers with PHP

Posted by & filed under Programming.

Needed a quick way to sort on version numbers, and PHP has a usort function that makes it pretty easy. You’ll need an array to sort and call the usort function with a callback. Now the callback. We’re going to use version_compare. Only minor quirk is the * -1 to flip version compare. I wanted… Read more »

Amazon Images plugin for WordPress

Posted by & filed under Blogging, Programming.

Every now and then I like to link to Amazon products, along with an affiliate tag. Nothing spammy. But I figure if I’m going to link to something that they make money off of, I might as well try to make a bit as well, right? Downside is that the link builder inside Amazon typically… Read more »

Count all post in a WordPress blog network

Posted by & filed under Blogging, Programming.

Needed this bit of code to keep count of the total number of posts in a network enabled WordPress site. It pulls the list of blogs and the goes through each, gets the post count, and sums it up. Certainly not real efficient, and doubtful you’d want it to run often on a large network…. Read more »

Comparing two SVN branches – thank you TortoiseSVN

Posted by & filed under Programming.

Updating the available pre-release version of ProofBuddy was on my to do list last weekend. A few months ago I wrote a script that pulls a specified version from a subversion tag and packages it up. For the last couple of weeks I’ve been sitting on a beta version to give testers a chance to… Read more »

WordPress script not working from the command line

Posted by & filed under Blogging, Programming.

Spent most of yesterday working on a script that interfaces with WordPress to update posts as it runs. It wasn’t a big part of the script, but it was the part that caused the most frustration. When I was testing locally, I was running the script through a web browser and everything worked perfectly. But… Read more »

Pocket Reference for RegEx

Posted by & filed under Programming.

Not that it happens often, but every now and then I actually clean off my desk. It’s one of those things that I sort of know intuitively that I work much better with clean desk. This book on regular expressions, one of the Pocket Guide series by O’Reilly, is one that tends to always be… Read more »

Installing my own WordPress plugins

Posted by & filed under Blogging, Programming.

Twice today that I’ve needed to install my Auto Future Post WordPress plugin to a blog that didn’t have it yet. A little odd searching for yourself on the WordPress extend library, but it’s pretty easy to find when you know exactly what you’re looking for. And it says something about how easy it is… Read more »

Started a calculator website

Posted by & filed under Programming.

Not real exciting, since there are hundreds out there on the internet. But I started a new website with, well, just two javascript calculators for now. I’ve got more planned, but that’s all that’s there for now. Two reasons for putting up a site, and no, lack of free time was not one of them…. Read more »

Auto Future Post Date WordPress Plugin

Posted by & filed under Blogging, Programming.

Need a way to automatically schedule posts for X number of days past your current latest post? On another blog I write a handful of posts at a time and schedule them out over several days.  But I have to keep going back and forth to the post list to check dates.  This plugin adds… Read more »