Dirify in PHP
This one's a handy reference: Dirify in PHP, courtesy of Adam Kalsey. If you've ever used the "dirify" attribute in a Movable Type template tag, this function performs the same text transformation, but in PHP.
It's somewhat underreported that in Movable Type 3.x, we're using cleaner URLs by default (in the format yyyy/mm/dd/dirified_post_title.html) but if you're migrating over a site from earlier versions of Movable Type, or just want to use compatible logic when creating your own PHP output, you'll definitely find Adam's code snippet handy.


Comments