[pmwiki-users] Data storage project

The Editor editor at fast.st
Thu Jul 27 11:15:52 CDT 2006


> Is there any chance that you could give a precise overview of what you
> are trying to achieve?
>
> It might help too if you kept it to one thread ;-)
>
> --
> Best,
> Marc

Sure!  Happy to do whatever I can to get help with this project.

My basic goal is to take data from a form and store it on a wiki page
in such a format it is searchable, editable, etc., and then make that
data available elsewhere as page variables.

Buildforms is close to this, but it stores the data in separate
Group.Name.Val pages without any PmWiki footers or headers.  And it is
not indexed (I'm guessing) so the data is not searchable or editable.

I rewrote the recipe to save data to Group.Name-Val and added headers
and footers so the data is stored in a page that looks just like a
regular PmWiki page.  But as I couldn't find the PmWiki function to
create the page, I used fwrite() instead--leaving it unindexed and
thus unsearchable (though perfectly viewable).

Furthermore, in BuildForms, it uses actual line breaks in
Group.Name.Val to separate Field:Value pairs.  I had to replace that
with %0a&0a as a line break indicates the end of the page's content in
PmWiki.

To accomplish my goals, as I see it, I need to find a way to manually
index the new page so it becomes searchable.  And second rewrite the
"read values" function so it uses %0a%0a for its delimiter rather than
a hard line break.

I don't know if there is a better way to accomplish my objective
(though I've been looking for weeks), or if there will be other
problems down the road with this approach, but if it works, it would
allow for some awesome possibilities:

* Member Preferences, editable, searchable, updatable by form, and
useable in conditionals anywhere in the wiki.
* Shopping Carts, where each user can have their own order form.
* Educational tracking programs where you can score quizzes/tests/etc
and unlock features based on their progress--preserved between visits.
* A new way of doing PITS--type tracking, allows multiple forms to
display different data for different users.
etc., etc., etc.

In fact these things become quite simple.  And many other potential
applications immediately come to mind.  What I'm really doing is
replicating Session variable capabilities (plus a bit more) right
within the wiki so a non programmer like me can do about anything he
wants without having to directly access php.

If anyone can help or have additional questions/suggestions, let me
know.  I feel like I'm getting close, though I may not have done
things the very best way.

So again, anyone know how to force indexing of a given page?  And how
to rewrite the buildforms read values function so it uses the
delimiter I want?

Cheers,
Caveman




More information about the pmwiki-users mailing list