[pmwiki-users] Text variables & ZAP...

Patrick R. Michaud pmichaud at pobox.com
Thu Oct 12 15:58:19 CDT 2006


On Thu, Oct 12, 2006 at 01:09:25PM -0400, The Editor wrote:
> part 1:  Getting text variables to work with current ZAP format
> [...]
> The data pages store info as:
> field="value"
> 
> I have this line in my config.php file:
> $PDataPattern[] = '/^(\\w+)="(.*?)"/m';

It's $PageTextVarPatterns[], not $PDataPattern.

> Also, can you just set the pattern in local config files for the
> actual pages calling the pagelist?

Yes.

> As noted above the old format saves it as field="value".  Which might
> be an advantage, in that users CAN'T extract text variables if you
> don't let them (by setting the PDataPattern).
> 
> (ie {Profiles.AdminName$:Password}...
> 
> Just the same, I would like to be able to use a better formatting,
> such as  field: value.  I can get the data to save fine but not sure
> how to do the reading both ways.  

Easiest would be to use the same sort of code that PmWiki does to 
read them -- see the PageTextVar() function for the way that PmWiki 
manages the parse.

Pm




More information about the pmwiki-users mailing list