Archive for September, 2009

Blue Raspberry

20090927.1632 #photography

Blue

Blue

Below the Fold »

Go ahead and, like, tell me your opinion man. »

Cape Perpetua

20090926.1842 #photography

Exploding Water

Exploding Water

Below the Fold »

Go ahead and, like, tell me your opinion man. »

Making the WordPress OPML Export slightly more useful

20090922.1825 #blog

The WordPress OPML export tool is a fantastic utility, albeit rather clunky, for converting a WordPress blogroll into an XML file that can be read by many different link import utilities. However, one of the thing it lacks is the ability to export link descriptions along with the links. After a beverage of sloe gin and orange juice, I sat down at my computer and vowed to find a solution to this little hiccup. Thankfully the solution was mind-numbingly easy. Check this out:

If you’re at all PHP-inclined, then this will be a snap. In your WordPress folder, open up the wp-links-opml.php file in a text exitor of your choice. At line 54 (or thereabouts), there should be text that reads:

<outline text="<?php echo $title; ?>" type="link" xmlUrl="<?php echo esc_attr($bookmark->link_rss); ?>" htmlUrl="<?php echo esc_attr($bookmark->link_url); ?>" updated="<?php if ('0000-00-00 00:00:00' != $bookmark->link_updated) echo $bookmark->link_updated; ?>" />

Well, right after the text echo $bookmark->link_updated; ?>” and before the text /> , add the following text:

description="<?php echo esc_attr($bookmark->link_description); ?>"

What this does is add your all-important descriptions to the OPML file when it exports. Yay! Now you don’t have to manually add all the descriptions when you transfer your blogroll to another WordPress install.

Now if only I could figure out how to make the OPML import utility recognize and automatically generate categories in WordPress from the OPML file. But I’ll save that for another beverage.

el jo

Here’s the code if you’d like to simply copy it and swap it out with your existing /wordpress/wp-links-opml.php file. Just save it as wp-links-opml.php.

1 dude has something to say. »

Fall 2009 OP Newsletter ©

20090914.1012 #professional

OP Fall 2009 Newsletter

OP Fall 2009 Newsletter

Below the Fold »

1 dude has something to say. »