Movable Type Blog Migration

Blogs October 28th, 2003

Over the last week, usually in the mid-to-late evenings — after Catherine falls asleep, I have been slowly migrating my B2-based blog to Movable Type.

I must say that for the most part the process has been fairly straight forward. The MT system installed smoothly and customizing the core MT templates, while time-consuming getting them to fit my old B2 template, were rather easy and extremely flexible.

However, during the migration process I had some interesting obstacles. In particular, I wanted to seamlessly maintain the entire URL-space of my old B2 blog with my new MT blog. My initial thinking was that with a little data-scrubbing and massaging I could export the MySQL table data from B2 and import the data into the MT table-space.

In addition, if I could retain the same entry/post IDs between the old and new system, I could easily redirect links via an Apache mod_rewrite regular expression mapping.

After some initial head-scratching, this idea was a bit more complex that I had thought given that I wanted to include comments as well. Plus, I wasn’t sure if retaining the entry/post IDs would break MT.

I did some quick searches via Google and the great MT Support forums and found Bill Grady’s excellent B2 Export script for MT, which allowed me to dump all of my B2 posts and comments into MT’s import format. This format enabled me to easily import my old post data into MT.

The problem however was that (as far as I can tell) MT’s import format does not allow for the specification of entry/post IDs, which excluded me from using a simple Apache mod_rewrite regular expression to map the URL-space.

Oh well, back to the drawing-board…

After further research, I found the following links regarding interesting solutions that utilize MT archive templates to create global redirects in Apache’s .htaccess or httpd.conf formats.

Unfortunately, these solutions used the entry_id as the key field in the mapping, which cased problems for me because my old B2 blog had post IDs that were inconsistent with MT — Plus, for some reason the post ID in B2 were out of order.

I though I could use the post date as my key field, but for some reason I found a number of inconsistencies between the post dates in the two data sets. Very odd.

Instead I used the entry title as my key field; this required me to insure that the entry titles between both old and new data sets where precisely the same and not contain any duplicates. This way I could use the entry titles to map old post IDs from B2 to the new URL space in Movably Type.

Once the titles were synchronized, I created an MT template to export my newly imported MT entries in a CSV format that I could manipulate in Excel. I used the following MT Archive template:


<$MTEntryID$>,<$MTEntryDate format="%m/%d/%Y %H:%M"$>,<$MTEntryTitle$>,<$MTEntryLink$>

I then export my B2 post data into a CSV file, sorted the data in Excel, by title; opened the newly-exported MT data in Excel and also sorted it by title. I now had two matching sets of data, each with unique entry/posting IDs. The next step was to construct the redirect mapping between old post ID and the entry’s new URL.

Ultimately, I used a bit of PHP to do the redirecting. I did this by constructing an associative array using the post ID from B2 as the index, with the MT entry URL as the value. I also utilized the ‘array_key_exists’ PHP function to determine if the old post ID was found in the array.

Here’s a snippet of code:

$entry_array = array (
"613" => "http://www.hatch.org/blog/2002/06/17/404.php",
"576" => "http://www.hatch.org/blog/2002/04/18/1000_ultrapersonal_computer.php");

// entry lookup $p = post_id
if ($p) {
if (array_key_exists($p, $entry_array)) { $url = $entry_array[$p]; } }

// redirect
header( "Location: ".$url );

Worked like a charm!

I wish I could use this or a similar technique to redirect my old RSS feed to my feed’s new location, but that’s a topic for another day…

Is Comment Spam Cost Effective?

Blogs October 16th, 2003

I’m getting my fair share of comment spam like many other bloggers, but I can’t imagine that the cost/time ratio is actually worth it.

I think Sam Ruby sums it up best:

“65 minutes to create. Carefully crafted to appear to be on topic. 10 seconds to wipe out.”

LOL! Dumb asses!

Salesforce.com on Social Networking

Blogs October 15th, 2003

Ross Mayfield posted an excerpt from an interview with the CSO of Salesforce.com in regard to Social Networking. The interview was conducted by IBDN, but I wasn’t able to find a direct link. However, here’s a quote from the M2M blog:

IBDN: We know that consumers will pay to find a date, but will they pay to find business contacts?

FULBRIGHT: Yes, one name for them is “leads,” and sales and marketing organizations pay thousands of dollars for leads today. Leads are the life-blood of every business. Another type of paid business contact is called “candidates,” and again companies have been paying recruiters or internal referrals thousands of dollars for great candidates for at least 50 years.

Especially now, with tight budgets, businesses must run more efficiently and want to find the right contacts to meet their needs, in as streamlined a manner as possible. To the extent that businesses can start with warm leads instead of cold leads, and an existing pool of candidates when they have an opening, they will save millions of dollars.

I’d like to add that companies such as MediaMap and Vocus specialize in facilitating the “lead” connections — especially in the Public Relations industry, which is an industry that feeds on “social connections”.

NewsGator posting plug-in for B2

Blogs September 30th, 2003

Cool! Greg has released a NewsGator posting plug-in for B2! (hopefully this will work!)

[Now Playing: Elvis Costello - Can It Be True? (03:46)]

Blackout Blog

Blogs August 15th, 2003

Awesome collaborative phone-cam-blog that covers the Blackout.

NewsGator 1.3 Released

Blogs August 5th, 2003

Greg Reinacker has just released NewsGator 1.3, which includes initial support for Pie/EchoAtom feeds, among many other great new features!

Congratulations (again) Greg!

Study shows blogs are under-represented in Google

Blogs July 24th, 2003

Interesting study released by Microdoc News debunking (mathematically) that blogs are clogging Google

[Estimations show] “there are about 150 million webpages that belong to blogs. Out of 3.8 billion webpages 150 million is about 3.9% of all pages in Google and blogs appear in the top ten results only 2.1% of the time. It seems to me that blogs are being under-represented and not over represented in Google.

Link to Microdoc News via Anil Dash

Going Commercial

Blogs June 26th, 2003

Like many other bloggers, I’ve decided to give Google’s AdSense a test run.

I suppose I’m most interested in the type of Ads that get served on subsequent posts. Specifically, the context matching of content to Ads. So far it seems to be working well.

However, I do wish Google offered more flexibility with the style and sizes of the Ads.

WordPress b2/cafelog derivative

Blogs May 29th, 2003

Congratulations to Matthew and Mike on the release of WordPress, which is the official fork in the b2/cafélog blog tool.

On a test server I converted the data from my current b2-based blog to WordPress with very little trouble. Especially helpful was the handy upgrade script included with WordPress.

For the most part everything seems to be working well. I was even able to get the search-engine-friendly URLs working. I may in fact upgrade my live b2 blog with the new WordPress code. However, I want to run a few tests and see if any bugs pop-up before I take the plunge.

One downside is that I was hoping the initial release would include the Smarty Template Engine like the other b2-derivative b2++. However, I see that Smarty integration is in the works, which is great!

So, perhaps I’ll wait until that happens before I upgrade. Probably not; I’m too impatient ;-)

Dynamics of a Blogosphere Story

Blogs May 24th, 2003

Ok, I suppose my post is a reaction or vote to
Microdoc News Dynamics of a Blogosphere Story study, which not surprisingly is tracking on Blogdex.

Whatever the case, and the label for what I’m doing here, I do find Microdoc’s study to be quite interesting. In particular, the following quotes…


Microdoc News
has developed a picture of how a blogosphere story gets started, how that story develops and then how it then comes to an end. While each blogosphere story has its own pattern of development, the similarities between one story and another is intriguingly similar. The smallest blogosphere stories can have as few as fifteen bloggers, the average story has between 40 and 60 bloggers, while the largest one to date had about 285 bloggers involved. A blogosphere story can be as small as 180 posts in total, while the largest we studied has numbered 7,540 posts in total.
[… and later …]
“Perhaps the last conclusions we came to in this study is that blogs cannot be read in isolation from each other. Blog stories are understood and appreciated in aggregate and not in isolation. On the other hand, mainstream media stories tend to be read in isolation rather than read and compared.

In total, Microdoc News believes blogging to be a radically different world than that of mainstream media.”