Archive for January, 2007

james: disgraceful

Comments (6)

james: Playing with the Gallery

Since Cheryl’s been busy uploading images I’m playing with WPG2 to get some blog integration. I haven’t gotten the sidebar working yet, but here’s a picture from our last anniversary trip.

DSCF0175

Comments off

cheryl: Updated Gallery

Check out all the new gallery images. Since we have space and images usually upload well I’ve added quite a few. They include two different cousin’s weddings, our honeymoon before I got sick, 2004 Christmas pic’s and some of our Pippin when he was a kitten.

Comments off

james: Drupal 4.6 to WordPress migration

On the off chance the someone somewhere will find it useful, I’m posting the SQL script I used to migrate to the new site. The script is based on Dave Dash’s writeup for migrating from drupal 4.7, with a few additions to preserve author information.

A few caveats:

  • The script doesn’t handle user migration, but assumes that it’s already happened. We only have a dozen user accounts, so a manual migration was pretty quick. The good news is that drupal and wordpress use the shame hashing function for passwords, so the accounts transfer seamlessly.
  • The script only migrates taxonomy terms, blog posts and comments. You’re on your own for stories, pages and anything else.

    On with the code:

    USE blog;

    -- Clear everything out of WordPress
    DELETE FROM wp_categories;
    DELETE FROM wp_posts;     
    DELETE FROM wp_post2cat;
    DELETE FROM wp_comments;


    -- Copy taxonomy terms to categories
    INSERT INTO
        wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, category_count)
    SELECT
        term_data.tid, name, LOWER(name), description, parent,
        (SELECT count(nid) FROM drupal.term_node tn WHERE tn.tid = term_data.tid)
    FROM drupal.term_data, drupal.term_hierarchy
    WHERE term_data.tid=term_hierarchy.tid;

    -- Copy blog nodes to posts
    INSERT INTO
        wp_posts (id, post_author, post_date, post_content, post_title,
        post_excerpt, post_name, post_modified, comment_count)
    SELECT DISTINCT
        n.nid, (SELECT ID FROM wp_users WHERE user_login = u.name), FROM_UNIXTIME(n.created), n.body, n.title,
        n.teaser,
        REPLACE(REPLACE(REPLACE(REPLACE(LOWER(n.title),' ', '_'),'.', '_'),',', '_'),'+', '_'),
        FROM_UNIXTIME(n.changed),
        (SELECT count(c.cid) FROM drupal.comments c WHERE c.nid = n.nid)
    FROM drupal.node n, drupal.users u
    WHERE n.uid = u.uid AND type='blog';

    -- Link the copied posts to their categories
    INSERT INTO wp_post2cat (post_id,category_id) SELECT nid,tid FROM drupal.term_node ;

    -- Copy comments
    INSERT INTO
        wp_comments
        (comment_post_ID, comment_author, comment_date, comment_content, comment_parent, user_id)
    SELECT
        c.nid, u.name, FROM_UNIXTIME(c.TIMESTAMP),
        CONCAT('',c.subject, '<br />', c.comment), c.thread, (SELECT ID FROM wp_users WHERE user_login = u.name)
    FROM drupal.comments c, drupal.users u
    WHERE c.uid = u.uid ;
     

Comments off

james: Oldness, Newness

Well, we’re back. I thought I’d give a quick rundown on what happened to the site.

New Host

When we launched the site I decided to self host. Speakeasy is a very generous ISP, so we have a static IP with very few restrictions on how we use our bandwidth. So I installed drupal on my old K62 (anyone else remember that computer show at the Scottish Rite?) and we were off and running.

At some point a month or two ago the server died (apparently the, umm, keyboard… came unplugged…) and due to a firewall, a new router and a fish tank I couldn’t get it back online right away. So I just ignored it.

Last weekend Cheryl finally prodded me into doing something about it, so I signed us up with Dreamhost and moved the site.

New Software

As part of moving the site I decided to switch software. I really like drupal, but it was overkill for what we were doing. Since everyone else seems to be getting along swimmingly with WordPress, I’ve been playing with Lyceum at work and Dreamhost offers a “one-click” install, a migration seemed like a good idea.

The migration went very smoothly, and now we have a nifty little shoutbox and buggy weather thingy that we shamelessly nicked.

New Look

I’m happy to say WordPress is much easier to theme than drupal. I created this design back in 2005, but after getting bogged down in drupal’s admin sections and losing my code in a reformatting, I just let it languish. In contrast, the WordPress theme only took a few hours last Sunday. I grabbed a copy of Almost Spring (no particular reason, it was handy) and just started hacking at the stylesheet.

For the insanely curious I’ve uploaded my original .svg. I created it with Inkscape (wonderful open-source graphics package), but it looks like crap in every svg viewer I’ve tried.

Comments off

« Previous entries Next Page » Next Page »