[pmwiki-users] (:dataset:) directive/concept

Martin Fick fick at fgm.com
Mon Nov 28 10:35:48 CST 2005

> What's missing is the ability to associate titles, descriptions, and 
> keywords with pictures, and I don't see that being handled in the 
> automated way I would like with the existing recipes in the cookbook 
> section.
> So in other words I need a simple, small-scale, text database with which 
> I can associate picture attributes (titles etc) through the picture 
> name. I also need for the authors to be able to update this database 
> fairly readily.

  If you embedd each picture in its own page in a common
picture group (I use 'Photos'), that page can become the
'DB' for that picture.   All you need is to chose a standard
way to define your fields.

> I'm thinking that most of the pieces are available in the PmWiki 
> environment to solve this problem: php image generation, the PmWiki 
> directive engine, your new Input Forms. But the piece I don't see is the 
> repository for the simple text database. And I wondered if you could 
> give me some strategic direction for that.
> I was thinking, for example, about a (:dataset name=DataSetName 
> fields=FieldA, FieldB, FieldC=image, FieldD, FieldE=wikipage key=FieldA 
> actions=insert,edit,delete displaymode=table:) directive which would be 
> analagous to the (:table:) directives, inasmuch as it would have nested 
> parts, something like:
> (:dataset ... :)
> (:fieldset:)
> (:field FieldA:)
> (:field FieldB:)
> ...
> (:fieldset:)
> ...
> (:datasetend:)
> Something like that.

  You can use anchors to delineate your sections, this will
make it  possible to include any field into any wiki page. 
This might look instead like this:


> I envision that such a structure could have fieldset additions inserted 
> by script, so that I could generate an automatic inventory with blank 
> fieldsets for newly uploaded images, and I might even be able to write a 
> popup entry form per fieldset, with some Javascript (is this a no-no in 
> PmWikiLand?) to close the popup and refresh the underlying browser list 
> for the user.

  Look into the AddDeleteLine recipe, it is a good start for
this.  I plan to use it for the same thing.

  I do a lot of what you want already on my site, but there
are many pieces that I have not yet completed, it is a work
in progress.  You can check it out if you'd like (it's
nothing impressive) and I will gladly answer questions about
how I implemented specific pieces if you'd like.  I do have
a HowTo section which describes some of the workflow that I
have built behind the scenes for my wife to load pictures
and create albums with.  She still finds it difficult
though. :(

  The main site is www.theficks.name.  There are several
albums which are a combinations of trails and pagelists and
some custom tags for photos and thumbnails and putting
things in columns.  I tried to use/create generic recipes
when extra functinonality was needed keeping my local
customizations small, (but still sometimes very critical to
the  infrastructure.)  

  The area which needs the most work are the categories.  I
am still working on a convenient way to add categories in
bulk to many pages at once without editing each one
manually.  That is one area where I plan to improve the
AddDeleteLine recipe so I can do this easily.

  For an example illustrating some of the data field ideas
(with descirptions) check out the Carrera section.


More information about the pmwiki-users mailing list