Nevermind, my (and your ;-) ) fault. The documentation has an error, it should be:
mm_default('unpub_date', 'return date("d-m-Y H:i:s", time()+(60*60*24*28));', '', '4', true); // Automatically set the unpublish date to be four weeks in the future for documents with a template ID of "4"
instead of
mm_default('unpub_date', 'return date("d-m-Y H:i:s", now()+(60*60*24*28);', '', '4', true); // Automatically set the unpublish date to be four weeks in the future for documents with a template ID of "4"
edit: But unfortunately I can`t set a default value for a TV:
mm_default(’newsdatum’, ’return date("d-m-Y H:i:s", time()+(60*60*24*28));’, ’’, ’’, true); // Automatically set the unpublish date to be four weeks in the future for documents with a template ID of "4"
doesn`t work, while
mm_default(’pub_date’, ’return date("d-m-Y H:i:s", time()+(60*60*24*28));’, ’’, ’’, true); // Automatically set the unpublish date to be four weeks in the future for documents with a template ID of "4"
does.
Any idea? Okay, read again, this feature is only provided for the standard fields.