Many MiniVend functions can be controlled or specified with [tag ...][/tag]
pairs.
Named syntax:
[tag op=operation arg="arg1 arg2 ..."]other[/tag]
[loop-code]
. This will return the key and field name
for every record in the products database:
[tag each products][loop-code] [loop-field name]<BR>[/tag]
n
, if specified, will select export in one of the enumerated MiniVend export
formats. The following tag will export the products database to
products.txt (or whatever you have defined its source file as), in the
format specified by the
Database directive:
[tag export products][/tag]
Same thing, except to the file products/new_products.txt:
[tag export products products/newproducts.txt][/tag]
Same thing, except the export is done with a PIPE delimiter:
[tag export products products/newproducts.txt 5][/tag]
The file is relative to the catalog directory, and only may be an absolute
path name if NoAbsolute is set to No
.
The following enables writes on the products and sizes
databases held in MiniVend internal
DBM format:
[tag flag write]products sizes[/tag]
SQL databases are always writable if allowed by the SQL database itself -- in-memory databases will never be written.
The [tag flag build][/tag]
combination forces static build of a page, even if dynamic elements are
contained. Similarly, the [tag flag cache][/tag]
forces search or page caching (not usually wise).
[tag log logs/transactions.txt] [item_list][item-code] [item-description] [/item_list][/tag]
The file is relative to the catalog directory, and only may be an absolute
path name if NoAbsolute is set to No
.
description_string
used as the Content-Description. For example
[tag mime My Plain Text]Your message here.[/tag]
will return
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: [sequential, lead as in mime boundary] Content-Description: My Plain Text Your message here.
When used in concert with [tag mime boundary]<CODE></CODE>, [tag mime header]
, and
[tag mime id]
, allows
MIME attachments to be included -- typically with
PGP-encrypted credit card numbers. See the demo page ord/report.html for an
example.
[tag scan/sf=category]Renaissance[/tag] [page scan sf=category/se=Renaissance]Renaissance[/page]
Where it is useful is in adding long strings that would otherwise be difficult to encode, like
[tag scan/sf=author/os=yes]John F. Kennedy[/tag]
instead of:
[page scan sf=author/se=John%20F.%20Kennedy]John F. Kennedy[/page]
&
#lt; and &
#91; respectively.
[tag show_tags][value whatever][/tag]
[tag time]%A, %B %d, %Y[/tag]
tag_data()
routine in
user-defined subroutines. If this is not done, the routine will error out
if the database has not previously been accessed on the page.
[tag touch products][/tag]