[Pmwiki-users] $Group / $Name in local/-File?

Jonathan Scott Duff duff
Mon Nov 8 07:57:22 CST 2004


On Mon, Nov 08, 2004 at 10:12:21AM +0100, Thomas -Balu- Walter wrote:
> is it possible to use variables like $Group or $Name in the
> local/config.php oder local/Group.php?

The usual idiom is something like:

$group = FmtPageName('$Group', $pagename);
$name = FmtPageName('$Name', $pagename);

> This is to be able to disallow editing on all pages but the ones ending
> in "Suggestion" :-).

$EditSuffix = "Suggestion";
$name = FmtPageName('$Name',$pagename);
if ($action=='edit' && substr($name,-strlen($EditSuffix)) != $EditSuffix) {
   $action = 'browse';
}

-Scott
-- 
Jonathan Scott Duff
duff at pobox.com



More information about the pmwiki-users mailing list