<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Narasopa Media &#187; Gallery Thumbnail</title>
	<atom:link href="http://narasopa.com/seoblog/tag/gallery-thumbnail/feed/" rel="self" type="application/rss+xml" />
	<link>http://narasopa.com/seoblog</link>
	<description>advanced business solutions</description>
	<lastBuildDate>Thu, 15 Apr 2010 18:13:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding Title and Description to NextGen Gallery Thumbnails</title>
		<link>http://narasopa.com/seoblog/2009/02/adding-title-and-description-to-nextgen-gallery-thumbnails/</link>
		<comments>http://narasopa.com/seoblog/2009/02/adding-title-and-description-to-nextgen-gallery-thumbnails/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 17:58:47 +0000</pubDate>
		<dc:creator>Justin Handley</dc:creator>
				<category><![CDATA[Wordpress Hacks]]></category>
		<category><![CDATA[Captions]]></category>
		<category><![CDATA[Columns]]></category>
		<category><![CDATA[Displays]]></category>
		<category><![CDATA[Div]]></category>
		<category><![CDATA[Gallery Thumbnail]]></category>
		<category><![CDATA[Gallery View]]></category>
		<category><![CDATA[Goals]]></category>
		<category><![CDATA[Image Tag]]></category>
		<category><![CDATA[Images]]></category>
		<category><![CDATA[Style Sheet]]></category>
		<category><![CDATA[Thumbnails]]></category>
		<category><![CDATA[Thumbnails Gallery]]></category>
		<category><![CDATA[Title Description]]></category>
		<category><![CDATA[Top Of The List]]></category>

		<guid isPermaLink="false">http://narasopa.com/seoblog/?p=18</guid>
		<description><![CDATA[So, in setting up a project for a recent client I came upon the question &#8211; what gallery do I use as a WordPress plugin to acheive my goals?  After trying a few out, NextGen Gallery floated to the top of the list, but for the way I wanted to display the data it wasn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>So, in setting up a project for a recent client I came upon the question &#8211; what gallery do I use as a WordPress plugin to acheive my goals?  After trying a few out, NextGen Gallery floated to the top of the list, but for the way I wanted to display the data it wasn&#8217;t perfect.</p>
<p>The primary issue was that on the view of an album where it shows all of the thumbnails in a grid, I wanted to see the title and description of the picture.</p>
<p>The fix is actually fairly simple.</p>
<p>In the nextgen-gallery/view folder is a file called &#8220;gallery.php&#8221;.</p>
<p>In that file, there is a little block of code which displays the thumbnails.</p>
<p><code>&lt;?php foreach ($images as $image) : ?&gt;</p>
<p>	&lt;div id="ngg-image-&lt;?php echo $image-&gt;pid ?&gt;" class="ngg-gallery-thumbnail-box" &lt;?php echo $gallery-&gt;imagewidth ?&gt; &gt;<br />
		&lt;div class="ngg-gallery-thumbnail" &gt;</p>
<p>			&lt;a href="&lt;?php echo $image-&gt;imageURL ?&gt;" title="&lt;?php echo $image-&gt;description ?&gt;" &lt;?php echo $image-&gt;thumbcode ?&gt; &gt;<br />
				&lt;img title="&lt;?php echo $image-&gt;alttext ?&gt;" alt="&lt;?php echo $image-&gt;alttext ?&gt;" src="&lt;?php echo $image-&gt;thumbnailURL ?&gt;" border="0" &lt;?php echo $image-&gt;size ?&gt; /&gt;<br />
			&lt;/a&gt;</p>
<p>		&lt;/div&gt;<br />
	&lt;/div&gt;<br />
	&lt;?php if ( $gallery-&gt;columns &gt; 0 &amp;&amp; ++$i % $gallery-&gt;columns == 0 ) { ?&gt;<br />
	&lt;br style="clear: both" /&gt;<br />
	&lt;?php } ?&gt;<br />
 	&lt;?php endforeach; ?&gt;</code></p>
<p>What we need to do is add this bit of code:</p>
<p><code><br />
&lt;p align="left" style="margin-left:0px;"&gt;<br />
&lt;strong&gt;&lt;?php echo $image-&gt;alttext ?&gt;&lt;/strong&gt;<br />
&lt;br /&gt;<br />
&lt;?php echo $image-&gt;description ?&gt;<br />
&lt;/p&gt;</code></p>
<p>Right below the image tag.</p>
<p>Which is fine.  For my template, I also wanted the top of all captions to be at the same height, even though I don&#8217;t use cropping on my thumbnails so that images are different heights (by default, this will display the text right under your image).  So, I also created a little css and put it in NextGen&#8217;s style sheet:</p>
<p><code>.ngg-gallery-imagewrap {<br />
	height:175px;<br />
}</code></p>
<p>And then wrapped the image in a div with the class of ngg-gallery-imagewrap.</p>
<p>My final code looked like this:</p>
<p><code>&lt;?php foreach ($images as $image) : ?&gt;</p>
<p>	&lt;div id="ngg-image-&lt;?php echo $image-&gt;pid ?&gt;" class="ngg-gallery-thumbnail-box" &lt;?php echo $gallery-&gt;imagewidth ?&gt; &gt;<br />
		&lt;div class="ngg-gallery-thumbnail" &gt;<br />
&lt;div class="ngg-gallery-imagewrap"&gt;<br />
			&lt;a href="&lt;?php echo $image-&gt;imageURL ?&gt;" title="&lt;?php echo $image-&gt;description ?&gt;" &lt;?php echo $image-&gt;thumbcode ?&gt; &gt;<br />
				&lt;img title="&lt;?php echo $image-&gt;alttext ?&gt;" alt="&lt;?php echo $image-&gt;alttext ?&gt;" src="&lt;?php echo $image-&gt;thumbnailURL ?&gt;" border="0" &lt;?php echo $image-&gt;size ?&gt; /&gt;<br />
			&lt;/a&gt;&lt;/div&gt;</p>
<p>&lt;p align="left" style="margin-left:0px;"&gt;&lt;strong&gt;&lt;?php echo $image-&gt;alttext ?&gt;&lt;/strong&gt;&lt;br /&gt;<br />
&lt;?php echo $image-&gt;description ?&gt;&lt;/p&gt;</p>
<p>		&lt;/div&gt;<br />
	&lt;/div&gt;<br />
	&lt;?php if ( $gallery-&gt;columns &gt; 0 &amp;&amp; ++$i % $gallery-&gt;columns == 0 ) { ?&gt;<br />
	&lt;br style="clear: both" /&gt;<br />
	&lt;?php } ?&gt;<br />
 	&lt;?php endforeach; ?&gt;</code></p>
<p>And you can <a href="http://69.93.209.250/~adcrefer/residential/interiors/living-rooms" target="_blank">see the result here</a>.</p>
<p>Post a comment if you have any questions &#8211; I&#8217;m happy to help!</p>
]]></content:encoded>
			<wfw:commentRss>http://narasopa.com/seoblog/2009/02/adding-title-and-description-to-nextgen-gallery-thumbnails/feed/</wfw:commentRss>
		<slash:comments>72</slash:comments>
		</item>
	</channel>
</rss>

