Yesterday turned out to be a day of upgrades and updates, both planned and not.

Part I

I spent a couple of hours over at a friend and coworker’s house updating one of the coolest Macs ever from OS 9.1 to Panther. I was a little nervous doing such a major jump on a computer that wasn’t mine, but I have gone through the process a couple times on my old G3 so it wasn’t unfamiliar. Before starting, I had to take the chassis out to add some RAM which reminded me again of how thoughtful Apple is in most cases when it comes to component access. We got Mail set up in no time and experimented with how OS X plays with here printer, camera, and external CD burner. The answer? Perfectly; no drivers required.

After playing with the eject button and watching CDs pop out like toast out of a toaster, the process was complete and we had some pizza and cookies.

Part II

In what has to be one of the most bizarre effects of peer pressure, I felt obligated last night to update to WordPress 2.eh. The update process is well-documented on their site and I bugged PDF about it as I went along, but when all was said and done, I was on 2.0 with no pain whatsoever.

Because of the extensive UI changes, one of the first steps was re-downloading the WP Tiger Administration plugin, version 2.0. After getting that going, I added a couple lines to the CSS at PDF’s suggestion:

.dbx-content #categorychecklist {height: auto;}

This one extends the categories list instead of making it scroll.

#uploading {display:none;}

This one hides the image upload option on the post page. Considering that I frequently use that feature, you might wonder why I’d choose not to show it, and the answer is simple. The only reason I used the built-in image uploader in the first place is because it could automagically create 180×90 thumbnails for my archive page. The thumbnail feature on WP 2.0 is conspicuously absent, which renders the entire option worthless.

I decided to do some playing around with this, and copied the WP 1.5 upload.php file into the new wp-admin directory, and it still works! One problem solved. The next issue was figuring out a way to link it from the other pages. In 1.5 it would’ve been in the main navigation. Alternatively, I decided it would work nicely in the subnav, as shown:

WP 2.0 subnav with Upload Image option

To do this, I added the highlighted line of code (thanks Paul) to line 22 of the menu.php file under wp-admin:

$submenu['post.php'][5] = array(__('Write Post'), 'edit_posts', 'post.php');
$submenu['post.php'][10] = array(__('Write Page'), 'edit_pages', 'page-new.php');
$submenu['post.php'][15] = array(__('Upload Image'), 0, 'upload.php');

So far, so good, but there were still a few issues. The ability to specifiy the upload directory has mysteriously vanished from the Options > Miscellaneous page as well. This is handled by the options-misc.php file in the wp-admin directory. Like I did with upload.php, I simply copied the 1.5 version back over, so I can now specify the directory I want my images to upload to.

The final issue was how WP 2.0 handles thumbnails, which is bizarre since I don’t know how you’re even supposed to make it create thumbnails with the current UI. Regardless, rather than using the traditional thumb-IMAGENAME.jpg it now uses IMAGENAME.thumbnail.jpg by default and with nowhere to change this option in the admin menus. Because I have nearly 200 posts and all of them have thumbnails named with the old convention, it was easier to just try to hack it back to 1.5 standards. As it turns out, this is handled by the admin-functions.php file, also in wp-admin. I basically reverted that section to the old version by commenting out the stuff that didn’t match up and pasting in the old rename function (~line 750). The result:

// If no filters change the filename, we'll do a default transformation.
// if ( basename($file) == $thumb = apply_filters('thumbnail_filename', basename($file)) )
// $thumb = preg_replace('!(\.[^.]+)?$!', __('.thumbnail').'$1', basename($file), 1);
// $thumbpath = str_replace(basename($file), $thumb, $file);
$path = explode('/', $file);
$thumbpath = substr($file, 0, strrpos($file, '/')) . '/thumb-' . $path[count($path)-1];

After all is said and done, WP 2.0 now handles image uploads identically to WP 1.5. I’m happy to say that, aside from this, everything else about 2.0 seems fairly good. I really like the live preview option that lets you view the post in its intended environment before going live, especially for instances like this where I’m using certain classes for the first time. I can’t honestly say that I took advantage of a lot of the other features in WordPress so I don’t notice a huge difference between the two versions, especially with the Tiger plugin obscuring the new UI design.

Overall though, I’m glad it’s over and done with, and the average WordPress user won’t have nearly this much trouble with the upgrade.