0xDECAFBAD

MTXmlRpcFilterPlugin

Revision r1.9 - 19 Nov 2002 - 05:47 GMT - LesOrchard

Introduction

Along the way to trying to hack together a WeblogWithWiki, I started tinkering with a couple of pet technologies: XmlRpcFilteringPipe and XmlRpcToWiki. The combination of these two allows for easy filtering of text content through a variety of Wiki:WikiClone implementations via a common XmlRpc interface.

Now, MovableType has been given a plugin architecture by which new tags can be added to the templating system. To close the WeblogWithWiki circle, I wrote this plugin to add a container tag to MovableType which can send its content through an XmlRpc filter. The first of these filters to be used belongs to the XmlRpcToWiki API, thus integrating MovableType template rendering with the content rendering of the Wiki:WikiClone exposed via XmlRpcToWiki.

News & Status

Initial release, see: Blog:000244

-- LesOrchard - 19 Aug 2002

Downloads

Documentation

Installation

  1. Check out XmlRpcToWiki and grab the appropriate interface for your wiki, if one exists.
  2. Download the above file.
  3. Copy the downloaded file as xmlrpcfilter.pl into the plugins/ directory of your MovableType installation.

Usage

After installation, you will have a new tag available for use in your templates: MTXMLRPCFilter. The tag can be given the following attributes:

  • remove_whitespace: 0/1 (default 1), whether or not to remove whitespace, tabs, and newlines surrounding content text.
  • url: The URL at which the XmlRpcFilteringPipe interface resides.
  • method: XML-RPC method to be called for filtering. Defaults to 'wiki.filterData'
  • content_type: Content-type of the data to be filtered. Defaults to 'text/html'
  • params: Comma-separated name=value pairs used as options by the filter
For example, consider the following text in a MovableType template:
<MTXMLRPCFilter url="http://www.decafbad.com/twiki/bin/twiki_xmlrpc.cgi">

This is another test.  PipeFilters, ShareAndEnjoy.

   * One
   * One a
      * two
         * three
            * four
      * two a

How about a table?

| this | is | a |
| test | table | format |

</MTXMLRPCFilter>
This would produce a block of text like this:
This is another test. PipeFilters, ShareAndEnjoy.

  • One
  • One a
    • two
      • three
        • four
    • two a

How about a table?

this is a
test table format

License

This software is provided as-is. You may use it for commercial or personal use. If you distribute it, please keep this notice intact.

Basically: Do what you want with it as long as you acknowledge I wrote it, and don't blame me if you poke your eye out with it.

Attachment sort Action Size Date Who Comment
xmlrpcfilter_pl.txt manage 2.0 K 19 Aug 2002 - 19:50 LesOrchard  

When I grow up, I want to be a computer scientist
Rotating header picture Rotating header picture


Advanced Search

Related Entries

(Disabled, for now.)

Buttons

View items on my Amazon wishlist

Made on a Macintosh Powered by Movable Type <$MTVersion$> Made for Safari Get Firefox You can do better than Microsoft Internet Explorer

Creative Commons License
This work is licensed under a Creative Commons License.