[Pmwiki-users] Re: Skins - a somewhat radical proposal

Patrick R. Michaud pmichaud
Thu Nov 25 11:53:36 CST 2004


On Mon, Nov 15, 2004 at 04:10:11PM +1300, John Rankin wrote:
>
> In the case of publish.php, it does things for the publish skin plus
> sets some variables used for action=browse so that action=publish works.
> Being able to install this just by putting a publish/ directory into 
> pub/skins/ is a great simplification. But I take your point about
> possible confusion.

It sounds to me as though this really needs to be two scripts -- one
(placed in cookbook/publish.php) that sets the variables needed for 
action=browse, as well as setting $ActionSkin['publish']='publish'; 
then a second script (pub/skins/publish/publish.php) that does whatever
changes need to be made when ?action=publish and becomes
invoked via $ActionSkin.

> FWIW I think I would clearer if it was ...
> - set by $Skin.php
> - set by skin.php
> - $Skin.tmpl
> - skin.tmpl
> - any .tmpl file if there is one
> - an error

I think I'm going with this.  Indeed, the full sequence will likely be--

 - $Skin is an array of skin specifiers to be loaded
 - $Skin is prefaced with any entries in $ActionSkin[$action]
 - PmWiki searches the $Skin array for a matching skin in pub/skins, when
   found it "collapses" $Skin to this single value  (if no requested skin
   is found, generate an appropriate error+diagnostics)
 - it then loads either the $Skin.php or skin.php file from the $Skin
   directory if they exist
 - use the template file specified by
   - the $Skin.php or skin.php file
   - $Skin.tmpl 
   - skin.tmpl 
   - *.tmpl if there's only one
   - error

Pm



More information about the pmwiki-users mailing list