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

Ryan R. Varick rvarick at gmail.com
Tue Jul 3 09:49:58 CDT 2007


Thanks, that works perfectly.  I added this information to
http://www.pmwiki.org/wiki/Cookbook/CustomRecentChanges

On 7/3/07, H. Fox <haganfox at users.sourceforge.net> wrote:
> 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