"Stéphane Heckel" wrote :
> - I didn't find a way to produce a list of groups only ?
Hi Hans, I have implemented a quick & dirty {(glist)} "get list of all
groups", ...
Feel free to tune/implement the way you want in powertools if it makes
sense.
SH
/----------------------------------------------------------------------------/
$MarkupExpr['glist'] = 'MxMakeGList($pagename, @$args, @$argp)';
function MxMakeGList($pagename, $args, $opt='') {
if ($args[0]=='' && $opt=='') return $pagename;
$pagelist = ListPages();
$grouplist = array();
foreach($pagelist as $pagename) {
$groupname = FmtPageName('$Group',$pagename);
$grouplist[$groupname] = $groupname;
}
sort($grouplist);
$sep = (@$opt['sep']) ? $opt['sep'] : ",";
$sep = str_replace('\n',"\n",$sep);
$sep = str_replace('\r',"\r",$sep);
if ($sep=='LF') $sep = "\n";
if ($sep=='CRLF') $sep = "\r\n";
return implode($sep, $grouplist);
}
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users