Overview
MTFilterStack is a Movable Type plugin which constructs text filters out of other text filters and global filters. Each group of pre-existing filters is called a “stack” with a definite ordering. These filter stacks can then be used as the text filter for posts and comments.
The purpose of this plugin is to avoid having to hack code or give up features when one wants the features in two or more text filtering plugins. With MTFilterStack one can create a filter stack that performs all of the transforms and use that.
Installing
MTFilterStack requires MT 3.1, 3.2, or 3.31. It current works only for static publishing.
- Get the distribution
- You can get the zipped distribution here. Download it and unzip it in to a directory.
- Install
- Copy all of the unzipped files to a directory named “FilterStack” in the “plugins” directory of your Movable Type installation. Verify the that file “FilterStack/MTFilterStack-config.cgi” has execute permissions and that the first line is identical to that for your “mt.cgi” file.
- Create
- Type in a name and a description in the two boxes at the bottom of the page and then click the “Create” button.
- Delete
- Click the “Delete” button in the same row as the filter stack to delete. You will be prompted to confirm the delete. If you do, the filter is permanently removed beyond all hope of recovery.
- Edit
- Click the “Edit” button in the same row as the filter stack.
- Add Filter
- Select the filter in the drop down list and click “Add”. It will be added as the last filter in the stack.
- Remove Filter
- Click the button labeled “X” next to the filter in the stack.
- Move a Filter
- You can move a filter up or down in the ordering by clicking the up and down arrow buttons next to the filters.
- 0.1.2 — Updated to use MT 3.2 style CGI support.
That’s it, you’re done. MTFilterStack is now ready to use, except that you don’t have any filter stacks.
Configuring
To configure MTFilterStack, go to the main menu page of your Movable Type installation. MTFilterStack should be present in the “Configure Active Plugins” section. Click on the link to bring up the main configuration page.
Managing Filter Stacks
The main configuration page allows you to view your set of filter stacks, edit them, delete them and create new ones.
Editing a filter stack
If you click an “Edit” button from the main page, you are taken to the filter stack editing page for the corresponding stack. Each filter stack consists of an ordered list of text and global filters. Editing consists primarily of modifying this ordered set. You can also change the name and description of the filter stack. But note: internally Movable Type stores the name of the filter stack wherever it has been used, so if you change it you will invalidate all of those instances, including every post where it was used. You can click the “Done” button to return to the main configuration page.
All edits are “live”, there is no “save” button.
Release Notes
Trackback URL: http://blog.thought-mesh.net/solidwallofcode/mt_projects/mtfilterstack.php/ping
Hi there,
We were talking about my difficulties installing . I’ve done what the installation instructions here say to do, but I’m having some weird errors. Here’s a line from my server access logs:
86.135.91.77 - - [23/Sep/2006:12:02:03 -0400] “GET /mt/plugins/FilterStack/MTFilterStack-config.cgi HTTP/1.1” 500 922 “http://www.unitorganizer.com/mt/mt.cgi?__mode=list_plugins” “Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7”
So it looks good so far. I notice however that ‘Convert Line Breaks’ doesn’t show up as a choice. Does it count as default?
Dave
Okay, I used ‘default’ as part of one of my filterstacks, and it worked perfectly. Thanks for all of your help.
Excellent. Note that you can go in to the settings for a weblog and make a filter stack the default formatting (via “New Entry Defaults”).