Last May I converted two of my blogs from Movable Type to Pivot, mostly because I was severing from frequent database crashes. I was stuck using the flat Berkley DB because of my web host and I thought a different blogging system would might help. Plus I like a challenge every once and a while. I had over two years worth of entries that I exported and easily imported into Pivot.
While mostly happy with Pivot, there a couple of things I didn’t like. The main one was I could never get a spell checker to work right when posting and boy do I need a spell checker. MT had so many more people developing applications for it and I longed for some of their plug-ins. Plus I now had a new web host that did allow MySQL DBs. It was time to change back to MT. Unfortunately this is not any way to easily export your Pivot entries in a form that Movable Type can import.
I searched the Pivot support forum with no luck. There were a few folks asking the same question, but no one had an answer. Here comes that challenge thing again, so I read the Movable Type manual for importing and I read their import file format pages which led to a series of steps that allowed me to convert my pivot weblog into one of Movable Type.
This procedure worked for me, your mileage may vary. It was fairly time consuming, I converted two separate instances of simple Pivot weblogs into one MT blog and it took most every waking hour of a full weekend.
Good luck.
Sign it to your Pivot weblog. On the left hand menu, under Administration, click on Weblogs, then click “your weblog name.”
On Step 1 of 3 under “archive settings,” change your Archive Type to: Yearly Archives. Under “templates,” note what is listed under Archive Template, because we will be changing the contents of this latter, the default is archivepage_template.html.
On Step 2 of 3 under “standard” note what is listed under Shortentry Template, we will be changing the contents of this later, the default is _sub_entry_standard.html.
On Step 3 of 3 under Various Settings change Encode Email Addresses to: No. Display Date Settings change the full date format, entry date and diff date to %month%/%day%/%year% %hour24%:%minute%:00 (this is the format MT wants of it’s imported dates, the :00 on the end is important because MT wants seconds) Under Comment Settings change all the labels for ‘no comments’, ‘one comment’ and ‘X comments’ to something unique, I used Talk To Me you will be eliminating this line later and this will help you find it. Change the contents of the Format of Comments block to:
COMMENT:<BR>
AUTHOR: %name%<BR>
EMAIL: %email%<BR>
URL: %url%<BR>
DATE: %date%<BR>
%comment%<BR>
—–<BR>
On the left hand menu, under Administration, click on Templates. Then open the _sub_entry_standard.html template (or whatever you are using for the Shortentry Template.) Select everything in the template and save it to a file on your PC. Now replace everything in the file with the following:
AUTHOR: [[user:nick]]<BR>
TITLE: [[title]]<BR>
DATE: [[date]]<BR>
CATEGORY: [[category:inthisweblog]]<BR>
—–<BR>
BODY:<BR>
[[introduction]]<BR>
—–<BR>
EXTENDED BODY:<BR>
[[body]]<BR>
—–<BR>
[[comments]]<BR>
——–<BR>
<BR>
Now open the archivepage_template.html file (or whatever you are using for the Archive Template.) Select everything in the template and save it to a file on your PC. Now replace everything in the file with the following:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset='[[charset]]'” />
<script language=”JavaScript” src=”[[pivot_dir]]includes/js/dyna_content.js” type=”text/javascript”></script>
</head>
<body>
[[subweblog:standard]]
</body>
</html>
On the left hand menu, under Administration, click on Maintenance, then Rebuild All Files. When this is finished, click on the Rebuild the Frontpage(s) link at the top of the page.
You can now go to the main page of your weblog and click on the link for the yearly archive. You should get a very plain looking page that includes all your entries and comment for that year. Right click with your mouse and select “View Source” Save this text file to your hard drive. This file will become the file you import into Movable Type, but first it needs some fixing.
One entry should look a little like this:
TITLE: British Invasion III & IV<BR>
DATE: 12/24/2004 14:34:00<BR>
CATEGORY: default<BR>
—–<BR>
BODY:<BR>
Its Christmas Eve and seeing as I have a traditional holiday greeting reserved for tomorrow, I just go ahead and post a picture of Paul and George together:<br /><br /><br />
<BR>
—–<BR>
EXTENDED BODY:<BR>
</p><p style=”text-align:center;”><img src=”/rant/images/paul-n-george.jpg” border=”1″ title=”” alt=”” class=’pivot-image’ /></p><BR>
—–<BR>
<p><b>Talk To Me:</b></p><a id=”comm”></a>
COMMENT:<BR>
AUTHOR: Andrea<BR>
EMAIL: (<a href=’mailto:andreag@earthlink.net’ title=’email Andrea’>email</a>)<BR>
URL: (<a href=’http://diaryofamusicwhore.blogspot.com’ target=’_blank’ title=’diaryofamusicwhore.blogspot.com’>link</a>)<BR>
DATE: 12/26/2004 10:49:00<BR>
These little guys are so cute. I want to watch Beatles cartoons now!<BR>
—–<BR>
COMMENT:<BR>
AUTHOR: Brian the Red<BR>
EMAIL: (<a href=’mailto:brian.the.red@gmail.com’ title=’email Brian the Red’>email</a>)<BR>
URL: (<a href=’https://mr-miata.net/plog/’ target=’_blank’ title=’mr-miata.net/plog/’>link</a>)<BR>
DATE: 12/26/2004 15:50:00<BR>
The cartoons were on about the time frame when I should have seen them, but I have zero recollection of them& #8230;<br />
<br />
I just did a search on Amazon, but the toons aren& #8217;t available on DVD. Maybe someday.<BR>
—–<BR><BR>
——–<BR>
For reference here is a link to this post: https://www.mr-miata.net/rant/pivot/entry.php?id=1011
I used Microsoft Word to open the saved archive files because it has the ability to remove and replace text using wildcards and case matching which is helpful in the first couple of things we need to eliminate. A good thing to do is to turn off the “Smart Quotes” feature in Word so it doesn’t mess up the html coding.
1) Before every entry is it’s identifier and it looks like this: <span id=’e1011′></span> so I set the search with wildcards for <span id=’e????’></span> and replaced it with nothing. I then subtracted a question mark, one at a time, until every identifier was gone.
2) Replace every <BR> using match case with nothing. Pivot seems to use <br /> or <br/> as its line break, so that is why I used <BR> in my templates.
3) Replace every <p><b>Talk to Me</b></p><a id=”comm”></a><br> with nothing. This is the comment header that Pivot places in their pages.
4) If you have a lot of comments by a lot of different people this will be the most time consuming part. In my example you notice that the commentor’s email and URL come out in html like this:
EMAIL: (<a href=’mailto:andreag@earthlink.net’ title=’email Andrea’>email</a>)<BR>
URL: (<a href=’http://diaryofamusicwhore.blogspot.com’ target=’_blank’ title=’diaryofamusicwhore.blogspot.com’>link</a>)<BR>
so they show on the page as (email) or (link) I didn’t know if MT would import them this way, so I replaced every instance with just the plain email address and URL:
EMAIL: andreag@earthlink.net
URL: http://diaryofamusicwhore.blogspot.com
That pretty much clears up the important stuff. I went ahead and changed the coding for the way the images were inserted. I started to change the coding of non-standard characters in the comments to the character, but couldn’t find what some of them were, (& #8217; is ‘ and & #8230; is ?) so I left them alone and they seem to display right. When I got done that same entry looked like this:
TITLE: British Invasion III & IV
DATE: 12/24/2004 14:34:00
CATEGORY: default
—–
BODY:
<p>Its Christmas Eve and seeing as I have a traditional holiday greeting reserved for tomorrow, I just go ahead and post a picture of Paul and George together:<br /><br />
—–
EXTENDED BODY:
<p><img src=”/rant/images/paul-n-george.jpg” border=”1″ title=”” alt=”” /></p>
—–
COMMENT:
AUTHOR: Andrea
EMAIL: andreag@earthlink.net
URL: http://diaryofamusicwhore.blogspot.com
DATE: 12/26/2004 10:49:00
These little guys are so cute. I want to watch Beatles cartoons now!
—–
COMMENT:
AUTHOR: Brian the Red
EMAIL: brian@gmail.com
URL: https://mr-miata.net
DATE: 12/26/2004 10:54:00
The cartoons were on about the time frame when I should have seen them, but I have zero recollection of them…
I just did a search on Amazon, but the toons aren’t available on DVD. Maybe someday.
—–
——–
After you have edited all the archive files into something that Movable Type will ingest, I would do a test. Importing about a month’s worth of entries into MT before doing the whole year’s worth. Be sure you get at least one entry with comments so you can tell if that goes well too. I created a test blog in MT to try out my importing, this way if the process went real bad I could just delete the whole blog and start over again.
Kevin Pascal
We’re sorry to see you leave the Pivot community. Drop by and visit once in awhile. Good luck with your blog. All the best!
Kevin Pascal
Hmm, I just clicked on my name in the previous comment and I ended up with an error message:
“The requested page could not be found.
Page not found – /cgi-bin/mt/mt-blah.cgi”
Does this type of thing happen with MT a lot? 😉
Brian the Red
Seems to happen to everyone’s email address in a comment. mt-blah.cgi is the commenting script, renamed from mt-comments.cgi to foil comment spammers, maybe because it is renamed it is acting up or maybe I haven’t got something configured right just yet.