[pmwiki-users] Group name variables
H. Fox
haganfox at users.sourceforge.net
Sat Jan 28 18:32:41 CST 2006
On 1/28/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Sat, Jan 28, 2006 at 02:35:32PM -0700, H. Fox wrote:
> > On 1/28/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > > It became "ResolvePageName()" instead -- it's more descriptive
> > > of what is happening.
> >
> > It is. How does one acquire the group name, then? (Will it be the
> > same for config.php and skin.php?) The following doesn't seem to work.
> >
> > $pagename = ResolvePageName($pagename);
> > $group = PageVar($pagename, '{$Group}');
>
> In skin.php it's not necessary to call ResolvePageName, as the
> pagename is already "resolved".
>
> > Out of curiosity, why isn't ResolvePageName()'s job already done ahead
> > of config.php in the cascade?
>
> PmWiki can't know how to resolve $pagename until after config.php
> is done. In particular, the admin could choose to set custom
> values for $DefaultGroup, $DefaultName, $DefaultPage, or $PagePathFmt,
> all of which affect the resolution of $pagename.
Oh, that makes sense. Thanks.
The question still remains though: How How does one acquire the group
name in config.php?
The following config.php, in beta21, does *not* stop the script.
<?php if (!defined('PmWiki')) exit();
$pagename = ResolvePageName($pagename);
$group = PageVar($pagename, '{$Group}');
if ($group) exit;
Hagan
More information about the pmwiki-users
mailing list