Skip to content

Mostly smooth WP 2.2 upgrade

Upgrading this site to WordPress 2.2 went rather smoothly, a lot quicker than the WP 2.1 upgrade. Not too surprising, as the differences between 2.0 and 2.1 were much greater than the ones between 2.1 and 2.2.

The change that might make a difference to you, dear readers, is that this site now has an Atom 1.0 feed for all articles (http://iwaruna.com/feed/atom/), which you may use as an alternative to the usual RSS 2.0 feed (http://iwaruna.com/feed/).

Notes on this upgrade, mostly for my own reference:

A. For articles with zero comments, closed comments and closed trackbacks, the font for the “Comments Off” label (e.g., in the home page) appeared too small. In WP 2.2, that label appears within an “extra” span element without and class or id. This was due to a change in function comments_popup_link() in /wp-includes/comment-template.php, described in ticket 2180. I guess the gist of this was to allow styling when that label occurs. But since my theme doesn’t utilize it (i.e., the unnamed span), I added a CSS hack to both accommodate the code change and workaround the font size issue.

B. Updated the function smilies_init() in /wp-includes/functions.php (previously vars.php in WP 2.1) to refer to custom smilies. (For the curious: Borrowed from a freely available Adium emoticon set.) Also updated the folder containing the smiley image files.

C. Added the Atom 1.0 subscription link to the Subscribe section in the sidebar. I haven’t added Atom feeds for comments (seen in single post pages) and categories (seen in Archives). Need to poke around the Codex and WP forums to see how others have implemented those kinds of feeds.

D. Update the WordPress / Gallery 2 Integration plugin (WPG2) to the latest version, 2.12. Once again, I ran into the broken image issue, so had to re-modify my gallery’s .htaccess so that they’d display again. Seems to happen every time I upgrade WPG2, and Gallery’s fussy URL Rewrite plugin is to blame. Documenting my steps here, in case I encounter this again.

  1. To begin with, I’ve already turned off hotlinks in Gallery, to prevent other sites from hotlinking to content there. This was done under Site Admin ⇒ URL Rewrite ⇒ Rules: Near the bottom of the page, select the checkboxes (turn on) for “Block hotlinked items” and “Send HTML for hotlinked items.” No URL pattern or keywords are needed for either setting.
  2. Upgrade WPG2. Notice that images are broken. >:-( So I need to re-allow hotlinking specifically from this site.
  3. Modify the .htaccess for the Gallery server. Fire up vim (or your editor of choice), and go to the section of this file called # BEGIN Url Rewrite section
  4. Locate this line: RewriteCond %{HTTP:Referer} !^$
  5. Right underneath this line, add this one: RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mysite.dom [NC] where mysite.dom is the site you want to allow hotlinks from.
  6. Repeat for other instances of line 4 in the specified section, which in my case occurred twice.

2 comments

  1. Cameron wrote:

    What have your experiences been like with the WYSIWYG editor in WordPress? I’ve been thinking about upgrading MWD, but the editor is so badly behaved that I can’t justify it…and I’m not enough of an Alpha Geek to do my own TinyMCE integration. :S

    Tuesday, 22 May 2007 at 9:11 am | Permalink
  2. sairuh wrote:

    Cameron, I rarely use the WYSIWYG editor in the WP web interface, because I’ve found it either slow or confusing. I am glad they added to code view option in WP 2.1, though, for when I need to edit the “static” pages. (I think there’ve been more changes in WP 2.2′s Write UI, but haven’t tried it out yet.) Instead I use MarsEdit for blog posting, and have set it up to call Smultron for detailed text editing. MarsEdit is $25 (free 30-day trial), but Smultron is free and open source. Both are native Mac OS X apps.

    Tuesday, 22 May 2007 at 10:26 am | Permalink

Submit a comment

Your email is never published or shared. Required fields are marked with a red diamond, .