<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Nextgen gallery — exif data in lightbox effect</title>
	<atom:link href="http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/</link>
	<description>Check it out!</description>
	<lastBuildDate>Thu, 03 Jun 2010 20:50:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Przemek</title>
		<link>http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/comment-page-1/#comment-4872</link>
		<dc:creator>Przemek</dc:creator>
		<pubDate>Sun, 30 May 2010 05:00:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.wrzesinscy.com/?p=88#comment-4872</guid>
		<description>Brady,
Are you using my solution (editing singlepic.php) or davejp one?</description>
		<content:encoded><![CDATA[<p>Brady,<br />
Are you using my solution (editing singlepic.php) or davejp one?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brady Sammons</title>
		<link>http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/comment-page-1/#comment-4870</link>
		<dc:creator>Brady Sammons</dc:creator>
		<pubDate>Sat, 29 May 2010 17:44:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.wrzesinscy.com/?p=88#comment-4870</guid>
		<description>So I replaced all my code with yours, no errors, all appears well...I click the &quot;import meta-data&quot; button, and I get a progress bar and dialogue that says &quot;action complete&quot; however when I view my page and click and on image and light box pops up i get no meta data??? I would really appreciate any help. Its for school thanks</description>
		<content:encoded><![CDATA[<p>So I replaced all my code with yours, no errors, all appears well…I click the “import meta-data” button, and I get a progress bar and dialogue that says “action complete” however when I view my page and click and on image and light box pops up i get no meta data??? I would really appreciate any help. Its for school thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Przemek</title>
		<link>http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/comment-page-1/#comment-3812</link>
		<dc:creator>Przemek</dc:creator>
		<pubDate>Tue, 01 Sep 2009 07:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.wrzesinscy.com/?p=88#comment-3812</guid>
		<description>&lt;a href=&quot;#comment-3807&quot; rel=&quot;nofollow&quot;&gt;@Chris &lt;/a&gt; 
You have to check if exif function can retrive fields you&#039;ve wanted and replace code like &lt;code&gt;&lt; ?php echo $exif[&#039;camera&#039;] ?&gt;&lt;/code&gt; with code something like &lt;code&gt;&lt; ?php echo $exif[&#039;author&#039;] ?&gt;&lt;/code&gt; and so on in singlepic.php file. 
It&#039;s just a guess, I cannot check it right now.

Przemek</description>
		<content:encoded><![CDATA[<p><a href="#comment-3807" rel="nofollow">@Chris </a><br />
You have to check if exif function can retrive fields you’ve wanted and replace code like <code>< ?php echo $exif['camera'] ?></code> with code something like <code>< ?php echo $exif['author'] ?></code> and so on in singlepic.php file.<br />
It’s just a guess, I cannot check it right now.</p>
<p>Przemek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/comment-page-1/#comment-3807</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 27 Aug 2009 16:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.wrzesinscy.com/?p=88#comment-3807</guid>
		<description>Hello, 

How can this code be modified for the following format: 

Title
Author
Description
Shutter, aperture, ISO

EG: 
Morning Rest
John Smith
A dewy dragonfly rests purple loostrife early in the morning.
1/8 second, f8, ISO 100

Also, if these fields are blank, I&#039;d like them left blank.
Chris</description>
		<content:encoded><![CDATA[<p>Hello, </p>
<p>How can this code be modified for the following format: </p>
<p>Title<br />
Author<br />
Description<br />
Shutter, aperture, ISO</p>
<p>EG:<br />
Morning Rest<br />
John Smith<br />
A dewy dragonfly rests purple loostrife early in the morning.<br />
1/8 second, f8, ISO 100</p>
<p>Also, if these fields are blank, I’d like them left blank.<br />
Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KonstantinMiller</title>
		<link>http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/comment-page-1/#comment-3615</link>
		<dc:creator>KonstantinMiller</dc:creator>
		<pubDate>Tue, 07 Jul 2009 03:48:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.wrzesinscy.com/?p=88#comment-3615</guid>
		<description>I have been looking looking around for this kind of information. Will you post some more in future? I&#039;ll be grateful if you will.</description>
		<content:encoded><![CDATA[<p>I have been looking looking around for this kind of information. Will you post some more in future? I’ll be grateful if you will.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Przemek</title>
		<link>http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/comment-page-1/#comment-3012</link>
		<dc:creator>Przemek</dc:creator>
		<pubDate>Sat, 11 Apr 2009 12:12:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.wrzesinscy.com/?p=88#comment-3012</guid>
		<description>Thanks Dave for comment, your solution works great.
BTW, great photos at your website.</description>
		<content:encoded><![CDATA[<p>Thanks Dave for comment, your solution works great.<br />
BTW, great photos at your website.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davejp</title>
		<link>http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/comment-page-1/#comment-3011</link>
		<dc:creator>davejp</dc:creator>
		<pubDate>Thu, 09 Apr 2009 11:58:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.wrzesinscy.com/?p=88#comment-3011</guid>
		<description>Thanks for posting this. It helped me figure out how to solve my exif problem. 

I wanted to do this in my nextgen gallery as well. I decided I wanted the exif to show in lightbox/floatbox when a viewer clicks a thumb, so I updated functions.php to populate the description field with exif. sample:

http://dave.jp/nggallery/page-1224/album-3/gallery-7

It now automatically populates new photos descriptions and I just had to select &quot;Import Meta data&quot; for selected thumbs in the nextgen gallery admin panel to get the descriptions updated. It is simple this way. I also added tags to description and put more info into alt= for SEO. 

in admin/functions.php go to
foreach($imagesIds as $pic_id) {
			$picture = nggdb::find_image($pic_id);
			if (!$picture-&gt;error) {

				$meta = nggAdmin::get_MetaData($picture-&gt;imagePath);



I changed mine to look like this: 



foreach($imagesIds as $pic_id) {
			$picture = nggdb::find_image($pic_id);
			if (!$picture-&gt;error) {

				$meta = nggAdmin::get_MetaData($picture-&gt;imagePath);
				
				// get the title
				if (!$alttext = $meta[&#039;title&#039;])
					$alttext = ($meta[&#039;keywords&#039;] . &quot; &quot; . $meta[&#039;camera&#039;]);
				// get the caption / description field
				if (!$description = $meta[&#039;caption&#039;])
					$description = ($meta[&#039;exif_desc&#039;] . &quot;&quot; . $meta[&#039;keywords&#039;]);
				// get the file date/time from exif
				$timestamp = $meta[&#039;timestamp&#039;];
				// update database
				$result = $wpdb-&gt;query( $wpdb-&gt;prepare(&quot;UPDATE $wpdb-&gt;nggpictures SET alttext = %s, description = %s, imagedate = %s WHERE pid = %d&quot;, $alttext, $description, $timestamp, $pic_id) );
				// add the tags
				if ($meta[&#039;keywords&#039;]) {
					$taglist = explode(&#039;,&#039;, $meta[&#039;keywords&#039;]);
					wp_set_object_terms($pic_id, $taglist, &#039;ngg_tag&#039;);
				} // add tags
			}// error check
		} // foreach
		
		return true;
		
	}

	// **************************************************************
	function get_MetaData($picPath) {
		// must be Gallery absPath + filename
		
		require_once(NGGALLERY_ABSPATH . &#039;/lib/meta.php&#039;);
		
		$meta = array();

		$pdata = new nggMeta($picPath);
		$meta[&#039;title&#039;] = $pdata-&gt;get_META(&#039;title&#039;);		
		$meta[&#039;caption&#039;] = $pdata-&gt;get_META(&#039;caption&#039;);	
		$meta[&#039;keywords&#039;] = $pdata-&gt;get_META(&#039;keywords&#039;);
		$meta[&#039;timestamp&#039;] = $pdata-&gt;get_date_time();	
		$meta[&#039;exif_desc&#039;] = ($pdata-&gt;get_META(&#039;camera&#039;) . &quot;, &quot; . $pdata-&gt;get_META(&#039;focal_length&#039;) .  &quot;, &quot; . $pdata-&gt;get_META(&#039;shutter_speed&#039;) . &quot;, &quot; . $pdata-&gt;get_META(&#039;aperture&#039;) . &quot;, ISO &quot; . $pdata-&gt;get_META(&#039;iso&#039;) . &quot;, &quot; . $pdata-&gt;get_META(&#039;created_timestamp&#039;));		

		return $meta;
		
	}


after updating functions.php as above, upload a new image, or just click on a thumb in the gallery admin panel and select &quot;import metadata&quot; from the drop down and click ok. You will see description field update which should populate exif into lightbox, or floatbox in my case.</description>
		<content:encoded><![CDATA[<p>Thanks for posting this. It helped me figure out how to solve my exif problem. </p>
<p>I wanted to do this in my nextgen gallery as well. I decided I wanted the exif to show in lightbox/floatbox when a viewer clicks a thumb, so I updated functions.php to populate the description field with exif. sample:</p>
<p><a href="http://dave.jp/nggallery/page-1224/album-3/gallery-7" rel="nofollow">http://dave.jp/nggallery/page-1224/album-3/gallery-7</a></p>
<p>It now automatically populates new photos descriptions and I just had to select “Import Meta data” for selected thumbs in the nextgen gallery admin panel to get the descriptions updated. It is simple this way. I also added tags to description and put more info into alt= for SEO. </p>
<p>in admin/functions.php go to<br />
foreach($imagesIds as $pic_id) {<br />
			$picture = nggdb::find_image($pic_id);<br />
			if (!$picture-&gt;error) {</p>
<p>				$meta = nggAdmin::get_MetaData($picture-&gt;imagePath);</p>
<p>I changed mine to look like this: </p>
<p>foreach($imagesIds as $pic_id) {<br />
			$picture = nggdb::find_image($pic_id);<br />
			if (!$picture-&gt;error) {</p>
<p>				$meta = nggAdmin::get_MetaData($picture-&gt;imagePath);</p>
<p>				// get the title<br />
				if (!$alttext = $meta[’title’])<br />
					$alttext = ($meta[’keywords’] . ” ” . $meta[’camera’]);<br />
				// get the caption / description field<br />
				if (!$description = $meta[’caption’])<br />
					$description = ($meta[’exif_desc’] . “” . $meta[’keywords’]);<br />
				// get the file date/time from exif<br />
				$timestamp = $meta[’timestamp’];<br />
				// update database<br />
				$result = $wpdb-&gt;query( $wpdb-&gt;prepare(“UPDATE $wpdb-&gt;nggpictures SET alttext = %s, description = %s, imagedate = %s WHERE pid = %d”, $alttext, $description, $timestamp, $pic_id) );<br />
				// add the tags<br />
				if ($meta[’keywords’]) {<br />
					$taglist = explode(‘,’, $meta[’keywords’]);<br />
					wp_set_object_terms($pic_id, $taglist, ‘ngg_tag’);<br />
				} // add tags<br />
			}// error check<br />
		} // foreach</p>
<p>		return true;</p>
<p>	}</p>
<p>	// **************************************************************<br />
	function get_MetaData($picPath) {<br />
		// must be Gallery absPath + filename</p>
<p>		require_once(NGGALLERY_ABSPATH . ‘/lib/meta.php’);</p>
<p>		$meta = array();</p>
<p>		$pdata = new nggMeta($picPath);<br />
		$meta[’title’] = $pdata-&gt;get_META(‘title’);<br />
		$meta[’caption’] = $pdata-&gt;get_META(‘caption’);<br />
		$meta[’keywords’] = $pdata-&gt;get_META(‘keywords’);<br />
		$meta[’timestamp’] = $pdata-&gt;get_date_time();<br />
		$meta[’exif_desc’] = ($pdata-&gt;get_META(‘camera’) . “, ” . $pdata-&gt;get_META(‘focal_length’) .  “, ” . $pdata-&gt;get_META(‘shutter_speed’) . “, ” . $pdata-&gt;get_META(‘aperture’) . “, ISO ” . $pdata-&gt;get_META(‘iso’) . “, ” . $pdata-&gt;get_META(‘created_timestamp’));		</p>
<p>		return $meta;</p>
<p>	}</p>
<p>after updating functions.php as above, upload a new image, or just click on a thumb in the gallery admin panel and select “import metadata” from the drop down and click ok. You will see description field update which should populate exif into lightbox, or floatbox in my case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Agung</title>
		<link>http://www.wrzesinscy.com/index.php/2009/02/25/nextgen-gallery-exif-data-in-lightbox-effect/comment-page-1/#comment-77</link>
		<dc:creator>Agung</dc:creator>
		<pubDate>Mon, 09 Mar 2009 00:38:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.wrzesinscy.com/?p=88#comment-77</guid>
		<description>Hi, this is a great script!
but I found something wrong, on line 26. Its writen &quot;$image-/&gt;classname&quot; it should &quot;$image-&gt;classname&quot; (without the &quot;/&quot;)

and I want to aks, how do you put exif data in viewing photo (lightbox)?

regards</description>
		<content:encoded><![CDATA[<p>Hi, this is a great script!<br />
but I found something wrong, on line 26. Its writen “$image-/&gt;classname” it should “$image-&gt;classname” (without the “/”)</p>
<p>and I want to aks, how do you put exif data in viewing photo (lightbox)?</p>
<p>regards</p>
]]></content:encoded>
	</item>
</channel>
</rss>
