[Pmwiki-users] organization of .css files in pub/

Patrick R. Michaud pmichaud
Tue Feb 17 20:23:47 CST 2004


On Tue, Feb 17, 2004 at 07:04:30PM -0800, Greg Morgan wrote:
>
> How about having a separate subdirectory in pub/skins and local/skins for
> each skin.. i.e. local/skins/$PageSkin/skin.php and pub/skins/$PageSkin/ &
> pub/skins/$PageSkin/images

E_TOOMANYDIRECTORIES.  My feeling is that people encountering PmWiki for
the first time (i.e., at installation) can be quite overwhelmed if there 
are a large number of directories, or worse, if they have to start
creating directories according to a predefined naming scheme.  Simpler
is better here.

However, just because PmWiki doesn't default to a sophisticated 
hierarchy or impose one doesn't mean such a hierarchy can't be 
adopted and used by convention.  I can easily imagine a skin 
zipfile or tarball containing files with names like

   local/skins/vanilla.php
   pub/skins/vanilla/vanilla.css
   pub/skins/vanilla/img/image-1.gif
   pub/skins/vanilla/img/image-2.gif

such that simply unpacking the zipfile builds the desired directory
structure for the admin, and doing include_once("local/skins/vanilla.php") 
is all that is needed to select a particular skin.  In this example,
the vanilla.php file would

  - set $PageSkin to vanilla/vanilla
  - use $PubDirUrlFmt/skins/vanilla/img as the prefix for required images

but could do even more complex things such as change the values of
$PageCSSFmt to look other places or at files in a different order.

I'll put together a sample skin zipfile/tarball based on this concept
and upload it to the Cookbook.

Thanks!

Pm



More information about the pmwiki-users mailing list