Movable Type plugin for Wiki Formatting and XML-RPC Filtering Pipelines
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.
shortname=ooobdd
Archived Comments
MT::App::CMS=HASH(0x826c93c) Use of uninitialized value in split at plugins/xmlrpcfilter.pl line 37.
I tried it in an entry and in another location on the template just in case. Any ideas?
Well, I think I fixed that in MTXmlRpcFilterPlugin, so maybe check that out.
MT::App::CMS=HASH(0x826c944) Use of uninitialized value in pattern match (m//) at /mywebsite/extlib/SOAP/Lite.pm
Is there a certain version of SOAP::Lite that i need?
Are things actually working though? Since, that should just be a warning. I will see if I can replicate this on my side.
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.
What does your MTXMLRPCFilter tag look like?
As for the help, well... thanks for trying it out :)
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.
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("http://www.10500bc.org/twiki/bin/twiki_xmlrpc.cgi")->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?
$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.
I do hope it starts working for you. Seems everything I let out of the cage lately goes haywire outside my environment :)
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 :)
Glad to see it's working though, and thanks for being a tester :) Yay!
Software error:
Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl/5.8/Socket.pm 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.