Cookbook /
WikiDB
This will be a very very simple database for wiki pages. It has these goals:
- Easy to add "records" to the database via a form interface.
- Easy to edit forms, either with the form interface, or by hand in the wiki page.
- Templatable header, footer and body.
- Sortable records.
- Paginated output.
The WikiDB is not related to the new SQLite class (which is a database for storing the whole pages and their history).
The WikiDB can be used for:
- Any kind of tables of data.
- An online wiki guestbook.
- Some other structured wiki content (repeated data and formatting).
Proposed markup (for an example guestbook):
(:wikidb template=#HERE perpage=20 columns="bHidden iDate Author Message Reply" order=-iDate if="bHidden=0" editlink="[edit]":) # 0 # 20080201 # data 3 # new%0Aline here # end # 1 # 20080205 # [[Cookbook|links too]] # '''bold''' # end (:wikidbend:) [[#HERE]] Here will be the header (if needed) [[#HEREeach]] Each record of the database will be looped through this section. >>class=authorstamp<< {(ftime {#iDate})} - {#Author} {#_editlink} >>class=message<< {#Message} >>class=reply<< {#Reply} >><< [[#HEREfoot]] Here some footer (if needed) [[#HEREform]] And the add/edit form [[#HERE]] |
(:wikidb template=#HERE perpage=20 columns="bHidden iDate Author Message Reply" order=-iDate if="bHidden=0" editlink="[edit]":)
(:wikidbend:) Here will be the header (if needed) Each record of the database will be looped through this section. {#Reply} |
To be continued...