Creative Commons License
This weblog is licensed under a Creative Commons License.

« September 2, 2005 | Main | September 17, 2005 »

September 13, 2005

Movable Type, Blogger Transfer, and Yahoo Hosting: The Saga

Here is the saga of how I went about getting my Blogger hosted site moved to Movable Type on my Yahoo! hosted web site. I Googled like crazy and couldn’t find any documentation, so I hope that this history/saga helps someone else not go through the same 2 day pain I went through.


How to Get Movable Type Started on Yahoo!

First off, follow along from the Moveable Type 3.2 Install and Upgrade instructions. That helps a lot.

Make a copy of the software into a directory called "mt" on your local machine

Delete mt\php\extlib\smarty\.cvsignore as Yahoo's servers barf on any file that is just an extension (funny - the windows shell won't let you create a file with a name like that, but you can open it and move it just fine)

Copy the "mt-static" subdirectory of "mt" to the root of your site

Create a cgi-bin directory at your site root, copy the "mt" directory there (but not the mt-static sub directory)

Made sure you have a "tmp" directory at the root of the FTP site as movable type relies on it

From the MySQL db admin page (typically www.yoururl.com/db), created a new database called "blogs"

Copy the file mt-config.cgi-original to mt-config.cgi

Change CGPath to CGIPath http://www.yoururl.com/cgi-bin/mt

Uncomment the five MySQL variables, database is "blogs", fill in the mysql userid & password you are using, and set DBHost to "mysql" for yahoo.

Uncomment the StaticWebPath variable, set it to http://www.yoururl.com/mt-static

Uncomment CGIMaxUpload, set to 10000000 if you want to allow the upload of big files

Perl & Send Mail: Yahoo uses the standard defaults (/usr/bin/perl & /usr/sbin/sendmail), so nothing to do there.

Run http://www.yoururl.com/moveabletype/mt-check.cgi/ if all is well, you will get back "Movable Type System Check Successful". FYI, Yahoo is missing the following functionality, all optional for movable type
Image::Magick for creating thumbnails of uploaded images.
Crypt::DSA for accelerated comment registration signin.
XML::Atom for using Atom API to post and manipulate blogs.

Lauch www.yoururl.com/cgi-bin/mt, click on the link to set up the new installation, click on "finish install" and you should have the joy of being presented with the login screen

For the first time, the userid is Melody, the password Nelson, and off you go! Create your accounts and delete the Melody one right away.

Blogger Instructions
To pull your stuff out of blogger, replace your template with:

<Blogger>
TITLE: <$BlogItemTitle$>
AUTHOR: <$BlogItemAuthor$>
DATE: <$BlogItemDateTime$>
-----
BODY:
<a name="<$BlogItemNumber$>"></a>
<$BlogItemBody$>
-----
<BlogItemCommentsEnabled>
<BlogItemComments>
COMMENT:
AUTHOR: <$BlogCommentAuthor$>
DATE: <$BlogCommentDateTime$>
<a name="<$BlogCommentNumber$>"></a>
<$BlogCommentBody$>
-----
</BlogItemComments>
</BlogItemCommentsEnabled>
--------
</Blogger>

Before you publish, go to Settings/Formatting,
change Show to 999 posts
change Timestamp Format to MM/DD/YYYY HH:MM:SS

In Settings/Comments
change Comments Timestamp Format to MM/DD/YYYY HH:MM:SS

and then do a preview. right click, view source, cut out the couple of lines of HTML at the start & beginning, then save.

The bummer is that it is getting saved with these goofy non-standard quotes & dashes, which choke movable type. So I used frontpage to do a search & replace for the quotes and commas (find a goofy one, copy it so you can CTRL_V it into the search line, and then get the replace character just by typing a ‘ or a , in the replace line.

But wait, it's worse - the default for Blogger is to have \a\n (carriage return & line feed) characters written at the end (very common), but movable type will only accept only accept a linefeed at the end. So to save the file properly, I had to punt to my old editor (open-watcom-win32-1.3.exe, look for vi.exe – I should probably blog at some point about how that editor evolved) with a feature that I turned on in about 1992 (set nowritecrlf, which allowed the editor to save files like QNX (and other unix systems) wanted to see them, with just a line feed only). BLARGH!

Then create an import directory in the mt directory, copy the file you messed with above there, and you can now use the import/export function to bring in your old blog.

StyleCatcher

I wanted to install StyleCatcher, a cool way to change your style quickly.

Because I chose to keep my mt-static directory elsewhere (per the recommendation of the MT installation), installing StyleCatcher was a pain in the butt. You have to change the settings as it botches it up - it won’t work until you do the following:
- Go to Plugins
- Click on “Show Settings” for StlyleCatcher
- Change Theme Root URL to be http://www.yoururl.com/mt-static/themes
- Change Theme Root Path to /mtstatic/themes

But wait, there’s more – it also botches up the bitmaps once you get it working (PLUGIN_STATIC_URI resolves to something goofy), so you have to modify two of the templates in /cgi-bin/mt/plugins/StyleCatcher/tmpl/ - gmscript.tmpl amd view.tmpl. In both, you have to change

to

http://www.yoururl.com/mt-static/plugins/StyleCatcher/

and then everything works great.

Stats

A cool way to track your blog stats is the statwatch plugin. I went to http://www.raquo.net/statwatch/, downloaded the software, followed the install instructions (I put <$MTStats$> into the main index template) and boom! I was getting stats. Much easier than StyleCatcher install for sure. Make sure to put the MTStats tag at the bottom of the template, I put it at the top and it created this mysterious blank line on my page that I could not figure out fore the longest time

3 Column Style & 1024x768 displays

The real bummer is that I wanted a 3 column style, and wanted to have my blogs be good for a 1024x768 display, not an 800x600 display (the default of all the MT styles). The MT styles are fuxed to 800x600 displays, so if you want a bigger screen, you have to pick a style and then manually customize it. So while StyleCatcher helped me find my style, I had to then customize the heck out of it. And now StyleCatcher is useless to me, because all the StyleCatcher styles are hardwired to 800x600 displays (why not 640x480? come on, it's only 2005, I'm sure at least 3 or 4 pc's out there are at 640x480, don't want to leave them out!!). Anyway, more on that later.

Comments