![]() |
|
V1.4.6: Where does it read and save IPTC information? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: V1.4.6: Where does it read and save IPTC information? (/thread-11864.html) |
V1.4.6: Where does it read and save IPTC information? - MarkRH - 2014-07-05 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 Thanks, V1.4.6: Where does it read and save IPTC information? - MarkRH - 2014-07-05 I found it. It's in \zp-core\class-image.php. Now I can do what I want. Actually, just needed to 1 line of code to convert newlines to HTML breaks:
V1.4.6: Where does it read and save IPTC information? - acrylian - 2014-07-06 It is not recommended to hack the core as you have to re-apply your change to every update. Better would be to open a feature suggestion ticket maybe. The meta data is saved on each row on the "images" table btw. V1.4.6: Where does it read and save IPTC information? - MarkRH - 2014-07-06 Oh I know it's not recommended and why I always comment what I've done so I can do a global search on the files to see what I've modified when an update is available. (I back everything up prior to any kind of core updates.) I prefer not doing it but sometimes I have to. I've been doing it with the Gallery 3 and WordPress code and their plug-ins for some time. 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 V1.4.6: Where does it read and save IPTC information? - acrylian - 2014-07-06 Sure, I just wanted to mention it. The line break conversion we probably wil add as an option anyway. |