A Random Collection Of Technological News and Random Musings on Current Events
History of this blog and Discourse on Theming Movable Type
By Alex Ferro on April 17, 2010 7:46 PM | No Comments

This blog as created in September 2009 in response to a class requirement of a blog. The previous year we were also required to have a blog, but I did not feel like setting up and running my our blog so I used the Edublogs platform. Edublogs is a hosted Wordpress install designed for students and teachers. By the end of the year I had been dissatisfied with the way the blog was run. (Obtrusive ads, random downtime, and no tinker-ability.) I looked into my options for running my own blog. The two most common platforms are Wordpress and Movable Type. Wordpress is written in PHP and at the time I researched had a horrible security track record. Movable Type on the other hand is written in Perl, has a much better track record, and has a much cooler name. For those and other reasons, I chose Movable Type for my blogging platform. Despite its quirks, six months later I feel I made the right choice.

Since the beginning of September, my website has had a theme that matches some of the popular computing environments. It also had a theme switcher that allowed the visitor to select their preferred theme. The theming code was all written in PHP and would not be compatible with Movable Type's Perl code that generates static HTML posts. To make my theming code work with my blog would be a constellation of kluges in convincing Movable Type to output PHP that would then write themed HTML code to a visitor.

I decided that having a blog that looked the same no matter that theme the user had selected for the main site was tacky looking. I ended up just using one of the default themes that was basic and clean looking. This worked and satisfied the mental tick-mark for picking a theme but let me feeling like it was incomplete.

As part of my changes to my main website, I removed the theme option and used the theme that looked like the old classic Macintosh interface. This allowed me to use the same theme for this blog as my site as the theme was now static. The additional bonus from this is that the themes were designed for a blog in the first place.


Failed Theming Attempt

I also tried taking this time to recreate the theme I am using using CSS rather than tables. I got the recreated theme to the point that it worked in my web browser, but didn't work in anything but developer builds of the Webkit source code. All of the spacing values were messed up in other browsers and I gave up and went back to the old table based theme.


When using the theme editor, I kept experiencing a bug with the paste function. When I would paste in a section of code rather than retype it, the editor window often lost part of the content that was there before pasting. It only happened in Webkit and was just fine on Firefox. To work around this, I just copy-pasted the theme code in to a text editor window on my laptop and edited there and then pasted the contents verbatim back in the editor window.

The other difficulty I experienced in creating the theme was with the actual theme templates. The theme templates were setup with duplicated code in each one rather than referencing one template that had the basic HTML that was not different from each page to the next. What made this a problem was the fact that I didn't realize that I could create more templates the the ones that ship preinstalled. So I copied the code into each and every page that used the window template or the widget framing code. Because or my errors, each page received a different rendition of the page code that made tracking down errors much harder. It was at that point that I began to think there was a better way.

When I saw the "Create New Template" button, I created a bunch of templates for each page element that was the same for multiple pages. Those templates allowed me to have the code the same across every page with a lower possibility for error.

Kluges and Limitations

The only kluge in the theme is an XMLHttpRequest that dynamically loads a random quote from the system fortunes database. The other thing to note is the theme was designed in an "It works for me" style. Anything I don't use on my blog probably isn't themed.

To download this theme, and it's dependencies, go to http://alex.ferrouscanine.com/Contemporary/Products/Code/.

Leave a comment
Powered by Movable Type Pro
This blog is licensed under a Creative Commons License.