Movable Type is a great platform for building blogs and websites. I made some changes to drstout.org and DanielStout.com that I wanted to tell you about. The big change is that instead of using static publishing, I’ve switched to dynamic publishing. The dynamic publishing feature of MT uses PHP to craft the pages. The basic difference for me is that I’ll be able to roll-out changes to the templates without having to rebuild the entire blog. That’s a huge time saver because I’m always tinkering.
I had tried MT’s dynamic publishing several years ago and had run into some subtle problems. I don’t exactly remember what wasn’t working, but it didn’t work quite as I expected. Fast forward to 2009 and my knowledge of PHP is solid and bugs have been fixed, and the transition from static HTML pages to virtual PHP pages was quite easy to do.
The biggest change is in the URLs for the individual entries. I switched from using a custom URL-naming scheme to one of the defaults that uses the basename of an entry. The basename is created automatically by MT when you save a new entry with a title. There is a setting in the preferences that specifies how many characters the basename should be. When this feature was introduced in MT, the basename length was set to 40 characters. At some later date the default was changed to 100 characters. But basenames, once set, don’t ever change. So if a basename reflected an older version of the entry title or was set to 40 characters, then it wasn’t all it could be.
I did some Google searching and came across a Perl script that worked wonders. Basically, I changed the basename setting to 100 characters on my blogs. Then I ran the script separately for each blog. What the script did was generate a new basename based on the title as it is currently with the requisite number of characters. Beautiful. That made easy work of the 1,200+ entries I have in Movable Type that had shortened or outdated basenames.
A few pages I kept as static pages but changed the file extensions from HTML to PHP. That’s a great thing about Movable Type. You can combine static publishing for complex pages with dynamic publishing for more easily generated pages. An example of a page I kept static is the archive page. This page does a complete listing of all entries I’ve posted in drstout.org and DanielStout.com. It’s a lot of entries, and when I published the page dynamically, the database query took a long time. So I made this page a static page, and there is obviously no delay for the page to display.
While I was making these changes to the blogs, I happened across a maintenance issue that I thought I should describe. For a number of years, I’ve been a vigorous user of blog entry tags. At the bottom of each entry from the past several years, you’ll see a list of links for each tag that I’ve tagged an entry with. I don’t use tags like categories. I use tags to describe the content of the entry, which in my writing varies considerably. If you visit my tag cloud pages, you can see the variety of tags I use. The problem is that the internal links for these tags are a query to Movable Type’s search function. I allow search engines to track my tags (one possible solution would be to put a line in my robots.txt file to exclude search engines from indexing my tags). And each time a tag link is followed that search query is written into the Movable Type activity log.
So I happened across the activity log on the system-wide level. I found that there were 350,000+ entries in my activity log. This seemed extreme. I don’t know of a way to automatically throw away older entries in the MT activity log (like it does for spam comments). I decided to see how much of my database space these search query entries were eating up. Basically, the MySQL database that holds my MT install went from 80 MB to 8 MB. It was a huge reduction in the database size.
Finally, the other tinkering I’ve done with my blogs is with the advertising. I removed the Chitika.com advertising. It was making a little money, but I decided that the annoyance factor for my readers was greater than the money it was bringing in. I have tried various forms of advertising over the years, but what has always worked best for my sites is Google AdSense. It does matter which sizes of ads are used. In my experience, the 300×250 and 160×600 have been most effective. So advertising on each page on drstout.org and DanielStout.com is consistent and limited to one of those ad sizes each. I figure that will minimize the annoyance of the advertising and frequent visitors will hopefully be able to ignore it. The thing I like about AdSense ads is that they are sometimes useful based on the content. That is, I see things advertised that I think my readers would be interested in. The ads are targeted to the content on each page, and I find them to be mostly relevant.
I’m experimenting with other forms of AdSense advertising. I am using the Google sponsored search for searching my blogs. I chose Google search over using MT’s built-in search because it is easy to search across multiple sites and blogs. Movable Type’s search capability gets very resource intensive if you have it searching multiple blogs at one time.
Also, I have added Google’s mobile advertising to my mobile site. So far it has been in place for a week but hasn’t generated any impressions. I’ve tested the mobile site and confirmed that ads aren’t showing. I am also experimenting with advertising in my Atom and RSS feeds. I have been getting some impressions on these, but I haven’t seen an ad myself yet. I’m kind of on the fence about feed advertising. It is definitely becoming more common, but I think it is probably not very effective, at least in its current form. I’m waiting to see the results before I make a judgment, but I’m guessing I will remove that form of advertising fairly soon.