I tried this little hack instead.  Just before the $BOLTpluginHeader
line in BOLTmakepage, I added:

        if (is_array($BOLTpluginStyles)) $out = str_replace ('--></style>',
implode($BOLTpluginStyles, "\n") . '--></style>', $out);

Then I added this cool little script--possibly worthy of the core:

function BOLTFstyle($args, $zone='') {
        global $BOLTpluginStyles;
        $BOLTpluginStyles[] = $args[''][0];
        }

Then on a page I did this, with quite cool effect:

        [(style ".box { background-color: green; padding: 27px;
border: 5px solid yellow;}")]<box>TEST</box>

It's essentially the same, just seems a bit more straightforward to me.

Note: you can actually do this already with the BOLTreplaceTable,
which is actually quite powerful. In fact, I could rewrite
BOLTmakepage with these lines instead:


$BOLTreplaceTable['HTML']['in'][] = '--></style>';
$BOLTreplaceTable['HTML']['out'][] = implode($BOLTpluginStyles, "\n")
. '--></style>';
$BOLTreplaceTable['HTML']['in'][] = '\n</head>';
$BOLTreplaceTable['HTML']['out'][] = implode($BOLTpluginHeader, "\n")
. '\n</head>';
$BOLTreplaceTable['HTML']['in'][] = '\n</body>';
$BOLTreplaceTable['HTML']['out'][] = implode($BOLTpluginBody, "\n") . '</body>';
etc

In fact, I suppose you can do message and query results as well this
way...  Might even be faster (just one str_replace instead of
several)...  I'll try, and benchmark the difference.

This is a good idea. Thank you for the suggestion. Look for something
in the next release.

P.S. I like the suggestion for dropping the <style> opening and
closing tags, but would prefer to keep them in the actual skin style
sheet, as my goal has been to make it possible to just drop in a
regular css sheet, and only rename it to code.style.skinname.

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