[pmwiki-users] Re: Problem with URLapprove

chr at home.se chr at home.se
Mon Jun 13 15:28:13 CDT 2005


On Mon, 13 Jun 2005 chr at home.se wrote:

> Hi Patrick
> 
> I've got a problem with urlapprove that I'm currently debugging.

After some more testing, the problem is probably that my configuration is 
a bit too advanced...

I'm aiming for a wiki farm with a shared field, where this field should
contain the list of approved URL's. However, having looked at the source
for urlapprove, I'm not sure how to achieve this without rewriting parts
of it. As I understand it, $ApprovedUrlPageFmt[0] specifies the name of 
the page of where to whitelist URIs. Without being able to somehow specify 
that the page belongs in a different field, I'm stuck. One possible way to 
do that could be to allow page names of the format:

	someField:Site.ApprovedURLs

where 'someField' would be the name of the field. However, I dobut it'd be
this easy. Another possible solution might be to modify the function
WritePage() so that pages in the group 'Site' are stored in a different
location.  Oh, oh... if I modify WritePage(), I'd also have to worry about
the locking mechanism, right?  Two fields might be writing to the same
shared page at once...  maybe this is hopless...

/Christian

PS. In case it's relevant, here's what I do to use a shared field for 
everything belonging to the group 'Site'. In $FarmD/local/farmconfig.php
	$WikiLibDirs = array(&$WikiDir,
	                     new PageStore("$FarmD/shared.d/\$FullName"),
	                     new PageStore('$FarmD/wikilib.d/$FullName'));

	// Force use of directory shared.d/ for edits to the group 'Site' 
	$group = FmtPageName('$Group', $pagename);
	if ($action == 'edit' && $group == 'Site')
	     $WikiDir = new PageStore("$FarmD/shared.d/\$FullName");
	}



-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list