[pmwiki-users] New skin: Lens
arndis at gmail.com
Fri Sep 2 12:57:44 CDT 2005
On 9/2/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Aug 30, 2005 at 06:13:20PM -0400, Bronwyn Boltwood wrote:
> > The skin-related variables and arrays aren't going to accept
> > multi-level paths like lens/sample, are they?
> I think they do accept multi-level paths. If they don't, I think
> we could make it so that they do.
It turned out that they do. So putting everything inside /lens and
requiring people to set things like
$Skin = 'lens/sample';
$PageSkinList = array(
'pmwiki' => 'pmwiki',
'lens-eggs' => 'lens/eggs',
> But potentially another way to do things is to add another variable:
> $Skin = 'lens';
> $Theme = 'sample';
> and then the skin.php file can use the $Theme variable to decide
> what subdirectory of lens/ to use to pick and choose things from.
> (If $Theme isn't set, the skin.php could choose a default.)
That works so long as only $Skin comes into play, but doesn't allow me
to easily switch themes using skinchange. So I could either put in a
lot of code that lets us use skinchange to switch Lens themes while
not breaking anything, or steal-and-modify the skinchange script. I
haven't quite finished deciding what's best.
The decision is somewhat wrapped up in future changes, because I don't
want to be saying "well, it used to be done like so, but now you do it
so" too often. Plus, some wanted features will not be easy for me to
figure out, and this ties in with it. For example: I'd like to rework
how the css is grouped in skin.php and written to the theme folder,
but I'll need to tie two or more values together in a sort of table,
and I haven't found out enough about arrays and things to know what I
need to do.
> Inside of a skin template, one can do things like
> $SkinDirUrl/$Theme/whatever.css to get to theme-specific files for
> the skin.
Hm...that might be a good way to provide for one separately stored css
file per theme, which is something I want to do in future. It would
also be a lot easier and probably faster-running than a routine that
checks for file x in $ThemeDir then $LensSharedDir and uses whichever
comes first. I think that providing for a separately stored template
will best be done through an if routine in cssconfigurator.php,
> It's just a thought. I'm not dead-set against having skins spread
> themselves across multiple directories in pub/skins/, but I like
> the idea of closely related things staying in one place. And
I like tidy folder structures too, but I had ranked "compatible with
$Skin and skinchange" as more important. Since there are other
people, like Hans, making skin families, we probably need to allow for
the occasional shared-stuff folder.
> I can envision an admin trying something like
> $Skin = 'lens-core';
> and then wondering why things don't work as expected.
So can I. I need to think a little more about what the best approaches will be.
More information about the pmwiki-users