[pmwiki-users] Dumb Question.

Patrick R. Michaud pmichaud at pobox.com
Thu Oct 5 13:19:08 CDT 2006


On Thu, Oct 05, 2006 at 02:09:43PM -0400, Stirling Westrup wrote:
> Patrick R. Michaud wrote:
> > There's not really a good way to create new list= options based
> > on existing ones.  However, I could make it such that it's easy
> > to remove the '-Draft' exclusion from list=normal ... would that
> > work?
> 
> Well, it would work if I could do something like this:
> 
>   $SearchPatterns['drafty'] = $SearchPatterns['normal'];
>   unset $SearchPatterns['drafty']['draft'];

Sure, except that $SearchPatterns['normal'] isn't initialized
until pagelist.php is loaded, which occurs after local/config.php.

So, what we'd have to do instead is to have:

    include_once("$FarmD/scripts/stdconfig.php");
    $SearchPatterns['drafty'] = $SearchPatterns['normal'];
    unset $SearchPatterns['drafty']['draft'];

and *this* can be made to work if I make a few changes to
the way that $SearchPatterns is initialized.  Look for it
in an upcoming beta...?

> For now I can just create my 'drafty' version by hand and try to keep it
> in synch when I add new patterns to the 'normal' version.

That might be best for a while. 

> It would also be fine by me if I could augment the pages returned by
> list=normal in the pagelist command like this:
> 
> (:pagelist list=normal group=Group name=+*-Draft:)

That gets pretty messy internally, so I doubt we'll have anything
like this for a while.

Pm




More information about the pmwiki-users mailing list