Alinome,  I've looked at the code and I think I have it solved...  Kind of:

The following code (end of functions.php) gives the display we want,
but it is not really configurable at all...  Basically the display
requires an array of zone => page, and the template display mechanism
only takes a non-keyed array... So there's no way really to do it as a
template, unless we want it to get very ugly with conditionals. The
php is much quicker and simpler...  And it doesn't require any
template in the action page. Just a simple [(zone)]. Boom, it's done.

function BOLTFzones($args, $zone='') {
        global $pageLink;
        $BOLTcodePages = BOLTconfig('BOLTcodePages', 'code');   
        if (isset($args['template'])) $template =
BOLTfilter($args['template'], 'page');
        else $template = 'zones';
        $skin = BOLTgetlink('skin', '', '', "$BOLTcodePages.");
        $contents = BOLTloadpage($skin);
        $zones['skin'] = $skin;
        preg_match_all('/\<\<([a-z]+)\>\>/', $contents, $z1);
        preg_match_all('/\[\[(.*?)\]\]/', $contents, $z2);
        foreach ($z1[1] as $z) $zones[$z] = BOLTgetlink($z, '', '', 
"$BOLTcodePages.");
        foreach ($z2[1] as $z) $zones[$z] = BOLTgetlink($z);
        $zones['main'] = $pageLink;
        $out = "[t width=100%][r color=#f7f7f7][h]ZONE[h cols=4]PAGE: 
$pageLink\n";
        foreach ($zones as $i => $ii) {
                if ($ii == '') $ii = $i;
                $out .= "[r][c]$i [c][[$ii|view]] 
[c][[$ii&action=source|source]]
[c][[$ii&action=edit|edit]]\n";
                }
        $out .= "\n[t]";
        return $out;
        }

As for making it more configurable, we could retrieve the template
from the page (kind of artificially) and use some custom markup to
populate it... {+zone} {+p} if we really wanted to. Or people could
always make their own custom zones function and tweak the display via
their own php code. Which should be easy enough. Or we could style it,
and get some control that way.

It occurs to me, we could in fact, make this a plugin, and cut out a
few lines and a page from the core, but this function is specifically
for new users who may get confused by all the zones and things.  So I
don't want to take that option.  I'm inclined to add this to the next
release.  Is this adequate?  Any feedback?

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