Vote Charlie!

Movable Type Archives

Handling 404 errors in Movable Type

Posted at age 27.

You can of course handle page not found errors entirely outside Movable Type by doing nothing or creating a static error page and pointing to it with your web server’s ErrorDocument or similar directive.

Or, you can make use of a fancy plugin called Clean Sweep by Byrne Reese and Dan Wolfgang that logs errors and allows you to redirect them to their correct pages. It also attempts to guess the correct URL if the attempted URL matches the basename of an existing entry, which is pretty slick.

Read more

MT tag autocomplete trick to see private tag list

Posted at age 25.

Anyway, to work around this, you can force the script to read the whole text entered and generate a new drop down by hitting the right arrow to cancel the drop down, and then the down arrow to force the drop down. If you have no tags beginning with "2", you can just hit the down arrow after entering "@" to see the list of private tags.

All private tags show after hitting the right arrow key and then the down arrow key

All private tags show after hitting the right arrow key and then the down arrow key

Read more

Movable Type 5 error upon publish

Posted at age 25.

I haven’t gone back to see what version of MT this starts with, but this particular setup is a Movable Type Pro 4.37 installation that was upgraded to 5.2.7. Upon publishing an entry, I observed this error screen:

An error occurred

Undefined subroutine &MT::Template::Tags::Entry::_hdlr_entries called

Read more

Creating a CSV export Movable Type template

Posted at age 25.

Movable Type is an incredibly flexible publishing system that makes it trivial to create output files of any text file format. One common request is to create a Microsoft Excel compatible CSV (comma separated values) spreadsheet of various data from a content management system.

A basic CSV file might look like this:


Name, Birth Date, Death Date
Britney Spears, 1981-12-02,
Albert Einstein, 1879-03-14, 1955-04-18
Justin Bieber, 1994-03-01,
Betty White, 1922-01-17,
George Washington, 1732-02-22, 1799-12-14


Read more

CSV file of Movable Type entries with duplicate titles

Posted at age 25.

On the off chance this might be useful to someone, here is a sample template to output a CSV formatted file with all the entries in a blog that have duplicate titles. In the first Entries block’s blog_ids modifier, replace the word “all” with a blog ID number, or remove the modifier altogether if you are publishing this template within the blog from which you are exporting entries.

Read more

Picasa Express 1.0 for Movable Type released

Posted at age 24.

Today marks my first Movable Type plugin release! I've been working on this on and off for almost a year, so I'm very happy to finally have finished it.

This all started early 2011 when I needed to get my photo blogging workflow nailed down for my impending trip to Buenos Aires. I reluctantly decided to port my Movable Type installation over to Wordpress since there were many more plugins available. Particularly, there was a plugin that made it super easy for me to post photos hosted on Picasa Web Albums, which I was already using. I got a basic WP install up, moved all my content from my MT system, and that was that.

PicasaExpressSettings.jpg

Picasa Express 1.0 settings screen

Read more

Use PHP to output first two paragraphs of MT entries

Posted at age 23.

This is a quick and dirty solution for use in Movable Type templates, but it should work!


<?php
$body = <<<EOT
<$mt:EntryBody encode_php="here"$>
EOT;
preg_match_all('#<p>(.+?)</p>#is', $body, $matches);
switch(count($matches[0])) {
case 0: break;
case 1: echo $matches[0][0]; break;
case 2: echo $matches[0][0].$matches[0][1]; break;
default: echo $matches[0][0]."<p>".$matches[1][1].' <a href="<mt:EntryPermalink>" class="actionlink">Read more &raquo;</a>'; break;
}
?>


Read more