Hi everybody,
as I wasn't too happy with my first solution (it was just not generic enough :-) ), I spend some more time on it and would like to know your opinion.
Here is the new approach:
There will be two new variables that you can set in your _configuration.inc:
// Define column name which will be used to automatically set the last modification timestamp.
// The framework will automatically use that column, when it is available. If it is not available
// in a table, it will be ignored.
define('MAGIC_COLUMN_NAME_MODIFICATION_DATE','modification_date');
// Like MAGIC_COLUMN_NAME_MODIFICATION_DATE, only that this timestamp will be set on creation of
// a new record.
define('MAGIC_COLUMN_NAME_CREATION_DATE','creation_date');
The new object_save.tpl template will then pick up this information and generate the code for filling these columns if they are defined.
I think this way it's much easier. If you want I can upload the script as a new version.
Best regards,
A.L.