[pmwiki-users] GroupHeaders and GroupFooters

Patrick R. Michaud pmichaud at pobox.com
Mon Nov 6 16:14:01 CST 2006


Chris Cox writes:
> Patrick R. Michaud wrote:
> > On Mon, Nov 06, 2006 at 10:50:35AM +0100, Florian Fischer wrote:
> >> i have a short on how to limit access to groupheaders and 
> >> groupfooters to admins. Is it possible to generally disallow 
> >> normal user with edit rights for a group to edit these pages? 
> >> Or do i have to set explicitly edit pw on every page?
> > 
> > If you simply want to eliminate groupheaders and groupfooters
> > altogether (so that GroupHeader/GroupFooter are not automatically
> > included in a page's display), that can be done by setting the
> > following in local/config.php:
> > 
> >     $GroupHeaderFmt = '';
> >     $GroupFooterFmt = '';
> 
> How about something like this in config.php:
> 
> $GroupHeaderFmt = '(:include MyHeaders.{$Group}
> basepage={*$FullName}:)(:nl:)' . $GroupHeaderFmt;
> 
> (I could be a bit off on the syntax... Pm, could
> you take a look?)

Oooh, what a great idea!  Here's another version:

    $GroupHeaderFmt = 
      '(:include Site.{$Group}-Header self=0 basepage={$*FullName}:)(:nl:)';
    $GroupFooterFmt = 
      '(:include Site.{$Group}-Footer self=0 basepage={$*FullName}:)(:nl:)';

This puts all of the GroupHeader and GroupFooter pages into the Site
group, where they are password protected by the Site password.
Then one would create groupheader and groupfooter pages with:

    Site.MyGroup-Header        (groupheader for MyGroup)
    Site.AnotherGroup-Footer   (groupfooter for AnotherGroup)

Of course, any group can be used for this -- Site is just an obvious
place for it.

Thanks!

Pm




More information about the pmwiki-users mailing list