[pmwiki-users] Requiring HTMLHeader/HTMLFooter (was: togglelink recipe)

Patrick R. Michaud pmichaud at pobox.com
Sat Jan 6 11:30:29 CST 2007


On Sat, Jan 06, 2007 at 11:11:30AM -0600, Jon Haupt wrote:
> On 1/6/07, Hans <design5 at softflow.co.uk> wrote:
> > Saturday, January 6, 2007, 10:19:41 AM, marc wrote:
> > >> Is there a strong reason why the JS cannot be loaded into
> > >> $HTMLFooterFmt instead?  That's pretty well guaranteed to be output
> > >> after all markup and other items...
> >
> > I updated both togglelink.php and showhide.php to load the javascript
> > inside the function via $HTMLFooterFmt.
> 
> Do note that this requires that your skin use <!--HTMLFooter-->
> somewhere, or the code has nowhere to go.  (the skin I was using
> didn't, so I had to figure out what was going on when I updated!)

Along these lines, I've been planning to change the skins code
in 2.2.0-beta such that it returns an error if a skin template
is missing the required <!--HTMLHeader--> directive 
(or <!--HeaderText--> for older sites).

This means that any site that upgrades to 2.2.0 but is using
a skin that is missing <!--HTMLHeader--> will stop working
(but the error message will make it fairly obvious why, and
there will be a configuration variable to suppress the check.)

Skins that _really_ want to suppress the HTMLHeader will be able
to provide a <!--NoHTMLHeader--> directive in the template.

Questions:

1.  Any reason PmWiki shouldn't generate an error if <!--HTMLHeader-->
    is missing from a template?

2.  Should we also require <!--HTMLFooter--> as well, and report an
    error if it's not present in the template?

Pm




More information about the pmwiki-users mailing list