On Wed, May 30, 2007 at 12:08:54PM -0300, Guillermo Calderon - INCO wrote: > The Editor wrote: > > I have a condition in my skin php I'd like to change to a specific group. ie > > > > from: if (CondAuth($pagename, 'edit') == true) ... > > > > to: if (in_group @editors = true) ... > > > > Can anyone suggest the code for this? > > > > Cheers > > Dan > > I have this code in my config.php: > > $Conditions['grp'] = '$GLOBALS["AuthList"]["@".$condparm] == 1'; > > So, I can write something like: > > (:if grp editors:) .....
Better would be to test for '> 0' instead of '== 1'. (Yes, there have been times when $AuthList has values other than 1, although I don't know if that's currently the case.) I think I would go with: $Conditions['authgroup'] = '$GLOBALS["AuthList'][$condparm] > 0'; and then an author can write: (:if authgroup @editors:) and even (:if authgroup id:alice :) The next step, of course, would be to have a way to specify multiple values, as in: (:if authgroup @editors,@authors,id:alice :) Pm _______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel