I checked this out a bit:
Testing with setting in site.config
skin:*: butterfly
skin:main*: crisp
skin:site*: triad
Not working. Code check:
$BOLTconfig['skin'] does not get set as an array, because in
engine.php line 45
the preg_match_all expression does not allow wildcards * and dots . in
the group after the first :
so we need to add all th echaracters a pagename could have in that group.
check with print_r($BOLTconfig['skin']); so we have an array for 'skin'
But the function is no good:
> if (is_array($BOLTconfig['skin'])) {
> foreach($BOLTconfig['skin'] as $skin => $check) {
> if (BOLTpageCheck($check)) $BOLTskin = $skin;
> }
> }
BOLTpageCheck() does not check if page exists.
I then tried to check the skin array keys against $pagelink:
if (is_array($BOLTconfig['skin'])) {#show($BOLTconfig['skin']);
foreach($BOLTconfig['skin'] as $pn => $skin) {
if ($pn==$pageLink) $BOLTskin = $skin;
}
}
This works now but not if one uses wildcards in page names like
skin:main*: crisp
so we need to check in the function if the current page is matching
the wildcard pagename given in site.config. Has BW a function for
this? That would be proper to replace the $pn==$pageLink check.
After that function we have
if ($BOLTskin == '') $BOLTskin = BOLTconfig('BOLTskin');
This mystifies me. If for a given page a skin has not been set, this
function will return the $BOLTconfig['skin'] array. But it would be
nic eif it could gracefully give the default skin (the default skin
appears, but it is not assigned at this point in the code).
cheers,
hans
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---