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

Petko Yotov 5ko at 5ko.fr
Fri Nov 4 05:43:56 PDT 2022


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

-- 
If you upgrade :  https://www.pmwiki.org/Upgrades


On 04/11/2022 12:58, pmwiki.johnny1000 at spamgourmet.com wrote:
> is there a way to disable the header, sidebar, and footer when the
> AuthUser AuthForm is displaying, _without_ making changes to the skin
> files?
> 
> Once the user has been authenticated, (:noheader:), (:noleft:), and
> (:nofooter:) does the trick.
> But what about before authentication?



More information about the pmwiki-users mailing list