![]() |
|
IPTC "plugin" - 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: IPTC "plugin" (/thread-676.html) Pages:
1
2
|
IPTC "plugin" - jimhere - 15-07-2006 I found Thinkdream's EXIF gizmo (inhis theme and posted on this forum). Has anyone yet found a similar way to display IPTC info? I found a thing for folderblog (http://elwing.byethost.com/journal/?page_id=25) and a similar one for PixelPost. But I like ZenPhoto's albums and FTP-ability, so it'd be great if anyone figured it out here... IPTC "plugin" - thinkdreams - 18-07-2006 Jimhere- Here's what I had working, you might be able to make something of it: // IPTC Data Information for EXIF Display function output_iptc_data( $image_path ) {
$size = getimagesize ( $image_path, $info); IPTC "plugin" - thinkdreams - 18-07-2006 In retrospect, it doesn't really do a whole lot, but it does display IPTC data. IPTC "plugin" - jimhere - 18-07-2006 Thanks. Would I paste this into a new "iptc.inc.php" doc in your theme? I see you put Also, I'd probably delete most of the IPTC tags since I'm only intererested in Keywords, Locations, and Captions. It surprises me that all these PhotoBlog apps are focused on the gear (exif) rather than content (iptc). IPTC "plugin" - thinkdreams - 18-07-2006 put the whole output_iptc_data function (including the array) into your functions.php file. you then need to call it from somewhere in your image.php file, and pass it the image information. i would guess that exif is much more beneficial to most users, as the IPTC assumes the user is outputting information from an image editor, rather than EXIF which is directly from a camera. Most people aren't willing to take the time to edit the IPTC tags unless they are graphic designers or artists. The EXIF tags in most cases (provided you have a compatible camera) are always there. IPTC "plugin" - dspnorman - 26-07-2007 IPTC support is actually a critical feature from my perspective: I have a large number of images with IPTC caption data, and the prospect of re-entering that information manually is daunting. Eventually, I'd like to see title and description read into the DB automatically when a photo is uploaded, but until then, some kind of template functions to selectively display IPTC fields would do the trick. Any further developments with this code, thinkdreams? It looks like it just loops through all available IPTC data. Is there any way to tell it to print only certain fields? IPTC "plugin" - thinkdreams - 26-07-2007 Nope. I really abandoned that code direction when Tris started moving toward his own EXIF library direction. The EXIF library that is in the code now I don't think has any IPTC functionality, which means a separate IPTC library might be the way to go. IPTC "plugin" - dspnorman - 26-07-2007 Cool, I'll see if I can hack your code into an interim solution for now. I don't have the php savvy to implement a whole new external library. IPTC "plugin" - dspnorman - 26-07-2007 @thinkdreams, do you recall what needs to be passed to Thanks. IPTC "plugin" - thinkdreams - 27-07-2007 @dspnorman- One thing you might want to look at, not trying to add yet another library for consideration, is: http://www.ozhiker.com/electronics/pjmt/ It's one I looked at a while back, and does lots of different metadata formats. Might be just the ticket for you to add IPTC capability. To answer your other question, you can try IPTC "plugin" - thinkdreams - 27-07-2007 Note also that in the IPTC function I mentioned above in the very beginning of this post, it uses a built-in PHP library (not an external library) to handle IPTC tags. Thus, this would assume that people who use it have the library compiled in their PHP setup, which is why it was decided to go with an external library for EXIF. So eventually, you'd want to look at an external library. IPTC "plugin" - dspnorman - 27-07-2007 Thanks thinkdreams. That library appears to be offline for the time being... It looks like my host doesn't have the IPTC module compiled. When I run your code, I get: `Warning: array_keys() [function.array-keys]: The first argument should be an array in /full/path/zentest/trunk/zen/exif/makers/iptc.php on line 67 Warning: Invalid argument supplied for foreach() in /full/path/zentest/trunk/zen/exif/makers/iptc.php on line 67` I've contacted them to see if they'll compile it for me. IPTC "plugin" - dspnorman - 27-07-2007 Update: IPTC support was working, but my test image had no data. Oops! I've got the script working now in a very rudimentary form, will post when I work out a method for extracting desired data for display. IPTC "plugin" - dspnorman - 01-08-2007 Alright, I've got a decent function to display IPTC title and description info. If the image doesn't have IPTC tags, the script falls back on zen template functions to display title and description from the database. Get the code here: Ticket #100 Thanks to thinkdreams for doing the initial research and building the array to index IPTC tag names. The functions are pretty tailored for displaying IPTC data, but if someone wants to tear this up and see if they can read IPTC title/description during upload, and write it to the database, that would be the logical next step. For now, though, this should work well enough for those of you who use IPTC on the desktop and don't want to re-enter the info in zenphoto. IPTC "plugin" - dspnorman - 02-08-2007 Should have mentioned, I wrote and tested this on the current SVN code, but see no reason it should not also work with the current 1.0.8.2 release. The IPTC is actually parsed by a native PHP library, and there's no reliance on any of the newer EXIF support in zenphoto. Really, it's a bare bones hack. IPTC "plugin" - trisweb - 02-08-2007 Is there a reason you didn't use the existing EXIF/IPTC library already in SVN? AFAIK it works quite well for IPTC data as well as EXIF.... IPTC "plugin" - thinkdreams - 02-08-2007 tris- I wasn't aware the IPTC parsing capability was available in the svn exif code, i'll have to investigate that further. That would be really cool. IPTC "plugin" - dspnorman - 02-08-2007 Likewise, I didn't know the library supported IPTC. I'm under no illusion that this anything but a hack -- if there's a better way of implementing IPTC display, I'll investigate. IPTC "plugin" - thinkdreams - 02-08-2007 @ds- i'll be taking a peek too. we'll compare notes and see if we can come up with a way to integrate it into the exifixer libs in the SVN. IPTC "plugin" - dspnorman - 02-08-2007 Well, so far I've found some mentions of IPTC in Exifer, but haven't found an easy way to pull IPTC data. All the existing functions seem to deal with a pretty specific set of EXIF tags defined in an array. |