On Fri, Mar 13, 2009 at 11:14 AM, The Editor <[email protected]> wrote:
> Think I prefer to keep it tighter, as the space seems to help set off
> the value from the label a bit better. I would almost prefer this
> syntax:
>
> skin[black]: test*

This pattern seems to work for this

preg_match_all('/^(enable([-\w]+)\:?|([-\w]+)(\[([-\w]+)\])?:)
?(.*?)$/m', $config, $m);
foreach ($m[2] as $i => $key) {
        if ($key) $BOLTplugins[strtolower($key)] = trim($m[6][$i]);
        elseif ($m[5][$i] != '')
$BOLTconfig[strtolower($m[3][$i]).'*'][strtolower($m[5][$i])] =
trim($m[6][$i]);
        else $BOLTconfig[strtolower($m[3][$i])] = trim($m[6][$i]);
        }

> However, I note if you have skin: black before skin:triad: test* in
> site.config, the code generating the code behaves erratically. If it
> comes after it overrides the array (predictable). Not sure whether or
> not to worry about it. I'll put in for the next release.

You'll notice I changed the above to add an * after arrays like
$BOLTconfig['skin*']['triad'] = test* for arrays, so skin: black does
not conflict with skin[triad]: test*. I don't know if we want to do
this or not but it solves the problem of conflict.

Then you can use code like this to generate skins properly:

if (is_array($BOLTconfig['skin*'])) {
        foreach($BOLTconfig['skin*'] as $skin => $check) {
                if (BOLTpageCheck($check)) $BOLTskin = $skin;
                }
        }
if ($BOLTskin == '') $BOLTskin = BOLTconfig('BOLTskin');

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to