[pmwiki-users] Disabling header, sidebar, and footer...

pmwiki.johnny1000 at spamgourmet.com pmwiki.johnny1000 at spamgourmet.com
Fri Nov 4 08:24:09 PDT 2022


Thank you for a very quick reply Petko :o)

I did not know about the existence of $AuthPromptFmt

Please don't spend time implementing any extra functionality for this 
question, unless you really want to yourself :o)

I will play around with $AuthPromptFmt. It seems to be able to do what I 
need :o)

Best regards :o)
Johnny :o)

Den 04.11.2022 kl. 13.43 skrev Petko Yotov - 5ko at 5ko.fr:
> I suspect (:nofooter:) works. You can add this to your config.php:
> 
>    $AuthPromptFmt = array('markup:(:noheader:)(:nofooter:)(:noleft:)',
>           &$PageStartFmt, 'page:$SiteGroup.AuthForm',  &$PageEndFmt);
> 
> 
> The design of the PrintFmt() function is that once output to the browser 
> starts, if an included or processed page adds or disables some features 
> like the header or footer, those that have already been sent to the 
> browser cannot be removed, but those that follow can.
> 
> The code above ensures the markup '(:noheader:)(:nofooter:)(:noleft:)' 
> will be processed before the header and sidebar are sent to the browser.
> 
> 
> Adding '(:noheader:)(:nofooter:)(:noleft:)' to Site.AuthForm will fail 
> for the header and probably for the sidebar (unless in the skin 
> template, the sidebar is after the page text), but will succeed 
> disabling the footer.
> 
> This also happens if a SideBar adds some recipe that injects some 
> JavaScript or styles in the HTML header -- the header is already sent 
> when the SideBar is processed.
> 
> 
> PrintFmt() accepts nested arrays and processes them recursively. Every 
> element of the array can be either another array, HTTP headers, HTML, 
> wiki markup, a wiki page, or a function, and all these can potentially 
> enable or disable skin parts, styles, scripts, or HTTP headers.
> 
> There is no simple fix, I'll have to think about it, but should be doable.
> 
> 
> Petko
> 




More information about the pmwiki-users mailing list