[pmwiki-users] Re: Custom HTML headers

Patrick R. Michaud pmichaud at pobox.com
Thu Mar 31 10:31:07 CST 2005


On Thu, Mar 31, 2005 at 06:22:43PM +0200, Dominique Faure wrote:
> Hi,
> 
> Looking to enable embedding of mathematical stuff into PmWiki, I need to
> set my own headers to have real xml headers with appropriate namespace
> declarations. Digging into pmwiki.php, I found several helpful variables,
> aka: $HTMLDoctypeFmt, $HTMLBodyFmt, $HTMLEndFmt,...
> 
> May we use them while designing skins like following examples?

Personally, I wouldn't use them for skin templates -- it complicates the
templates and adds more variables for an admin to worry about (and
for us or a skin designer to document).

$HTMLDoctypeFmt, $HTMLBodyFmt, etc. exist primarily for backwards
compatibility with very old versions of PmWiki (<0.6), or for those
odd cases where a skin isn't loaded.  If a skin is loaded from a
template, these variables are typically not used (nor do I think 
they should be).

> I wouldn't like to have to use the same kind of kludge you applied on the
> content-type header in HandleSource() function...

Kludge?  Hmm, I didn't think of that as being a kludge.  :-)
The reason I had to do that particular fix was because of the many
different character encodings that are available -- I needed a way
to detect the character encoding (and didn't want to introduce 
another variable to do it and have to worry about that variable's
interactions with all of the other components of PmWiki).

Often variables are good things, but making too many things configurable
and introducing too many variables can often make things harder to
understand, as people have to go back-and-forth to figure out what
each variable means.

Pm



More information about the pmwiki-users mailing list