[pmwiki-users] FAST Data 2.0 uploaded.

The Editor editor at fast.st
Thu Sep 21 19:57:34 CDT 2006

I haven't really done any work with Categories, but think you might be
able to add a feature like this fairly easy.  As I understand it, if
you put a link like [[!Tag]], a link to the page is added to the
Category.Tag page or something like that.

Assuming this is true, just set up a field amidst all the others in
the recipe, like the following (not tested).  PmWiki should clean up
the links a bit from extra spaces, etc.

if ($field == "CategoryList") {
      $v = explode($value, ",");
      foreach ($v as $vv) $vv = "[[!$vv]]";
      $_POST[$field] = implode($vv, " ");

Then set your text field to name CategoryList (or whatever) and then
save or log the input as desired.

The problem though, is that data is not stored on the actual pages but
on Data-Group.Name, so it won't add these to the page you want, unless
you either 1) revise the recipe to allow saving to any page (in such a
way you do not overwrite existing page content), or 2) import the
values into your page as {$CategoryList}, though I suspect this would
not create the proper category links.  Another option might be to
rewrite the Category Link format to return links to the BasePage if
they are a group that begins with Data. I need to set up something
similar for working with pagelists.

The recipe was not designed to edit existing pages, but to make data
storage and retrieval possible without a database.  Depending on your
exact situation, the recipe could be hijacked to accomplish other
purposes, as I deliberately tried to make it extensible and modular.
But you would have to change where and how it stores/retrieves page

For example, just a thought--by changing a few lines in the SetPage
function to include some database controls, you could probably store
all variables in a DataBase very easily, and do the same thing in the
GetPage function to retrieve them.  That would make FAST Data an
extremely versatile front-end for those wanting to use databases in
PmWiki.  Simultaneously allowing emailing, logging, random numbers,
creating/deleting pages, uploading pictures, running conditionals,
modifying field contents, and more--all on the fly.  While plugged
into a database.

I would be interested in adding a database option to FAST Data, which
could be as simple as (:input hidden SaveToDatabase
Field1,Field2,Field3:), if there was an interest in this.  And
probably a separate optional (:DataBase:) read markup--if someone
wanted to write it (I'd help with tips).  Not sure how much interest
there would be in this--I just know I don't like databases personally.
 And I'm still really stumped on the line break bug.  iiirrrrkkkkkk!

Anyway, hope this helps...


On 9/21/06, Crisses <crisses at kinhost.org> wrote:
> On Sep 21, 2006, at 3:58 PM, The Editor wrote:
> >
> > Feel free to post a question on the recipe page if you prefer.  But
> > I'll be cleaning up the FAST Data forum soon--and I still think that
> > will be a better place to organize the information.
> >
> > Cheers,
> > Caveman
> I'd like a snippet if available, or to request a feature, if possible.
> How can you use FAST Data in a form to have categories added to a page?
> If I use FASTData to create wiki pages, and ask the user to fill in
> the categories for the page in an input line on the form (comma
> separated), can this recipe help parse them into actual page
> categories that other recipes and pagelists will see?
> Thanks,
> Crisses

More information about the pmwiki-users mailing list