Second post on a couple problems with the Markup Expressions Extensions recipe, I'd like to resolve...
On 4/16/07, The Editor <[EMAIL PROTECTED]> wrote: > In trying to finish up this recipe I came up with a bug... > > if (! CondAuth($p, $HandleAuth['source'])) return ''; > > seems to fail whether or not I have permission or not (defined in > config.php as admin. $p appears to be the correct Group.Name value. Help? It's supposed to return a blank if the user is not authorized to see the source of page $p. Otherwise it continues on in the routine. > Also, this does not work at all... I had this problem before and > never figured it out. The problem is the $p value even > though it shows up as expected, the strpos cannot find a " " in it, so > it can't make the test or return the right value > > $MarkupExpr['wiki'] = 'MkExpExtWiki($params)'; > function MkExpExtWiki($p) { > global $MkExpExtDirectives, $MkExpExtZap; > $c = substr($p, 0, strpos($p, " ")); > $p = substr($p, strpos($p, " ")); > $pmlist = explode(",", $MkExpExtDirectives); > if (in_array($c, $pmlist)) return stripslashes("(:$c $p:)"); > if ((substr($c, 0, 3) == 'zap') && ($MkExpExtZap == true)) return > stripslashes("(:$c $p:)"); > return ''; > } > > SDV($MkExpExtDirectives, > 'table,tableend,cell,cellnr,include,if,pagelist,input,messages,redirect,title'); > SDV($MkExpExtZap, false); > > Perplexing... This is supposed to work for {(wiki pagelist group=Test)}, changing it to (:pagelist group=Test:). Also any thoughts Pm on escaping this on the word pagelist when it saves as you mentioned earlier? Cheers, Dan _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users