[pmwiki-users] Data storage project

The Editor editor at fast.st
Sat Jul 29 22:12:30 CDT 2006


Hi all,

After many hours getting the buildforms recipe virtually working as
per my needs, I ran into a small problem and a couple functional
limitations that began to frustrate me. But I learned bunches!  So,
for some crazy reason, I decided to try and write the recipe myself
from scratch, just the way I want.  And it is 99% working perfectly...
 Unbelievable!  It's only 10% the length of buildforms, uses standard
wiki forms markup and is far more flexible.  Looking forward to
releasing it VERY much!

Anyway, the one problem I can't seem to get past is setting the
various page variables used in retrieving the data. I have this little
section of code in a function that "returns" exactly what I want in
the page when uncommented (so the problem is not in the variables) but
won't create any page variables.

	foreach ($db as $df) {
		$dv = explode ("=", $df);
			$field = $dv[0];
			$value = $dv[1];
//		return "$field + $value";
		$FmtPV['$field'] = '$value';	
		}

Taking a hint from PageVariableExtensions, I also tried

		$FmtPV["\${$field}"] = "\$value";

Any suggestions on how to fix the $FmtPV line?  Also, to get these
page variables set as early as possible, I have tried setting the
markup as 'directive' and '<{$var}'.  Is either correct?  And do I
need to declare them globally or something?  Help...

Cheers,
Caveman



On 7/28/06, The Editor <editor at fast.st> wrote:

> FAST Data functions:
>
> 1.  A standard form inputs data and stores it on a wiki page, using action=data.
> 2.  The wiki page is viewable, searchable, and manually editable like
> any other wiki page.
> 3.  The data storage pages can be read/edit protected if you only want
> administrators accessing them this way.
> 4.  You can repopulate a form to allow updating by the user.
> 5.  Any data value from any page (or multiple pages) can be retrieved into any other wiki
> page by a simple directive, as page variables for use in conditionals, redirects, etc.
> 6.  The page variables should be callable and useable in local config settings,
> to set user defined skins, or whatever...




More information about the pmwiki-users mailing list