Loading...
 
Development

Development


Filter for editing Wiki pages

posts: 18 Germany

We found it useful to have the ability to pre-process the data of a wiki page when the user edits it in

tiki-editpage.php

and previews/saves the data.

This can be very useful to implement site-specific shortcuts and
syntax that is automatically mapped to the Wiki syntax by the filter.

In our case, we introduced a structural namespace
via a page prefix, e.g.

Project-SomeProject-

and a filter that automatically extends local links to be in the same project.

I called it "editpage" filter and added it to the lib/tikilib.php.

One can add his own "editpage" filters in the tiki-filters.php file,
the filter is called with the pagename and the data. Having the page name is useful if the filter should do something depended on the page name that was edited.

It would be nice if you could add this feature into the main TikiWiki branch, maybe there is a better name instead of "editpage" though.

Here is my implementation of it, I added "//New: Florian" where I added code.

http://www.mevis.de/~florian/tiki/editpagefilter.zip

There are no comments at this time.