Recent Changes - Search:

PmWiki

pmwiki.org

SkinDirectories

still working on this - not quite ready yet...

The default skin setup puts the skin files in 1 directory. A more secure way is to puts some files for a skin (like the .tmpl file) in a private area and store only required files in a publicly accessible directory (like css and images).

This is done with the $SkinLibDirs array. The default setup has the the same directory for the skin .tmpl file and the css and image files.

 $SkinLibDirs - An associative array which PmWiki uses to find a 
    "skin .tmpl file" and a "skin css file". It consists of a set of (key,value) 
    pairs. The key is a possible path to a file on disk holding the 
    "skin .tmpl file", while the value is the coresponding URL for the 
    "skin css file". 

        By default $SkinLibDirs is set as:

        $SkinLibDirs = array("./pub/skins/\$Skin" => "$PubDirUrl/skins/\$Skin"
                "$FarmD/pub/skins/\$Skin" => "$FarmPubDirUrl/skins/\$Skin");

Moving the skin .tmpl file out of a publicly accessible directory you can still use it. For instance, the skin .tmpl file can be located in server directory

    /var/www/home/aplace/wikifarm/pub/skins/myskin/myskin.tmpl

The css and image files can be located in

    /var/www/home/aplace/public_html/wikifarm/pub/skins/myskin/

 It would look like this:

 /var/www/home/aplace/
  |
  |-- public_html/                    (publicly-accessible files)
  |   |-- wiki1
  |   |   |- local/
  |   |   |- pub/
  |   |   |  |- css
  |   |   |  `- skins
  |   |   `- wiki.d
  |   |-- wiki2
  |   |   |- local/
  |   |   |- pub/
  |   |   |  |- css
  |   |   |  `- skins
  |   |   `- wiki.d
  |   |-- wiki3
  |   |   |- local/
  |   |   |- pub/
  |   |   |  |- css
  |   |   |  `- skins
  |   |   `- wiki.d
  |   |-- wiki4
  |   |   |- local/
  |   |   |- pub/
  |   |   |  |- css
  |   |   |  `- skins
  |   |   `- wiki.d
  |   `-- wikifarm/pub/
  |                `-- skins/myskin/  (css(s), image(s))
  |                          `-- myskin.css              <-*-*-*-*
  |
  `-- wikifarm/
      |-- pmwiki.php
      |-- wiki.d/            (farm wiki only wiki.d)
      |-- local/
      |   |-- config.php     (farm wiki only configuration)
      |   `-- farmconfig     (farm wide configuration)
      |-- cookbook/          (farm wide recipes)
      |-- scripts/           (farm wide scripts)
      `-- pub/               (NOT publicaly accessible)
          `--/skins/myskin/ 
                    `--myskin.tmpl                       <-*-*-*-*

You would set the variable $FarmPubDirUrl to

$FarmPubDirUrl = 'http://www.aplace.org/wikifarm/pub';

$FarmD is automatically set to '/var/www/home/stuffforsale/wikifarm'.

Edit - History - Print - Recent Changes - Search
Page last modified on November 07, 2006, at 01:08 PM