Entries

BlatherSource is now running under Drupal!

A Quick History Lesson

You may recall that not so long ago, I switched my blog site from Serendipity to Clearspace. At the time I was working for Jive and was interested in having a real reason to "know" Clearspace and write plugins for it and such. That said, Clearspace is a completely beast for something so simple. Plus it required being run under Tomcat which I had little or no reason to run beyond for Clearspace. After parting ways with Jive, and not being interested in throwing money at a hosted server anymore, I moved my blog back to Serendipity and migrated the few posts I had made since moving to Clearspace to Serendipity.

The Now

A little while ago I realized that there was one thing I kept doing over and over again with my sites that weren't really "for something". Like for example, my personal site, our family site, etc. I would always do one of two things:

  • Come up with a "cool design" that I liked and never get around to writing content
  • Write out some small content that had no real design to it

A number of my friends are big fans of Drupal, and I certainly am not living under a rock, I had seen and played with it before, but without a purpose Drupal just seemed like "meh, yet another cms, what's the point". So having some extra free time last month, I decided to do something real with it --- whip up a family site (http://vorpalcloud.org/) that actually had some form of look and feel to it, but also had some content, and was trivial to update/add to in the future.

So in the process, I happened to see how easy it was to manage Google AdSense units within Drupal, and I was attempting to see if I could get enough from ads to have the site pay for it's own hosting somewhere. (as it turns out, not so much so far, but hey, if I decide to punt the ads at some point, then that's trivial)

I had a number of projects out there (JML and such) that had crap sites and so I whipped up some Drupal sites for them and was pleased how those came out. At this point I'm running something like 13 sites under Drupal, including this one. And I've written my first Drupal module: Daily Twitter. Overall I'm highly impressed with the number of plugins, the community around it, and the product itself. I was able to whip up this theme for BlatherSource in very little time. The only thing I'm a little dismayed about is email notifications seem to be oddly hard to set up or something. Maybe I just haven't found the right modules. Like I'd love to be able to subscribe to all content changes on a site but I can't see any way to handle that. Likewise I was excited about making use of the project stuff but that's not ported to Drupal 6 yet. But overall, I'd say this thing is fun to play/work with and has made it so I could whip up a large number of functional sites in no time flat.

So kudos Drupal! You made me enjoy managing my websites again.

How did I migrate from Serendipity to Drupal?

Well first off, keep in mind that I was the only user on my Serendipity site. It was my blog and my blog alone. I also never used the "extended body" stuff. But what it boiled down to is I did the following steps:

  1. Created database for new Drupal site (on the same MySQL server as my Serendipity blog)
  2. Ran the Drupal installer against the new database, but don't go to "View Site" at the end of the install.
  3. Logged into the database as root.
  4. "use"d the serendipity database
  5. Ran the following SQL, knowing that drupal_bs is my Drupal database:
    INSERT INTO
       drupal_bs.node(nid, vid, type, title, uid, status, created, changed, comment, promote, moderate, sticky, tnid, translate)
       SELECT id, id, 'blog', title, '1', '1', timestamp, last_modified, '2', '1', '0', '0', '0', '0' FROM serendipity_entries;

    INSERT INTO
       drupal_bs.node_revisions(nid, vid, uid, title, body, teaser, timestamp, format)
       SELECT id, id, '1', title, body, body, timestamp, '2' FROM serendipity_entries;

    INSERT INTO
       drupal_bs.comments(cid, pid, nid, uid, subject, comment, hostname, timestamp, format, name, mail, homepage, status)
       SELECT id, parent_id, entry_id, '0', title, body, ip, timestamp, '2', author, email, url, '0' FROM serendipity_comments;

    UPDATE drupal_bs.comments SET uid = '1' WHERE name = 'Daniel Henninger';

    INSERT INTO
       drupal_bs.node_comment_statistics
       SELECT nid,timestamp,name,0,count(cid) FROM (SELECT * FROM comments ORDER BY timestamp DESC) q GROUP BY nid;

    UPDATE drupal_bs.node_comment_statistics SET last_comment_uid = '1' WHERE last_comment_name = 'Daniel Henninger';

    INSERT INTO
       drupal_bs.vocabulary(vid,name)
       VALUES(1, 'Serendipity Category');

    INSERT INTO
       drupal_bs.term_data(tid,vid,name,description)
       SELECT categoryid,'1',category_name,category_description FROM serendipity_category;

    INSERT INTO
       drupal_bs.term_hierarchy(tid,parent)
       SELECT categoryid,parentid FROM serendipity_category;

    INSERT INTO
       drupal_bs.term_node(nid,vid,tid)
       SELECT entryid,entryid,categoryid FROM serendipity_entrycat;

    Note that I also changed all comment references to myself to my actual uid (1) in Drupal.
  6. Done, go to site and all data transferred over.

I wanted to share this in case it helps someone else though.

Re: BlatherSource is now running under Drupal!

"You may recall that not so long ago, I switched my blog site from Serendipity to Clearspace. At the time I was working for Jive and was interested in having a real reason to "know" Clearspace and write plugins for it and such. That said, Clearspace is a completely beast for something so simple. Plus it required being run under Tomcat which I had little or no reason to run beyond for Clearspace."
Thanks for the information