EXIF Information display in Lightview Plus or Lightbox
-
Hi.
Does anyone know how to accomplish this?
I’ve seen it done on this page:
https://kruyt.org/He specifies the code below: but where does he put it?!?!?!
What I mean with thickbox, is I auto load it in the plugin. no need to embed in my theme. And thickbox is already by default in WP2.5
code for using the tb in wp:
wp_enqueue_script('thickbox'); add_action('wp_head', 'thickbox_css'); function thickbox_css() { $thickbox_csspath = get_bloginfo('wpurl')."/wp-includes/js/thickbox/thickbox.css"; $thickboxscript = "\n"; print($thickboxscript); }
Then:
And here some code I use to put the exif info that wp 2.5 now reads from files in the title, so the ‘boxes’ can use it to. To display exif.
// Get EXIF from WP and set in title $metadata = wp_get_attachment_metadata($id); $image_meta = $metadata[image_meta]; //print_r ($metadata); if($image_meta[camera]) $title = ”.$image_meta[camera].’ ‘; if($image_meta[focal_length]) $title .= ‘@ ‘.$image_meta[focal_length].’ mm ‘; if($image_meta[shutter_speed]) $title .= ‘- 1/’.(1/($image_meta[shutter_speed])).’ sec’; if($image_meta[aperture]) $title .= ‘, ?/’.$image_meta[aperture].”; if($image_meta[iso]) $title .= ‘, ISO ‘.$image_meta[iso].”; if($image_meta[created_timestamp]) $title .= ‘ on ‘.date(’j F, Y’,$image_meta[created_timestamp]).”;
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘EXIF Information display in Lightview Plus or Lightbox’ is closed to new replies.