Hello,
When working with templates, it could be useful to change the "Last modified by" property (core.xml, dc:LastModifiedBy). This field contains the name of the "real" author in the company, which should be kept hidden for automatically generated documents spent all over the world.
I made a quick fix to implement this:
In CreateProperties.inc creator:
- append 'lastModifiedBy' in $generalProperties array
- append 'lastModifiedBy'=>'dc' in $nameSpaces array
public function CreateProperties()
{
$generalProperties = array('lastModifiedBy','title', 'subject', 'creator', 'keywords', 'description', 'category', 'contentStatus', 'created', 'modified');
$nameSpaces = array('lastModifiedBy'=>'dc','title' => 'dc', 'subject' => 'dc', 'creator' => 'dc', 'keywords' => 'cp', 'description' => 'dc', 'category' => 'cp', 'contentStatus' => 'cp', 'created' => 'dcterms', 'modified' => 'dcterms');
...
In CreateDocx.inc, function addProperties(), also add the lastModifiedBy field in self::$propsCore:
if (!empty($values['lastModifiedBy']) || !empty($values['title']) || !empty($values['subject']) || !empty($values['creator']) || !empty($values['keywords']) || !empty($values['description']) || !empty($values['category']) || !empty($values['contentStatus']) || !empty($values['created']) || !empty($values['modified'])) {
self::$propsCore = $prop->createProperties($values, self::$propsCore);
}
Best regards,