Archive for the 'wordpress' Category

WordPress Upgrade

Just finished upgrading to WordPress 2.5, the latest K2 nightly, and a few other plugins. All went pretty smoothly, except my custom K2 style needed some tweaks to the CSS due to some selector changes in K2's markup. They've done some nice things with the admin UI, and the new Admin Drop Down Menu makes it way better.

One thing I noticed is that the post slug is committed on the first autosave, which I don't recall being the case before. You can edit it, of course, but if enter you title, and then to edit it later, your slug isn't automatically updated anymore. The category list is also in a far less handy position beneath the editor, rather than next to it.

Overall, however, looks like good stuff. Still waiting for official Wordpress 2.5 support from K2, but certainly not holding anything up.

Dumbass Alert

Please ignore my previous post about per-post uploads not working on Firefox. As I was lying in bed, bemoaning my plight to Heather, I realized exactly what the problem was. Adblock. I had a filter defined for "*ad.php*", which just happens to match "upload.php". Changed it to match "*[^o]ad.php*" and it works like a charm. Much happier now. ; )

Help Me: Per-Post Uploads in Firefox on Linux

WordPress has the ability to upload files directly on the add/edit post/page form, which is really handy.  However, I can't get it to work with FireFox on Linux (2.0.0.2 and CentOS 4, respectively); the section of the form just doesn't show up.  The IFRAME that houses it is in the page, but it's zero-height for some reason.

Uploading works happily with FireFox on Windows (multiple machines), as well as with Mozilla SeaMonkey on Linux (the very same CentOS 4 box).  If anyone out there has seen this and knows of a solution, I'd love to hear it.

Between Posts Plugin for WordPress

I wrote a little WordPress plugin for managing content between posts on listing pages.  Since those listings are time based, the "between" space is governed by the date range between the posts above and below it.  The actual impetus for it was to inject a history of my bike rides into my blog, without them being actual entries (and therefore included in feeds).  If you scroll down a bit, you can see an example.

The files are available for download, should you wish to use them.   Since there isn't a native hook for "between posts", I had to create my own.  Consequently, installation is more than just drop in the plugin and activate.  Inside 'between-post-registry.php' there is an example of the code that needs to be added to your display template(s) with The Loop that renders entries.  Once that's set up, you can add as many other between post plugins as you want, and they'll all be executed for each "between".  Included are two examples: a very simple test that just outputs the date range, and the bike ride plugin I'm currently using.  The latter has a database dependency and is really only there as a more complex example, not as something directly useful.

If anyone's interested in the bicycle database schema, I'd be happy to share, just leave a comment.