Xhtml Friends Network

Xhtml Friends Network (XFN) is yet another area of the blogging world. XFN is a technology that can be used to build human relationships networks. Basically, it is an addition to XHTML standard, which allows to mark URLs with a number of relationships, such as acquaintance level, wheather you’ve met a person or not, if he is a part of your family and wheather you are working with him or not.

The URL marking is really easy, but I wouldn’t have bothered with it, unless WordPress supported it. In fact, I’ve learned about this technology from the WordPress. It supports the XFN by default and provides an excellent management interface in the links administration section.

I have therefor marked all my links in the sidebar with appropriate XFN tags and I have also submitted my site for spidering.

Happy birthday, grandpa!

Today is the 76th birthday of my grandfather (my father’s father). It’s been a while since I last saw him in 1997, but from what I hear he’s still kicking and rocking. I have only one old and lousy picture of him with my cousine. But that should change soon, because:

  1. I asked my father to find a digital camera and make a few pictures at grandpa’s birthday party. With some luck he’ll do so and send me the pictures.
  2. I promised both my grandpa and my grandma that I’ll bring Maxim one day to show him to them. Of course, that’ll require a long trip from Cyprus to Russia, so we’ll have to wait a bit until Maxim grows up and becomes strong enough. That will take about a year, but that will happen.

Anyway, happy birthday grandpa and all the best wishes from all of us. You know.

Update: I called my grandpa today and he said that my father did show up with the digital camera and he did make a few pictures. Hooray! Half of the job is done. Now all he needs to do is actually send these images to me.

Blogroll separated

My blogroll grew a bit lately and started to slow things down. I’ve decided to move it to a separate page – Blogroll. I’ll keep only a handful of links on the right tab. In case you want to see more, there is always a link to it on the sidebar, as well as in the navigation bar.

If you are wondering how I integrated the blogroll like this into WordPress, here’s how I did it:

  1. Create a separate page in WordPress admin.
  2. Update .htaccess file to properly handle permalinks for the new page.
  3. Install and activate WordPress PHP Exec plugin
  4. Export BlogLines profile via PHP Exec plugin, like so:
    <phpcode>
    <?php
       include ('http://rpc.bloglines.com/blogroll?html=1&id=leonid');
    ?>
    </phpcode>
    

Note: change ‘leonid’ in the above URL to your BlogLines username.

nucleus2wordpress

Once I promised to release the script that I wrote while migrating from Nucleus CMS to WordPress. Well, here it is. But I doubt that you should start any serious celebrations, since this one is pretty messy and based very much on my setup. Let me try to explain a couple of things to make it easier for you.

Expectations (read: limitations):

  • This script expects that all your Nucleus tables have nucleus_ prefix and all your WordPress tables have wp_ prefix. These are the defaults anyway, so I don’t think this is much of a problem.
  • This script expects that all your Nucleus tables and all your WordPress tables are located in the same database. And I really don’t see the reason to separate them anyway. You’ll just delete Nucleus tables after migration.
  • This script expects that your WordPress upload directory is /wordpress/wp-content. This is again one of WordPress defaults, so I don’t think it will matter much.
  • This script expects that inline images in your Nucleus posts were surrounded by the <div class="leftbox">...</div> and <div class="rightbox">...</div>. If you had it differently, you’ll have to play with regexps.
  • This script expects that all authors who posted items in Nucleus have the same username (aka login) in WordPress. Since I was and will be the only user posting items, that was pretty easy for me.
  • This script expects that all categories that existed in Nucleus have the same name in WordPress. It does not create these, since WordPress has a more advanced cateogory functionality (with nesting and stuff), so you’ll have to deal with this.
  • This script does not create slugs (short-names-with-hyphens) for WordPress items, so if you are using post titles in your permalinks, they won’t work. I was (and still am, for that matter) fixing this with a bunch of other tiny script which I won’t post here for their uglyness. Find your own solution or don’t use post items in the permalinks.

Features (read: things I cared about)

  • This script migrates Nucleus posts to WordPress. NOTE: Nucleus uses two database/forms fields for the post body and extended part (aka ‘Read more’). WordPress has only body in database/forms, but provides a <!--more--> tag to separate the post in parts. My script is using this tag when combining Nucleus post parts into WordPress single post.
  • This script can migrate either all posts or posts written after the certain date.
  • This script migrates Nucleus comments to WordPress. This script will use Nucleus members information (names, URL, email) and information that was provided via comment submission form smartly. Well, as smart as works for me. :) Comments are assigned to posts based on the post time AND post title. This should be right most of the times.
  • This script tries to be as verbose as possible during the migration process, so that you always know what it does. (I consider this to be more of a feature than a limitation.)

Once again, remember that this script wasn’t written to work for the general public, since the amount of customization that can be (and usual is) done to both Nucleus CMS and WordPress is enormous. I wrote this script as a quick hack to help me with a one time task, so don’t expect much. If things go wrong, check the regexp bits first, and the SQL bits second.

Without further ado: nucleus2wordpress.pl

P.S.: If comments in the script appear strange or incorrect, consider the fact that I wrote them few days after I wrote and used the script itself…

Update: If you used this script, you might be also interested in Fixing WordPress slugs post.