« Guest Blog: The FDA on BSE | Main | GadgetGuy Issue 01.0 in release.... »

MT 3.1 arrives here, and how to get Markdown working with PHP Dynamic Pages

MT 3.1 has arrived! And, though I'm excited about some of its other features, the dynamic pages thing is a big win. My original blog lived on PHPNuke, so it took a while to understand why everything was so static when kwc first convinced me to try MT.

Anyway, there's a gotcha' - Markdown, though it's part of the "Plugin Pack", isn't supported by the MT PHP technology. (Nay, nothing that isn't explicitly supported is supported - everything will have to be re-implemented in PHP.... how long until MT is actually written in PHP, and just caches for static content? There's really no advantage to having both Perl and PHP, as far as I can tell).

Right, back to my point. Markdown. As anyone who's read my blog knows, I've been using Markdown pretty heavily for a while. And a trivial MT 3.1 upgrade, then dynamic-pages-enable failed. A trouble ticket in with 6A just scolded me not for reading the nondescript last paragraph of the "dynamic" section of the guide, which, being after a tip on tuning, I had neglected to read. Hello, red, or enlarged, or bolded text, anyone?

A little Googling around found that there is already a PHP version of Markdown, written by Michel Fortin. Happily, his docs even included how to set it up to use with Smarty, the PHP template engine that MT is using for the dynamic pages feature. It was pretty easy to figure it out, but since I can't find anywhere that anyone else has explained it, here we go, step by step:

  • Download the current version (right now, it's at this location)
  • Extract the ZIP into a temporary directory.
  • Rename the enclosed markdown.php to modifier.markdown.php
  • Upload/copy modifier.markdown.php to [Your MT CGI root]/php/extlib/smarty/plugins (I didn't have to touch permissions, but FTP uploaders might, not sure)

That'll do it. I think that it's pretty easy to get Markdown with SmartyPants working, too, but was so elated getting just Markdown working (and the fun of tinkering with dynamic templates) that I haven't worked through the probably 2 or 3 more steps it should take.

Post a comment

Verification (needed to reduce spam):