I decided a while back that I wanted to move from MangoBlog to something simpler. I wanted to get back to writing blogs rather than messing about with the application.
As you can tell from the title of this post and the lovely oranginess of my blog I ended up coming back to BlogCFC.
Please don't get me wrong. I really liked MangoBlog from a user perspective, but as an application, when I have maybe an hour and a bit at night to poke around the hood... Well, lets just say we never really got on that well. I love the interface and the skinning, but I just couldn't get my head around the architecture and I seemed to break more stuff than I fixed. The breaking point was when I moved to a new host and couldn't get the search to work, either the built in verity search or the Google CSE search plugin. Now that may be a factor of the shared hosting I'm using these days, but it still annoyed me, I couldn't get past it and on to writing anything!
I looked at leaving MangoBlog up and just starting again somewhere else, but I just didn't like the idea of leaving my old blog content in a busted up website. (My fault not MangoBlog's)
I've been trying to persuade my modest 180+ blog posts into another blogging application. I had no real interest in WordPress; never liked the interface.
Posterous quite happily imported my content, but it was all a bit untidy and would have taken me a life time to fix it. I have however, decided to put a few non-techie posts up on posterous, because it is such a lovely application for quick and easy personal and photographic blogging. I can write a post on my phone on the metro and post it in the 20 minutes it takes me to get home.
I tried to get posts into Blogger, but the API and import routines are rubbish and everytime I had a success I'd then be held up by yet another failure.
One of the things that did come out of messing with the Blogger Data API was a set of CFCs that gave me CF9 ORM access to the database. I'd thought of "reversing" the MangoBlog API to spit out the content, but given my previous "success" with the API and realising it actually gave me something to use to play with the new ORM features, I decided to take this route.
New... Tsk... You see how long I've been messing about with this stuff now?!! How long has CF9 actually been out now? 3 months?? I digress...
From the ORM I created a bunch of different functions and scripts to talk to the Blogger Data API, which eventually left me high and dry while trying to insert comments. Lets face it, the content on my blog "could do better", so the comments add value and I needed to maintained them as well.
I had the means to get data out of my blog, but I'd run out of options as to where to post it on a hosted solution. That meant I would have to host it myself, but I didn't want to write any code, so back to BlogCFC it is!
Why BlogCFC? Its great! I love it! Its simple, easy to use and pretty much lives in a dozen files. If I break the code, then there are only a few places for me to look. It really does "just work"! There are also a bunch of small things that I realised I missed from BlogCFC that aren't in the default MangoBlog. The bits that spring immediately to mind are enclosures, related entries and, the ego massager, stats.
How did I get everything from MangoBlog into BlogCFC? I wrote a surprisingly simple bit of code that used the ORM to pull the appropriate data out of the live database and insert it into a shiny new BlogCFC database using the exceptionally easy to use org.camden.blog.blog methods. I had to make a tweak to the method to insert comments, so that I could maintain the post date of comments. I also hacked in a login to the blog.cfc and page.cfc. Its not pretty, but it worked quite nicely once I mapped all the data from MangoBlog to BlogCFC.
I'm a hoarder. I keep copies of code from way back in the '90s, copies of database, documents, all sorts. I have a copy of my BlogCFC database from before I moved to MangoBlog. This meant that I could reattach my previous enclosures. I had to do this in two stages; first was a straight forward alias match, second stage was to do a title match and copy the data across. To be honest I was just happy that I'd managed to reattach all the enclosures, so I didn't look into why all the aliases didn't match. I think it might be blogcfc version related. Something that changed with the way the aliases are created, as it did seem to be older entries that didn't match.
The only other thing that I've done to my installation of BlogCFC is to add a post.cfm page. The blog entry url is different between MangoBlog and BlogCFC. BlogCFC includes the post date as part of the url. MangoBlog just uses the alias. I only realised this when I noticed that Google Analytics was showing a complete lack of traffic. The post.cfm page I've created looks up the entry by alias, rebuilds the URL and does a cflocation to the correct url using statuscode 302, permanent redirect.
I've attached the code that I used to talk to the Blogger Data API. This also includes the ORM set up for most of MangoBlog. The blogger stuff is all over the place, because I abandoned it, but it might be useful to someone. Feel free to use and abuse to your hearts content.
I've given the code I wrote to Ray Camden, so you never know, at some point, a cleaned up version of it may find its way into the new installer.
Now maybe I can get back to the blog round-up!! ;-)