You give up to early my friend!

You should be able to use an "if" (just tested if='equal {+field}
blog.one'. Remember with info, we use {+field} and {+value}), and also
can use include, exclude, and type.  But group, pattern, dir, and
folder are not available. Group and pattern make sense but it doesn't
really fit to implement that in the code. It would be much easier to
write a custom info extension. However,

There is a base= parameter useful for some of these kind of things,
though currently it is only available in the count and sum function.
We could easily rewrite the code to make it available more generally
to all info function outputs.

It can allow for example:

base=blog.group1  or  base=blog.group2

Which only returns the count or sum of pages that begin with
blog.group1 or blog.group2. To implement this more generally we would
just need to insert the middle lines below, into functions.php, ~lines
237:

                $info_flip = BOLTsearchPageListPlus($info_flip, $args);
                if (isset($args['base'])) {
                        foreach($info_flip as $i => $ii) {
                                if (substr($ii, 0, strlen($args['base'])) != 
$args['base'])
unset($info_flip[$i]);
                                }
                        }
                if (isset($infosort)) {

Then we can simplify the count and sum features like this:

                case 'count' :
                        foreach ($info as $i => $ii) $c = $c + 1;
                        return $c;
                case 'sum' :                    
                        foreach ($info as $i => $ii) $c = $c + $ii;
                        return $c;

I think this would is a handy improvement. Give it a try and see if it
doesn't work for you. I'll plan on adding this to the next release if
I don't hear any problems...

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