[Pmwiki-users] selecting "hierarchical" customization
Robert P. J. Day
rpjday
Sun Oct 17 08:43:56 CDT 2004
ok, now that i've clued in and am working with the latest version of
pmwiki, most of my quibbles have gone away except for one -- per-group
and per-page customization, which i still think has the potential for
confusion.
if you look at scripts/stdconfig.php:
if (IsEnabled($EnablePerGroupCust,1))
include_once("$FarmD/scripts/pgcust.php");
it's clear that the variable and the file name *scream* that this is
for per-group customization. however, if you look at pgcust.php, the
comment makes it clear that it's for *both* per-page and per-group,
which is not at all obvious until now:
/* ... This script enables per-page and per-group customizations in
the local/ subdirectory... */
and, not being an expert at PHP, i'm assuming that the loop:
for($p=$pagename;$p;$p=preg_replace('/\\.*[^.]*$/','',$p)) {
if (file_exists("local/$p.php")) {
include_once("local/$p.php");
return;
}
}
allows for more than just two levels of hierarchy. so, if that's the
case, why not just get rid of the variable $EnablePerGroupCust, and
replace it with $EnableHierCust -- "enable hierarchical
customization", which will be equally valid regardless of how many
levels of group are some day supported?
rday
More information about the pmwiki-users
mailing list