[pmwiki-users] Re: Custom HTML headers

Patrick R. Michaud pmichaud at pobox.com
Sun Apr 3 10:38:26 CDT 2005


On Fri, Apr 01, 2005 at 12:40:21AM +0200, Dominique Faure wrote:
> Anyway, applying a regexp replacement on the html header 
> would be required to handle regular skins, then my only(!) problem is 
> when/where could I do that? Initially, I was thinking working directly from 
> my markup handler but since I now should alter the skin rendering code,...
> ...could you please tell me where I should "plug" a kind of callback to do 
> such things?

Well, I have two answers:

1. Trying to do regexp modifications of headings defined in skins is
   likely to be a real pain.  It obviously has to be done after the
   skin is loaded, but before it's output -- I'd guess that your
   best bet would be to replace the PrintSkin() function with
   a custom one of some sort.

2. I'm not sure that regexp replacement is the right thing to do here.
   If a feature requires real xml headers with appropriate namespaces,
   then the correct place to do it is in the skin .tmpl files
   directly (since they will affect the entire skin) and not 
   programmatically via a cookbook markup.  In particular, I
   don't think a cookbook recipe should be second-guessing a
   skin's doctype or other output settings -- in some sense, skins
   can and should get the "final word" about how things are going
   to be output.

It doesn't seem to me that it would be too difficult to let skin
designers and admins know how they could improve their skins to
be xml compatible.

Pm



More information about the pmwiki-users mailing list