[Pmwiki-users] edit-exit
Patrick R. Michaud
pmichaud
Sat Sep 25 13:53:01 CDT 2004
On Sat, Sep 25, 2004 at 09:11:15PM +0200, Knut Alboldt wrote:
> Is there a possibility in pmwiki 2 to process a edited page before it' s
> being saved ?
>
> I found out, that e.g. for a german keyboard the markup of a markup [::]
> it's a bit like the alt-ctrl-del (monkey-grip ?):
> alt-gr-8 shift-dot shift-dot alt-gr-9.
> [...]
> What I thought about is entering e.g. "<<" and translate it to "[:" and
> ">>" and translate it to ":]" (or any other) before saving the page.
> Is there an easy way to process this within the edit-save-procedure
> (concerning pmwiki2) without changing pmwiki.php (e.g. as an exit which can
> be hooked up in config.php ?
Sure!
# Add ROSPatterns to convert << to [: and >> to :] in input text
$ROSPatterns['/<</'] = '[:';
$ROSPatterns['/>>/'] = ':]';
Or, you could just go ahead and store pages with the <<directive>> markup,
and do the conversion when the page is being displayed:
# Convert << and >> to [: and :] at beginning of page translation
# (but after [=...=] and [@...@] markup).
Markup('<<','>[=','/<</','[:');
Markup('>>','>[=','/>>/',':]');
Pm
More information about the pmwiki-users
mailing list