Last week, after reading what Mark Pilgrim had to say about macros in MovableType, I made a mental note to finally circle back around to hacking together my WeblogWithWiki now that MovableType has plugin features.

Turns out it was so much easier than I thought it would be. MovableType's plugin scheme is dead simple, which hopefully means that plugins will flourish like mad.

First, I hacked together MTWikiFormatPlugin. This plugin simply implements a new container tag, MTWikiFormat, which runs the contents of the tag through CPAN:Text::WikiFormat. This doesn't actually integrate with any existing wiki, but it is very simple to install and does bring some wiki-ness to blog entries, including some limited formatting and Wiki:WikiWords. This doesn't provide everything Mark had posted in a lil wishlist comment to me, but it's a start. Maybe I'll look into tearing the formatting guts out of some wiki to make a Text::WikiFormat replacement, or maybe I'll submit patches to the original module.

The second plugin though, MTXmlRpcFilterPlugin, is what I'm really happy about.
Whereas MTWikiFormatPlugin filters content through one perl module, MTXmlRpcFilterPlugin can filter content through one or more XmlRpcFilteringPipe interfaces. I have a handful of these filters available on my site right now, and in a little while I will catalog them in the wiki. For now, I'm just filtering this entry through DecafbadWiki. In the future, I may get more adventurous with my content filtering pipeline.

One drawback to using MTXmlRpcFilterPlugin for the purposes of a WeblogWithWiki is that I've only got support for TWiki so far in my XmlRpcToWiki project. Other wikis still need some hacking before they can provide filters. Some assembly required, fellow AlphaGeeks.

So, ShareAndEnjoy. Time for bed.


Archived Comments

  • Great job. I'm trying to impliment the version using my Twiki is the last released version, not alpha stuff. I droped the files in place as instructed, but when i try to us the tags i get this: MT::App::CMS=HASH(0x826c93c) Use of uninitialized value in split at plugins/ line 37. I tried it in an entry and in another location on the template just in case. Any ideas?
  • Man, I'm sloppy with perl warnings. :( Hoping this ReleaseEarlyReleaseOften thing doesn't ruin my reputation! Heh. Well, I think I fixed that in MTXmlRpcFilterPlugin, so maybe check that out.
  • Oh, and one other thing I just thought of is that I don't think my TWiki install is the latest version. I should upgrade sometime soon. Hopefully, no problems arise from the XmlRpcToWiki side of things.
  • Ok i tried that, now i'm getting a new error, or at least some more information on it. MT::App::CMS=HASH(0x826c944) Use of uninitialized value in pattern match (m//) at /mywebsite/extlib/SOAP/ Is there a certain version of SOAP::Lite that i need?
  • Grr. Where are you seeing the warning? On my server, things just work with whatever version of CPAN:SOAP::Lite I installed about 6 months ago. If you feel adventurous, maybe try tossing a "no warnings;" before "use strict;" in the Are things actually working though? Since, that *should* just be a warning. I will see if I can replicate this on my side.
  • Ok here is a little more info: The pattern match error occurs with i rebuilt the template. It occurs even if i use no warnings; After its run the entries look like this: Problem calling filter: proxy: transport protocol not specified I did find one problem, i droped the twiki_xmlrpc.cgi right in my twiki directory. Upon testing it i discovered it was looking for your libs, so i fixed that. I wrote a simple test script with SOAP::TEST and made sure that it was functioning correctly, and that part is. I also update SOAP::Lite , i was one version behind and it didn't change anything. So i'm still at a lose but looking still, thanks for all the help.
  • Well, on my install, twiki_xmlrpc.cgi is in =twiki/bin/= along with the other TWiki scripts. Did you drop it in just =twiki/=? But you said you made a test script and the XmlRpcToWiki bit is actually working? What does your MTXMLRPCFilter tag look like? As for the help, well... thanks for trying it out :)
  • Yes its in the twiki/bin/ folder with the others and according to SOAP::TEST is working fine. Here is the tag that i'm using: I also tried it with the extended setting, but stoped after i couldn't get it to work. I'm not sure exactly what i did but its no longer giving me the parse error on rebuilding the template, its just giving: Problem calling filter, empty result. At least that seems a little better.
  • Well, that seems better from the plugin's point of view, but now it seems like your =twiki_xmlrpc.cgi= is still a bit off. I tried this lil oneliner with an undef result on your perl -MSOAP::Lite -MXMLRPC::Lite -MData::Dumper -e'$txt = "This is a test foo foo foo foo WikiWord TwikiWiki"; print Data::Dumper::Dumper(XMLRPC::Lite->proxy("")->call("wiki.filterData", SOAP::Data->type(base64 => $txt), "text/html", {})->result())."\n"' Whereas on my install, I get: $VAR1 = { 'data' => 'This is a test foo foo foo foo ?WikiWord ?TwikiWiki', 'contentType' => 'text/html' }; Hmm, I wonder if that jumble will make any swnse? :) Does your error log say anything?
  • Yep that makes perfect since. I finally found that XML::Parser::Lite module was missing the twiki lib. Once i added that the test returns the following result: $VAR1 = { 'data' => 'This is a foo foo foo foo WikiWord? TwikiWiki?', 'contentType' => 'text/html' }; Which should be correct or close anyway. So that part works now, but now it appears the plugin not returning any information on the entries, at least its not giving an error message so it must be running.
  • Hmm, well, if there are no more errors and that testing one-liner works, the thing *should* be working. Though, I noticed you put [wikiWord] in an entry. I'm not sure if that would do much, since TWiki uses double-bracket links. Like: [[WikiWord]] or [[Perl]] or [[Python]]. I do hope it starts working for you. Seems everything I let out of the cage lately goes haywire outside my environment :)
  • I was just playing with some various things there to see if i could get something to happen. I'm not giving up yet. When i have some more free time, i'm gonna get back on it. The wikiFormat one works just fine btw. Its just that the cool factor is much higher on the other interface. :)
  • Ok , i was in the phpWiki world earlier and i uses the single [], sometimes i get mixed up. I have it working as long as i use extended="1" and the [[ xxx ]] format for my words. I'm not sure why its not picking the others up automatically in the entries, but it is out side of the entries. Kinda odd but could very well be related to formatting or something of that nature. Anyway my plan is to use the extended mode anyway, so thanks again for such a kick ass plugin, and the other stuff you do also! Glad I could be a tester for you :)
  • Strange... I don't think that extended="1" actually does anything in the MTXMLRPCFilter tag. It does in the MTWikiFormat tag though. You should also be able to use TWiki formatting rules too, like *bold* and tables and lists and things. Glad to see it's working though, and thanks for being a tester :) Yay!
  • Mate, your TWiki is dead: Software error: Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/ line 201. For help, please send mail to the webmaster (you@your.address), giving this error message and the time and date of the error.