This snippet shows two things:
1. if a document has not been edited it shows the created date
2. if the document has been edited it shows the edited date
you can go through and modify the $update_pre, $update_suf, and the $update_text, pretty simple setup...
/*
last_updated
last edit: 7/26/06 3:52 pm est
Usage: [!last_updated?dateFormat=%B %e, %Y!]
Returns date formatted: July 13, 2005
See strftime() documentation for additional formatting options
*/
// Default Date/Time format to use if not sent in snippet call
$format = isset($dateFormat) ? $dateFormat : "%B %e, %Y";
// added a message to show
$update_pre ="<span class='smtxtblue'>This document was ";
$update_suf ="</span>";
$page_id =$modx->documentObject['id'];
$doc_created = $modx->documentObject['createdon'];
$doc_edited = $modx->documentObject['editedon'];
if($doc_edited =="0"){
$update_date = strftime($format,$doc_created);
$update_text = "created on ";
}else{
$update_date = strftime($format,$doc_edited);
$update_text = "modified on ";
}
$output = "$update_pre $update_text $update_date $update_suf";
return $output;