I am trying to find where in the code it reads and saves the IPTC information from an image during the upload process. I want to automatically convert line breaks in the description field to either `
` or format with `
` tags before it saves that information into the database so that I don't have to edit 100s of image descriptions before or after I upload them.
Thanks,
Mark H
Comments
`
/* iptc description */
$desc = $this->get('IPTCImageCaption');
if (!empty($desc)) {
// mrh add code to add line breaks.
$desc = nl2br($desc);
$this->setDesc($desc);
}
`
The meta data is saved on each row on the "images" table btw.
Anyway, I did at least make a duplicate of the Garland theme that I am working on. I had do to a global search and replace for "garland" to "mygarland"; otherwise, it was still using some files from the original theme's folder.
But, I'll go ahead and make that suggestion as it's straight forward and what most user's would expect to happen when IPTC descriptions are imported. Of course, then you have to worry about them having already added the `
` tags into the IPTC description..