Introducing SmartTrim (Movable Type plugin)

SmartTrim is a Movable Type 4 plugin that aims to provide a smarter trimming global modifier than words or trim_to.

The stock MT global modifier words cuts at a certain number of words without any control on the resulting length. trim_to cuts to a specific length but can cut a string in the middle of a word.

SmartTrim will trim a string to a target character length without cutting words, and can append an optional ending string like an ellipsis to the result.

N.B. This is the first MT plugin that I release publicly, and I'm no Perl wizard. Feedback much appreciated!


Hi, I appreciate your work. I use your plugin for MT 4.
But now I have to upgrade to newer version. I mean MT 5.
In MT 5, it doesn't work. is there anyway to upgrade this plugin?
Thanks in advance!!!

Hi Afshin, thanks. This plugin works with MT5 as well.

mensuelles Archives

Recent Entries

  • Steve Jobs

    "Remembering that I’ll be dead soon is the most important tool I’ve ever encountered to help me make the big choices in life. Because...

  • Your privacy on MOTOBLUR by Motorola

    After the Nokia Ovi Store carelessness, it's now Motorola who's allowing strangers to get access to your private information on their MOTOBLUR portal. Exactly like...

  • How to resume a broken ADC download

    (I'm documenting this trick for myself to remember, but it can be useful for others…) Apple, on its Apple Developer Connection site, has a bad...

  • WTF is this ‘myEventWatcherDiv’ doing in my web?

    All of a sudden I started to find the following line in most of the web pages I was browsing, including ones I made where...

  • Your privacy on Nokia Ovi Store

    My friend Adam Greenfield recently complained about the over-engineering culture at Nokia: I was given an NFC phone, and told to tap it against the...