MobileMe Gallery


Jump to MobileMe Gallery

|
WP Plugin: Display Exif

looks like this

•Description

This plugin instantly adds photo’s exif data window on its image. The window will open/close by clicking the image. You have nothing to modify your entries to add this feature!

•Requirements

WordPress 2.5 environment
*Tested with IE7/8, FireFox, Safari. This plugin is not compatible with IE6.

•Install

Place files into your /wp-content/plugins/ directory and activate through the administration panel.

•Settings

This plugin does not have any option panel.
At version 0.0.4, I added preference panel to turn on/of displaying items. Also, there’s master switch to check validation of exif data for some cameras which will not export focus length data such as Leica.

•CSS

This plugin adds some ids on your entry. If you want, you can modify your CSS to change style.

class: display_exif_outer
Out most rectangle of exif window.

class: display_exif_title
Each title’s rectangle.

class: display_exif_value
Each value’s rectangle.

class: display_exif_img_outer
Image container’s rectangle.

•Usage

This plugin checks following attributes on IMG tags.

<img src="http://www.example.com/wp-content/uploads/2009/08/sample.jpg" alt="" title="" width="490" height="380" class="alignnone size-full wp-image-12345" />

width="490"
The plugin checks this value to decide width of exif window so do not remove.

class="alignnone size-full wp-image-12345"
The plugin uses those class-names for exif window (especially the last one). If you remove them from your entry, the exif window will not open (plugin cannot find the window).

•Note

According to WordPress’s specification, if you write IMG tag, please insert more than one returns at end of tag line. Otherwise WordPress does not add P tag at beginning of following sentences. If you write next sentences without returns, maybe font size changes to default size.

This is photo’s exif thing so it is rare case to put the same image at the same page, but in that case, the media library automatically adds the same class name on each images. This plugin checks its class name to separate exif window so if you do so, the plugin will confuse. If you want to put the same image more than two places, add some character at end of its class name.
e.g.: wp-image-12345 => wp-image-12345B

This plugin filters following standard functions.

the_content

Therefore if your theme file does not support this function to display entry, the plugin will not modify your IMG tags.

•Trouble Shoot

This pulgin checks exif data instantly so if your photo’s exif matches following condition, plugin will automatically skip displaying exif window.

•Focus Length is over 3000mm
•Focus Length is less than zero

If your camera did not export focus length data to exif, it is not possible to display exif data, but by modifying one line, you can display exif data without focus length;

original code is:
if( $exif && $div_id && $exif[ 'FocalLength' ] < 3000 && $exif[ 'FocalLength' ] > 0 ) {

to change like this:
if( $exif && $div_id ) {

*If exif data was broken, this plugin does not show anything.

•Download

via WordPress.org

•Versions

* Aug 29 2009 – v0.0.1
- Initial release
* Aug 30 2009 – v0.0.2
- Public release
* Aug 30 2009 – v0.0.3
- Minor adjustment
* Aug 31 2009 – v0.0.4
- Added preference panel to switch on/off display item, etc..
* Aug 31 2009 – v0.0.5
- WordPress native gallery supported. thanks Matt!
* Aug 31 2009 – v0.0.6
- now it is compatible with lightbox
* Aug 31 2009 – v0.0.7
- more detail – exif data
- if you cannot see additional options at preference panel, press ’submit’ button.
* Sept 04 2009 – v0.0.8
- mouse over/out to display exif option
* Sept 05 2009 – v0.0.9
- support image alignment such as align center etc.
* Sept 11 2009 – v0.1.0
- fixed: if original size and display size were different, image had been trimmed.
* Sept 11 2009 – v0.1.1
- fixed: suport different types of focal length such as D700.

•If you like this

If you like this plugin, writing small entry on your blog and trackbacking to this entry makes me really really happy!


35 Responses to “WP Plugin: Display Exif”

  1. Matt Rude

    This look like a really cool, fun plugin, but the two sites I have tried this plugin on, it breaks the [gallery] shortcut. Any idea’s how I can use this plugin with a native Wordpress gallery?

  2. V.J.Catkick

    Thanks Matt! I just uploaded ver0.0.5 to support native WP gallery. Please wait few moment and download it from repository.

    Again, thank you pointing this issue ! (your name on my source code!)

    *check this site ( http://www.vjck.com/prototypes/ ) how it works.


  3. inso

    Warning: exif_read_data() [function.exif-read-data]: Unable to open file in /xxxx/xxxx/wp-content/plugins/display-exif/display_exif.php on line 109

  4. V.J.Catkick

    If server did not support exif_read_data, you will see this error message. Only thing that you can do is asking server administrator to re-compile PHP software on your server with ‘–enable-exif’ option.


  5. Orca H4H

    Hi..

    Could it be possible to have the exif been shown when hoverin over the image? So you wouldnt have to click..

    J

  6. V.J.Catkick

    Umm, I think if I changed to just ‘mouse over’ for this, maybe the page will be heavy, but I can do this (maybe, I have to test it).

    Plz keep watching version number and if I added this function, I will add section about this at ’setting’ area.

    thanks for idea.


  7. mihai

    Hi V.J.

    Congratulations! You did a great job! I like very much your plugin, especially since you introduced the mouse over option.

    The only problem I have is that if I enable your plugin (this happen even with v.0.0.9) the alignment of the text is changed to left and even worse, the space between text and pictures is dissapearing, It is very interesting that this happen only to pictures that includes exif information.

    I mention that I use P2 theme (Prologue).

    Thanks for your great work!

  8. V.J.Catkick

    Hi mihai,

    I’ve just tested this plugin with P2 theme (see http://www.vjck.com/prototypes/) and here is solution for this fix.

    1) When you use align-right or align-left, the space between text and image will become zero.
    a) This is easy CSS problem. Adding following code at bottom of your style.css file.

    .alignleft {
    margin-right: 1.0em;
    }
    .alignright {
    margin-left: 1.0em;
    }

    If you want, you can change width of space e.g. 1.0em, 15px, etc.

    2) Floating section issue.
    a) When you use floating images (such as align-left) if total paragraph height beside image is shorter than image height itself, you must finish with BR tag with clear option.

    <img src="..." .... />text text text text<br clear="all" />

    Plz try this and if I misunderstood the issue, comment here again. Thanks!


  9. mihai

    Hi V.J.

    I did the change and now works perfectly! THANK YOU!

    One more thing… I have also a PhotoBlog that uses a Premium Theme. I tried to use your plugin but it does not work at all. I suppose that the problem is because the pictures are not in the default place but in this folder: wp-content/thumbnails

    Is it possible to tell me what I have to do in order to make the plugin to see the pictures from that directory?

    Again, many thanks in advance for your great work!

    Mihai

  10. V.J.Catkick

    Hi mihai,

    This plugin pulls image’s url from your entry so the place of image does not matter. If you show me the site url, I can help you maybe.


  11. mihai

    Hello V.J.

    Sure I can give you the URL! Please see http://www.existentiale.ro

    Thanks!

  12. V.J.Catkick

    Hi mihai,

    I opened the page and it was displayable but it had one error so page rendering did not finished. The error is following:

    jQuery("ul.sf-menu").superfish is not a function

    This means one of your plugin or part of your theme uses undefined function. To find out where problem is, remove all plugin, and add one by one. When you try to do this, FireFox browser is very helpful to find out error (check small red exclamation mark at top-right of your window). You can forget about ‘warnings’, but if your site has error, any (including mine) plugin has possibilities of malfunction.

    please check the error.


  13. mihai

    Hello,

    That error was produced by Google Analycator plugin and I dezactivated it but no change regarding Display Exif.

    What is interesting about the theme I use is that it does not uploads the pictures the classic way of WP but is built that way to instead use: Super Image Plugin that:

    “Easily add thumbnail images to your posts. Brought to you by Press75.com”

    It seems that this plugin is using several Java Scripts like jquery.superfish.

    Any other thought?

  14. V.J.Catkick

    Hi,

    I’ve just checked again and I could not find my script on your page. Could you please activate my plugin so I can find what happened at the page.

    Here’s something you should know.
    a) image thumbnails at top page: those images are maybe generated by the plugin so it does not have exif.
    b) when you click those thumbnails (new window comes up), maybe that window is generated by JavaScript. This means there’s possibilities it is non-standard wordpress page.
    c) individual entry page, my plugin should work on this page, but it did not.

    V.J.


  15. mihai

    Hello again!

    I activated the plugin to see how it works.

    1. The thumbnails are OK to NOT show the exif. I do not expect that.
    2. If you click on images, it are expanded with Lightbox effect. No exif appears…
    3. If you click on the name of the post, the new page is dsplayed… the picture does not show the Exif and something interesting happens only when I activate this plugin: on the very top of the page you can see the text of the post again… that’s very strange.

    Waiting with impatience on your input!

    Mihai

  16. V.J.Catkick

    Hi,

    Finally, I found what happened on your site.

    A) Lightbox: this plugin compatible with lightbox but this means it only lives with it, not display exif at lightbox window.

    B) Individual page, the image is looks like normal image, but it is still thumbnail, therefore the plugin cannot find ordinary img tags at each entries. So, it’s bad, but my plugin is not compatible with this theme.

    Maybe this theme file (i do not know this theme) does not use the_content tag at each entry. Again, sorry, there’s nothing I can do for this.


  17. mihai

    Hi V.J.

    I understand. Thanks anyhow for all your efforts!

    Mihai

  18. Manuel Martensen

    Awesome! Exactly what I was looking for. But i suspect this works only with images uploaded by WordPress, right? Would be so great if this would work on images linked from Flickr as well, is there any chance?

    Manuel


  19. Manuel Martensen

    Whoops, forgot the error:

    Warning: exif_read_data(3923462560_1ce1a67b9f.jpg) [function.exif-read-data]: Incorrect APP1 Exif Identifier Code in /is/htdocs/wp1073384_REO57T6EI1/www_manuelmartensen/wp-content/plugins/display-exif/display_exif.php on line 125

  20. V.J.Catkick

    Hi,

    Uploading images to Flickr, or other service, most of them rebuild those images by themselves. Therefore in most case, the exif data will be broken. I will try but there’s only small chances there.

    The error which you saw is:
    a) your server does not completely compile exif option
    or
    b) the exif data which you want to display is broken by some reason.

    If I can see the image with error, I will advice (or I can fix) this issue.

    V.J.


  21. A.E. Christian

    hello. i want to start by congratilating you for making the most aesthetically pleasant exif reader plugin for wordpress.
    but i have 2 problems/suggestions:

    1. it will be nice if this plugin wont use the build in function of PHP server “exif_read_data()” to read the metadata. i have 2 accounts on 2 different host and both of them have installed the php server with exif option disabled.
    i hope in the future you will make using the exifer library, so this plugin can be usable on all hosts.

    2. maybe in the future you will make this plugin able to read exif geo-tag, and linking to google maps.

    p.s. take a look to this plugin that work with the exifer library
    http://pos51.org/wordpress-plugin-wp-gallery-exif-reader/

    thank you

  22. V.J.Catkick

    HI,

    Well, the easiest way to read exif data is using PHP library but as you wrote some servers did not compile with exif option. I will do something for this in near future, but current version is not support yet.

    The external lib which you suggested is looks wonderful. I will check the source code and if I can merge this into mine, I will try.

    Geo tag support is not difficult thing, but I do not have GPS solutions now and I could not tested this. This is in my To-Do list, too.

    Thank you suggestions!!!


  23. A.E. Christian

    thank you for your quick response and support to my suggestions.
    i didn’t understand what you said about “GPS solutions”. If you referring of inserting a geotag into exif of a photo, they are many programs that do this.

    some discussions about programs here:
    http://www.flickr.com/groups/geotagging/discuss/72157600792221207/
    http://www.flickr.com/groups/geotagging/discuss/72157603517461700/

    i personally use Breezebrowser and google earth. but a free and multi OS solution is Picassa 3 & Google Earth 5.

    some discussion about geotaging and wordpress here:
    http://www.kristarella.com/2008/12/geo-exif-data-in-wordpress/
    http://notions.okuda.ca/mg2-hacks/exif-parser/

  24. Grace

    Hello,
    I’m building a photo portfolio and I wanted to use you plug-in to display the exif data from the photos. However, I installed it, activated it, configured it and nothing, absolutely nothing happened.

    I know some photos don’t even have EXIF data, but still, the plug-in does not work with the ones that do.

    here’s the example page for a photo with exif data:

    http://www.prdktz.com/photos/271/

    hope you can tell me what the problem is.

    thank you.


  25. V.J.Catkick

    Hi Grace,

    I saw your page and the plugin looks working (but nothing happen when clicking photo as you said).

    There’s some reasons:

    a) theme file does not use ‘the_content’ function to display entry: please check single.php for example.
    b) some other plugin which you installed ‘over write’ mine (less possibilities)

    If the theme file which you are using now is ‘downloadable’, please tell me url so I can check this. if not (such as your original) send me ’single.php’ or ‘index.php’ by email (you can find my email address at ‘retagr’ icon at top of sidebar at ‘top page’.

    thanks

  26. Grace

    sent you an email.
    thanks for all your help.


  27. V.J.Catkick

    ive got your email and it looks fine. umm.

    by the way, i’ve checked your photo at
    http://www.prdktz.com/photos/271/

    this photo did not contain exif data…. do you have any other examples?

  28. V.J.Catkick

    Ah, I’ve got it.

    The image that you are watching on your web site is ‘generated by WordPress’ thumbnails, therefore the exif data had been lost. The image file name where on your web site is ‘Nortec-01-750×501.jpg’, and on your computer, maybe it was ‘Nortec-01.jpg’ or ‘Nortec.jpg’ …

    When you upload image (off course by WordPress), if you selected other than ‘original’ size radio button, WP will re-create image file on your server (yes, there’s original, too). WordPress’s image generating logic (actually, this is PHP software on your server) does support only image data.

    Therefore the image which you see on your web site does not contain exif dat even your original had. Please try ‘original’ size at your test entry with image which contain exif data.


  29. Patrick

    Thanks for the cool plugin! When the EXIF screen appears over the image, when the mouse is moved ever so slightly, the EXIF screen flicks on and off hundreds of time durinf this slight mouse movement. Is there a fix for this?

    Thanks!!

  30. Grace

    Tried with the original image and it worked! thanks a lot :)


  31. Patrick

    Forgot to mention that the screen flickering issue seems to be related to the Firefox browser.

  32. V.J.Catkick

    hi Patrick,

    There’s plan to update this fix, but currently I don’t have enough time to do this. So until that, please use with ‘click to display exif’.


  33. Marcello

    I got that same error:
    Warning: exif_read_data() [function.exif-read-data]: Unable to open file in /srv/www/htdocs/web92/html/wp-content/plugins/display-exif/display_exif.php on line 125

    But phpinfo says exif is enabled.
    What to do?

  34. V.J.Catkick

    Hi Marcello,

    In your case, the function is working, but the file cannot open in some ways such as incorrect filename, bad path name and so on. If you are familiar with PHP code, add following code in source file between line 125 and 124:

    print_r( $filename );

    So you can see the string which program passes to the function on your screen. If you are not, plz show me (or email me) raw code of sample entry so I can find what happened on your site. When you copy & paste entry, plz use html editor mode so I can see html code, too.



Trackbacks

  1. Hiro's Weblog » 週末か〜。

Leave a Reply

*First time to comment? Please comment in English or Japanese to avoid your comment as spam.

retaggr

TrackBack URL : http://www.vjcatkick.com/blog/wp-trackback.php?p=11751