[pmwiki-users] Note to skin designers
Patrick R. Michaud
pmichaud at pobox.com
Fri Feb 18 20:08:58 CST 2005
This is a note asking for a quick review/test of the various skins
currently loaded on pmwiki.org. Tonight on pmwiki.org I made a few
changes to PmWiki's skin processing code (somewhat substantial, described
below), and although I *think* I was able to do this such that it doesn't
impact any existing skins, I'd like to have others briefly verify that
this is the case before I issue the new code as beta22.
The changes I made are designed to make it much easier to enable/disable
sections of a skin template. For example, a number of sites have asked to
be able to "turn off" the sidebar when editing a page (to provide more
editing space), and several skin designers will tell you that this
has indeed been a pain. With the new setup, a wiki administrator
(or skin designer) can simply do:
if ($action == 'edit') SetTmplSection('PageLeftFmt', 0);
to cause the PageLeftFmt section (containing the sidebar) to be
suppressed in the output. Similarly, one can do
if (!PageExists(FmtPageName('$Group.SideBar', $pagename)))
to display the left sidebar only if the $Group.SideBar page exists.
The new code also allows skin designers to create template sections
in addition to the ones predefined by PmWiki such as PageLeftFmt,
PageTitleFmt, etc. For example, a skin designer can now define sections
such as <!--PageTopMenuFmt--> or <!--PageCommandsFmt--> and have them
automatically appear in the output and be switchable using the
SetTmplSection() function above. Previously this was possible
only by adding the additional desired sections names into the
$BasicLayoutVars array, which was a bit of a pain.
Again, at this point I'm mainly looking for feedback to determine
if the changes I made have broken any skins that are currently on
pmwiki.org (and if so, how). I'm aiming for complete compatibility
with existing skins so that nothing will break as a result.
Note that this probably won't fix any bugs that were previously in
the skins, however -- those should still be there. :-)
Also, if pmwiki.org's skin configuration is out of
date for any skin, now is a good time to let me know so
I can update pmwiki.org accordingly.
More information about the pmwiki-users