[pmwiki-users] Preventing a script for a group
haganfox at users.sourceforge.net
Sat Jul 14 21:19:09 CDT 2007
On 7/14/07, Ian MacGregor <lists at imacgregor.com> wrote:
> I have a group called News in which I have pages for newsfeeds using pmfeed.
> [...] The problem I am having is that I
> don't know how to turn off url approvals for the News group.
> I tried this in config.php but it didn't work:
> if ($Group != 'News') include_once('scripts/urlapprove.php');
Almost! :-) Try this:
$pagename = ResolvePageName($pagename);
$group = PageVar($pagename, '$Group');
if ($group != 'News') include_once('scripts/urlapprove.php');
or this one-liner
if (! preg_match('/^News($|\\/|\\.)/', $pagename))
More information about the pmwiki-users