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

Thomas -Balu- Walter list+pmwiki-users
Thu Nov 18 05:03:56 CST 2004


Haleluja - I get PHP-files in skins :)
(short answer: go for this)

On Fri, Nov 12, 2004 at 02:59:52PM -0700, Patrick R. Michaud wrote:
> One option would be to require that the names of the files match the
> name of the skin, as in 'xyzskin.php', 'xyzskin.tmpl', and 'xyzskin.css'.
> But I'm going to reject that option outright, because it means that
> copying or renaming a skin into a new directory requires making all of
> the filenames match.  
> 
> The next logical option is to require the skin and template files to always
> have the same name, i.e., "skin.php" and "skin.tmpl", or "screen.php" and
> "screen.tmpl", etc.  But for some reason I'm inclined to find that a 
> little too restrictive as well.

That would be ok as long as skin admins still have the possibility to
choose the template file in the skin.php I guess.

> So--here's the somewhat radical part--what if we just go to the other 
> extreme, and let the php and template files be named *anything* as long 
> as they end in .php or .tmpl.  Thus, with $Skin='xyzskin', PmWiki would 
> just use whatever .php and/or .tmpl files it happens to find in 
> pub/skins/xyzskin.  

I am not sure wether I like that. I have two servers with a very very
slow file-io. Opening or looking for files sometimes takes a second.
(yes, I know I have to do something against this), so I think searching
for all files will take a lot more time than just checking wether
skin.php exists and load it.

> Of course, the question then becomes, what if there's more than one?
> For .php files, it could just load all that it finds, but this is
> probably a bit dangerous.  Perhaps the better approach is to keep a
> restriction that a skin's .php file must be named something like 
> "skin.php" or "settings.php" in order to be automatically used.

Si.

     Balu



More information about the pmwiki-users mailing list