[Pmwiki-users] Re: skins

chr@home.se chr
Tue Oct 26 15:46:25 CDT 2004


> > They only approach I can think of feels clumsy:
> > - Put the files that are currently in pub/skins/pmwiki/ somewhere else,
> >   like wikilib.d/ or scripts/ (yeah, I know - they don't feel right).
> > - When PmWiki runs, have it check to see if they exist in
> >   pub/skins/pmwiki/
> > - If they don't, copy them there.
> > Problems include the overhead of checking file existence, thought I guess
> > this only needs to be checked if the pmwiki skin is in use.
> 
> Worse, the copy of the skins would have the wrong ownerships, and 
> pub/skins/pmwiki/ would have to be writable by the webserver.

Sorry for jumping in on a thread that I have no idea what it's really
about, but... regarding this issue with file ownership. Would something
like this help:

* Rename pub/ to something like pub-src/ and treat it as a directory
  that contains source files.

* Let pmwiki.php automatically duplicate pub-src/ to pub/. Only files that 
  are more recent needs to be duplicated of course.

The idea would be to treat files in pub-src/ as "source" files, and pmwiki
is now also able to transformations on the template files if needed when
duplicating them to pub/.

Advantages would be that files that need to be writable by pmwiki.php stay
in one structure (pub/), and that all files in that structure will be
owned by 'www'. Files in pub-src/ only have to be readable by 'www', and
as soon as the admin modifies one of these files it is automatically
duplicated to pub/.

A drawback is that this copying will require some bit of overhead
(pmwiki.php wouldn't have to check for new files each time it is invoked
though, once a second should be enough). 

Once again, sorry if this is totally unrelated to whatever you are 
discussing... in that case I hope it'll be useful for some other problem 
in the future ;-)

/Christian

-- 
Christian Ridderstr?m, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list