Mailing List Archive

Extensions using Wiki syntax
Are there any plans for being able to write extensions that could
generate wiki syntax instead of straight HTML?

Ralph
Re: Extensions using Wiki syntax [ In reply to ]
> Are there any plans for being able to write extensions that could
> generate wiki syntax instead of straight HTML?

That sounds like it'd be easy to add. What would you use it for? You
could just register some pre-parse extensions that'd run before normal
parsing of the wiki code to HTML. Or if you didn't need anything to
fancy you could probably use a normal extension and just run it through
the existing parser before outputting. Assuming you only wanted to
output wiki from your own code in such a way as to maintain the standard
look n feel.

--
Michael <mogmios@mlug.missouri.edu>
http://kavlon.org
Re: Extensions using Wiki syntax [ In reply to ]
Well the ultimate purpose would be to write an image gallery (of sorts)
extension. I was hoping to be able to do something like
<ImageGallery>file\location\to\directory|thumb|150px|etc...</ImageGallery>.
What I wanted to happen next was the extension would list the directory
and generate a table of pictures from the directory put into a table,
and use the thumbnail syntax of wiki.

If I do this with HTML syntax I'll have to figure out how to get the PHP
code base to run the thumbnailing on each file. Not impossible, just
more work, so I thought I'd check to see if it was possible to make it
generate wiki syntax.

So are you saying it is possible for my code to generate wiki syntax,
then pass that to the parser which converts it to HTML, then output that
via a normal extension. That seems pretty reasonable. I think I'll try
that. Any pointers on how to use the Parser?

Ralph

Michael wrote:

>> Are there any plans for being able to write extensions that could
>> generate wiki syntax instead of straight HTML?
>
> That sounds like it'd be easy to add. What would you use it for? You
> could just register some pre-parse extensions that'd run before normal
> parsing of the wiki code to HTML. Or if you didn't need anything to
> fancy you could probably use a normal extension and just run it
> through the existing parser before outputting. Assuming you only
> wanted to output wiki from your own code in such a way as to maintain
> the standard look n feel.