[pmwiki-users] pagelists link= with pages generated externally
Patrick R. Michaud
pmichaud at pobox.com
Thu May 24 11:47:19 CDT 2007
On Thu, May 24, 2007 at 06:16:05PM +0200, Christophe David wrote:
> While you are at it, I have one more suggestion for this new recipe:
>
> SDV('ImportFilesPattern', '.*'), and a check when importing that this
> pattern is met.
>
> This would allow things like $ImportFilesPattern =
> '^(Alice|Bob|Charlie)\..*' to restrict imports to these groups.
This already exists in import.php, as $ImportFilePattern (no 's').
So, to restrict importing to the Alice, Bob, and Charlie groups, use:
$ImportFilePattern = "^((Alice|Bob|Charlie)\.$NamePattern)$";
The outer parens are needed so that ImportText knows what
part of the filename to use as the page name. The default
setting in import.php is:
SDV($ImportFilePattern, "^($GroupPattern\.$NamePattern)(\.txt)?$");
This accepts any valid pagename, followed by an optional ".txt"
extension.
Pm
More information about the pmwiki-users
mailing list