"S.A. de Heer" <[EMAIL PROTECTED]> wrote:
> I would like to add a timstamp to my news item. So i added the necessary stuff
> to my news.xml and let mmbase create the tables in the database. It created a
> bigint(20) but when i add a newsmessage there is no timestamp added to the
> database. Do i have to fill this field by hand. If which format? The examples
> don't provide much info about this type of field syncnodes.xml and message.xml
> are the only builders with a timestamp. Any help would be nice.
Something like this must appear in your news.xml:
<field>
<!-- gui related -->
<gui>
<guiname xml:lang="fr">Date</guiname>
<guiname xml:lang="nl">Datum</guiname>
<guiname xml:lang="en">Date</guiname>
<guiname xml:lang="eo">Dato</guiname>
<guitype>eventtime</guitype>
</gui>
<!-- editor related -->
<editor>
<positions>
<!-- position in the input area of the editor -->
<input>5</input>
<!-- position in list area of the editor -->
<list>5</list>
<!-- position in search area of the editor -->
<search>5</search>
</positions>
</editor>
<!-- database related -->
<db>
<!-- name of the field in the database -->
<name>date</name>
<!-- MMBase datatype and demands on it -->
<type state="persistent" notnull="false" key="false">INTEGER</type>
</db>
</field>
The essential part is <guitype>eventtype</guitype> which will make all
kind of MMBase functions (like editors) understand that this integer
is not merely an integet, but a time.
MMBase considers 'a time' the number of seconds (not millisecond) since 1970
Michiel
--
Michiel Meeuwissen
Mediapark, C 107 tel. +31 (0)35 6772979