tags:

views:

133

answers:

2

I'm looking for a comprehensive and well maintained wiki syntax Parser for PHP, does anybody know of one? I can find some really good parsers for markdown and bbcode but am having trouble with finding a decent wiki parser.

I prefer markdown myself, but I'm writing post functions for a CMS and I'd like to give end-users a choice.

I thought about downloading a copy of MediaWiki and seeing how they do it, thoughts on this as an option?


edit:

I've already looked over the PHP parsers at http://www.mediawiki.org/wiki/Alternative_parsers and none really do everything I want. see comment on @middus answer.

+2  A: 

See the links over here, there are quite a lot of alternate parsers for MediaWiki's wiki syntax.

http://toolserver.org/~magnus/wiki2xml/w2x.php looks promising to me.

middus
Sorry, I should have mentioned but I have looked over that page. The three parsers that deal with PHP all have issues that I'm not sure about. The first is a HTML>PDF converter, the wiki-to-xml parser is apparently very slow, and Mediawiki2HTML is quite new and unestablished.
Rowan
Did you actually try the wiki2xml parser? AFAIK the author has worked on the performance and now claims it to be "about as fast as the original MediaWiki parser!". (Keep in mind that MediaWiki's syntax is quite complex. So you'll probably need some kind of caching anyway.)
middus
No I didn't download and try it, I will give it a go after work today. Thanks for pointing that out.
Rowan
A: 

The one in DokuWiki is relatively re-usable, at least it looks so.

SK-logic