[pmwiki-users] Re: Group() (Was: variables for customization)
chr at home.se
chr at home.se
Fri Jul 8 01:52:54 CDT 2005
On Thu, 7 Jul 2005, Patrick R. Michaud wrote:
> On Fri, Jul 08, 2005 at 12:17:38AM +0200, chr at home.se wrote:
> >
> > Hmm... what's the result of a grep for 'FmtPageName' of the recipes?
>
> Well, FmtPageName gets used a lot -- it's really core to doing anything
> in PmWiki. As far as how many recipes use FmtPageName to get the
> group name, I did a grep on all of the .php scripts (this doesn't
> check scripts in tar/zip files):
>
> cmslike.php
> extendmarkup.php
> rename.php
> search.php
> search2.php
> usemod.php
> wikiform.php
> wikilog.php
>
> That's out of 125 php scripts in PmWiki's Cookbook directory.
That's less often than I expected FmtPageName() to be used to get the
group name. Guess the frequent place where I've been using it is in
config.php rather than scripts then. (Unfortunately we can't just grep
everbodys configs:-)
Anyway, the reason I asked for a grep was really more to see what *other*
ways people use FmtPageName, i.e. if there's something that's very common
to use FmtPageName to extract - such as $FullName.
Either way, I'd be happy with having Group() as a quick'n'easy way of
getting the group name.
/Christian
PS. The OO-advocates might like $pagename bo be a class object with a
method for returning the group :-)
--
Christian Ridderström, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list