[Pmwiki-users] Skins

Thomas -Balu- Walter list+pmwiki-users
Tue Feb 24 07:01:28 CST 2004


On Sat, Feb 21, 2004 at 10:00:20PM -0500, Bob Dively wrote:
> Patrick R. Michaud said:
> 
> > Below is my conception of what the PmWiki default template would
> > look like if we followed something along the lines of what Steven
> > has suggested.  Some general comments about the format of the template
> > file:
> 
> This is much closer to what people are thinking when they talk about a
> skin/template system. It definitely makes it easier for designers to do
> their thing without lots and lots of help from a programmer.

I am not sure weather we should support designers more, but forget about
the programmers then :).

The designers would have to learn where to put which placeholder anyway,
I don't think it would be harder for them to learn <!--PageHeaderFmt-->
or <?php printPageHeader(); ?> - but the second one would allow
programmers to do a lot more with the output (e.g. buffer and modify
it).

I don't really see a reason why (incomplete | to be included) PHP
scripts shouldn't be allowed to be in a public accessible directory
either. Just add a new first line in all scripts that are to be
included:
        if (!defined('pmWiki')) exit;
And make sure you define pmWiki in the scripts that include them :)        

If the skins would have an own subdirectory it would be easier to
distribute them.

> >  This might cause problems if someone really wants to
> > display a dollar sign in the HTML output, although one can always use
> > "&#036;"  for that.
> 
> Or maybe escape the $ with another $, so that $$ is evaluated the same way
> $VarName is?

Why add more special things to know if PHP code can handle that nicely?

> > <!--wiki:Foo.PageName--> substitutes the contents of Foo.PageName
> > at that point.  The page name can be parameterized as well,
> > thus <!--wiki:$Group.PageName--> substitutes PageName from the
> > current group. <!--file:filename.php--> includes the contents of
> > filename.php
> 
> > Let me know if you think this is an easier way to specify layouts.
> 
> Yes, much easier, particularly for non-programmer folk.

But it will restrict programmers.

What about having a class which allows access to the layout variables
and conditions (as noheader)? Not sure if that'll clean up the template
and make it easier to use or other way round :) - but the programmers
could easily extend the class ;)

     Balu



More information about the pmwiki-users mailing list