[pmwiki-users] skin info wanted
Patrick R. Michaud
pmichaud at pobox.com
Fri Sep 22 18:55:48 CDT 2006
On Fri, Sep 22, 2006 at 06:18:51PM -0500, JB wrote:
> > Each skin typically has one or more of
> > the following kinds of files:
> >
> > * A template file...
> > * CSS files...
> > * Image files...
> > * PHP files...
> > * Documentation files...
>
> The SkinLibDirs array "key" says where the
> "skin .tmpl file" is located and the
> SkinLibDirs array "value" says where the
> "skin css file" is located.
>
> 1
> How does PMWiki determine the skin .tmpl
> file's filename to use? Will it take
> ANYNAME.tmpl?
It first looks for "skinname.tmpl". If it finds it,
it uses that. Otherwise, it takes any .tmpl file that
is in the skin directory, as long as there's only one.
> 2
> Should there be only 1 skin .tmpl file
> in each skin directory?
In a basic skin, yes. Fancier skins may have
multiple .tmpl files, in which case it's up to
a skin.php file to select the appropriate one to
use.
> 3
> Image files like the css files must be
> publicly accessible. Would it be good
> to put them into the same directory as the
> css file(s)?
That's the intent, yes.
> 4
> Does PMWiki need to know anything about
> the documentation files, or are they
> intended for an administrator?
They're for administrators -- PmWiki doesn't need them.
> 5
> How does PMWiki determine where to get
> PHP files from?
Depends on the PHP file, but all paths are generally
relative to either the current directory or $FarmD.
> 6
> > There's an additional markup:
> > <!--function:func param1 param2
> > It will call the PHP function func
>
> Where is the php function called "func"? I
> cannot find it anywhere.
A template can use <!--function:xyz--> to call an
arbitrary PHP function named 'xyz'. This allows
administrators to create custom formatting functions
and have them called from the template file at the
appropriate point in output.
> 7
> It is better to say:
>
> SkinLibDirs allows you to keep some skin
> files private while putting only required
> files into publicly accessible areas (like
> css and image files). The array "key" says
> where a skin's private files are located
> and the array "value" says where a skin's
> files that must be publicly accessible are
> located.
> ?
I don't agree with the private/public distinction here --
that's not how PmWiki thinks of skin files and directories.
Essentially, the $SkinLibDirs keys specify where in the
filesystem to look for skin directories, and the values
specify the url to use to access a skin directory once it
is found.
> 8
> Does PMWiki first search for skin files in the
> private area and then the public area and take
> whichever comes first?
PmWiki's default setting looks first in pub/skins/<skinname>,
and if a skin directory is not found there it then looks in
$FarmD/pub/skins/<skinname>.
Pm
More information about the pmwiki-users
mailing list