Current version is 188.8.131.52 released on 2005-09-04
This filter is used to trim and add an ellipsis ... to a given string published from Movable Type. If the string is less than the given length, the string remains unchanged.
I created this filter because I use a list of recent comments on my main blog index page and I wanted to trim down the entry body to a number of characters and add an ellipsis to the end. For those entries that are less than the desired length, no changes were desired.
- This plugin works with Movable Type version 2.x and 3.x.
- Perl version 5.8.5 or higher. This is what I use. It may work on lower versions. Let me know if it does and I will lower this.
- You must have the Perl module, Storable, installed.
- This plugin will only work in static (not dynamic) templates.
- Download the latest version of the filter.
- Unzip the contents of the file.
- Copy the file Ellipsis.pl to your Movable Type "plugins" directory.
(If you don't have a plugins directory, create a plugins directory in the same directory where your mt.cgi file is located. Then upload Ellipsis.pl into the newly created plugins directory.)
- Give me some credit. You have many choices. Do one or all! 1) Add a trackback link to this page on your page. 2) Donate so that I continue to enhance this filter.
This plugin will only work in static (not dynamic) templates.
Add this filter to any Movable Type tag as a parameter. The attribute value should be set to the length that you want to trim the string to.
- Q: This plugin (and others) don't seem to be working on my server. Why?
A: Internally, Movable Type requires some Perl modules to be installed for plugins to work. Some servers do not have these modules installed by default. Please run mt-check.cgi on your server to find out what you are missing.
1. In this simple example, we add the ellipsis filter to a comment string to chop the comment body down to seventy characters.
<$MTCommentBody convert_breaks="0" remove_html="1" ellipsis="70"$>
If you enjoy using this filter and/or would like to see it enhanced, please donate a buck or two...or fifty. I will use the money to buy my wife dinner so she lets me keep working on this stuff for free and does not complain.
This software is licensed under the CC-GNU LGPL.
Download the current version from the link below. Past versions are not archived.
184.108.40.206 -- 2005-09-04
- Updated plugin info to take advantage of MT 3.2 enhancements.
220.127.116.11 -- 2004-12-10
- Fixed bug where plugin reported error in MT-Medic.
18.104.22.168 -- 2004-05-29
- Made compatible with Movable Type 3.0.
0.10 -- 2004-01-11
For questions, suggestions, bug reports, and anything else related to this filter, please e-mail firstname.lastname@example.org or leave a comment.
Updated: 2010-08-26 at 07:35
MDT in Hacks