[Mediawiki-l] How to use hooks in extension, so that existing formatting between newly defined tags is kept

Peter P GMX Prometheus001 at gmx.net
Sun Feb 10 17:35:56 UTC 2008


I have the following issue:

for a private wiki I want to display some part of the content only to 
registered users. 
So I created an extension with a <hide></hide>  tag in order to suppress 
all content between these tags for non registered users and display 
"(hidden)" instead.

It works fine so far except that most of the normal Wiki formatting 
between these Tags (mainly Links) ist lost. How can I achieve that 
formatting is kept?

I played around with
ParserBeforeTidy
ParserAfterTidy
ParserAfterStrip
ParserBeforeStrip
InternalParseBeforeLinks
ParserBeforeInternalParse

But
- either the tags are visible and suppression doesn't work
or
- most of the normal Wiki formatting between these Tags (mainly Links) 
ist lost.

Any hints?

With kind regards
Peter



More information about the MediaWiki-l mailing list