[pmwiki-users] Exclude changes for groups in config.php

H. Fox haganfox at users.sourceforge.net
Mon Jul 2 23:29:43 CDT 2007


On 7/2/07, Ryan R. Varick <rvarick at gmail.com> wrote:
> I know the traditional way to exclude changes for certain groups from
> the AllRecentChanges file is to set:
>
> unset ($RecentChangesFmt['$SiteGroup.AllRecentChanges']);
>
> In the appropriate Group.php file; however, I would like to
> consolidate all my "security" related customizations into config.php.
> [...]

You can do local customizations in config.php .

First, you need to make sure the page name is resolved and optionally
you can set variables to hold the group and/or page name(s).

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

Now you can do customization for a group...

   if ($group == 'SpecialGroup')
     unset ($RecentChangesFmt['$SiteGroup.AllRecentChanges']);

or for a page name (that is, a page with a certain name that may exist
in any group)...

  if ($name == 'Test')
     unset ($RecentChangesFmt['$SiteGroup.AllRecentChanges']);

or for a specific Group.Page .

   if ($pagename == 'Main.WikiSandbox')
     unset ($RecentChangesFmt['$SiteGroup.AllRecentChanges']);

Hagan



More information about the pmwiki-users mailing list