Ok Hans, after a good bit of barking up the wrong tree, I think I
figured out what is going on with the skin array...

1) I thought I had disabled the config arrays, but evidently it is
definitely still in there.

2) I didn't think we needed a skin array in particular because you can
do code.forum.skin.triad or whatever for specific hierarchies. But
since we have the functionality I guess we might as well keep it. That
means those lines will be uncommented shortly.

3) I saw the helpful comment on BOLTpageCheck function and decided to
rewrite it to this. More enlightening hey?

## CHECKS TO SEE WHETHER $page OR CURRENT PAGE IS IN CHECK (A STRING
LIKE site*,main,test.alpha*)

I think that is actually the function you were looking for.

4) After getting it all to work as you suggested (with * and , in the
array key and the skin in the array value), and rewriting all the
various lines to get it to work, it dawned on me I was completely
barking up the wrong tree.  The syntax is not:

skin:*: someskin
skin:test*,site*: triad

Rather it should look like this:

skin:someskin: *
skin:triad: test*,site*

Note, in a situation like the above, the more general skin needs to be
listed first as the last match found is the one used.

Anyway, changing the syntax to this, means the regex works as is, and
the lines of code I think.  I have rewritten it just slightly (and
uncommented them again) to make more sense and to avoid BOLTskin
getting set to some array value:

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

Note you cannot do

skin: someskin
skin:triad: test

Because of php, which prevents $BOLTconfig[skin] from being both a
string and an array at the same time. So you have to use something
like this for the default.

skin:someskin: *

In testing I did discover the following did not work.

skin:: *
skin:triad: site*

Because the pattern does not match properly. To fix it I changed the
pattern to allow this
'/^(enable([-\w]+)\:?|([-\w]+)\:)(([-\w]*)\:)?(.*)?$/m' and found line
48 works much better if you use $m[4][$i] instead of $m[5]. But of
course if you just use the second line, it will default to '' anywhere
but site anyway, so it is not really necessary

Anyway I'm not 100% sure this won't break anything but it does give
the functionality I expect.  Works pretty well...

Give me a few moments and I'll put up the (hopefully) final release
for 3.18 at least.

Cheers,
Dan

On Tue, Oct 6, 2009 at 8:39 AM, The Editor <[email protected]> wrote:
> On Tue, Oct 6, 2009 at 8:14 AM, Hans <[email protected]> wrote:
>>
>>> For some reason the error message did
>>> not show up on my windows test installation.
>>
>> I got in index.php
>> $errorReporting = true;
>
> I do too, actually. But I've noticed many times apache will throw
> errors or warnings that do not show up on my windows server. I don't
> know all the reasons.
>
> Cheers,
> Dan
>

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