[Pmwiki-users] Minor enhancement: configurable PrintWikiPage

Greg Morgan Cybie
Wed Mar 31 22:32:05 CST 2004


Stefan Vogel wrote:

>Hi,
>
>I would like to "overload" resp. configure the "PrintWikiPage"-function
>because I want to react flexible on those
><!--wiki: ... --> -tags.
>
>E.g. some of this page-includes should be wrapped inside a specialized
>"<div>"-section, but only if there is an include ...
>I'd like to put the "edit-area" into an "<!--wiki: ...-->"-tag and would
>be able to ignore the include in special password-protected groups, ...
>
>I'd like to have the following patch:
>
>
> # somewhere around line-no: 115
> $FmtUrlLink = 'FmtUrlLink';
> $PrintWikiPage = 'PrintWikiPage';  # Defaults to the usual function
>
> function PrintFmt ($pagename,$fmt) {
>   global $HTTPHeaders, $PrintWikiPage;
>   ...
>   if (preg_match("/^wiki:(.+)\$/s",$x,$match)) {
>     # call configured function, not PrintWikiPage directly
>     $PrintWikiPage($pagename,$match[1]);      
>     return; 
>   }
>
>Is that perhaps something others want too?
>
>Best regards 
>  Stefan
>
>
>  
>
That'd be great... wouldn't mind something similar for PrintText as well.



More information about the pmwiki-users mailing list