<?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>Cozmoslabs &#187; nextgen</title>
	<atom:link href="http://www.cozmoslabs.com/tag/nextgen/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cozmoslabs.com</link>
	<description>Web design and development experiment.</description>
	<lastBuildDate>Thu, 01 Jul 2010 09:26:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WordPress Photo Slideshow with NextGen Gallery</title>
		<link>http://www.cozmoslabs.com/2010/01/13/wordpress-photo-slideshow/</link>
		<comments>http://www.cozmoslabs.com/2010/01/13/wordpress-photo-slideshow/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 13:08:26 +0000</pubDate>
		<dc:creator>Cristian</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[galleryview]]></category>
		<category><![CDATA[nextgen]]></category>
		<category><![CDATA[wordpress slideshow]]></category>

		<guid isPermaLink="false">http://www.cozmoslabs.com/?p=862</guid>
		<description><![CDATA[After looking into tons of solutions for a WordPress photo slideshow, most of them being flash applets, I&#8217;m confident that I&#8217;ve found the very best one. And it&#8217;s not even Flash, it&#8217;s just JavaScript. Are you familiar with the NextGEN Gallery plugin? Well, you must be, since it&#8217;s probably the most downloaded photo gallery plugin. [...]


Related posts:<ol><li><a href='http://www.cozmoslabs.com/2008/09/14/use-wordpress-as-a-cms-with-thematic-part2/' rel='bookmark' title='Permanent Link: Use WordPress as a CMS with Thematic &#8211; Part2'>Use WordPress as a CMS with Thematic &#8211; Part2</a></li>
<li><a href='http://www.cozmoslabs.com/2008/09/07/use-wordpress-as-a-cms-with-thematic-part1/' rel='bookmark' title='Permanent Link: Use WordPress as a CMS with Thematic Theme- Part1'>Use WordPress as a CMS with Thematic Theme- Part1</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="postimage">
<img src="http://www.cozmoslabs.com/wp-content/uploads/2010/01/galleryview1.jpg" alt="" title="galleryview" width="300" height="200" class="alignright size-full wp-image-909" /></div>
<p>After looking into tons of solutions for a WordPress photo slideshow, most of them being flash applets, I&#8217;m confident that I&#8217;ve found the very best one. And it&#8217;s not even Flash, it&#8217;s just JavaScript.</p>
<p>Are you familiar with the <a href="http://wordpress.org/extend/plugins/nextgen-gallery/">NextGEN Gallery</a> plugin? Well, you must be, since it&#8217;s probably the most downloaded photo gallery plugin. Well, we&#8217;ve found <a href="http://nextgen-gallery.com/templates/galleryview/">a little addon plugin</a> that integrates NextGEN with <a href="http://spaceforaname.com/galleryview">GalleryView</a>, an excellent jQuery gallery plugin. What more could we want?</p>
<p><span id="more-862"></span></p>
<p>So, here&#8217;s how everything works. You upload and activate the NextGEN Gallery plugin, then you create a gallery and put some nice pictures there, right? Then you upload and activate the little addon plugin I mentioned earlier.</p>
<p>In order to output your slideshow to a post or a page, simply add a code like this</p>

<div class="wp_codebox"><table><tr id="p8628"><td class="code" id="p862code8"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#91;</span>nggallery id<span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span> template<span style="color: #339933;">=</span>galleryview images<span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span></pre></td></tr></table></div>

<p>The only minor downside is that in order to customize your slideshow you need to take a dip into the treacherous waters of coding. Inside the <code>nggGalleryview</code> directory you will find a <code>view</code> directory, and in there, you will find a file called <code>gallery-galleryview.php</code></p>
<h3>Editing the plugin</h3>
<p>Open it and you&#8217;ll see a bit of JavaScript code with a set of configuration options for your slideshow, on line 37.</p>

<div class="wp_codebox"><table><tr id="p8629"><td class="code" id="p862code9"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> defer<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;defer&quot;</span><span style="color: #339933;">&gt;</span>
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;document&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#&lt;?php echo $gallery-&gt;anchor ?&gt;'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">galleryView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
			panel_width<span style="color: #339933;">:</span> <span style="color: #CC0000;">450</span><span style="color: #339933;">,</span>
			panel_height<span style="color: #339933;">:</span> <span style="color: #CC0000;">400</span><span style="color: #339933;">,</span>
			frame_width<span style="color: #339933;">:</span> <span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
			frame_height<span style="color: #339933;">:</span> <span style="color: #CC0000;">40</span><span style="color: #339933;">,</span>
			transition_interval<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span>
			overlay_color<span style="color: #339933;">:</span> <span style="color: #3366CC;">'#222'</span><span style="color: #339933;">,</span>
			overlay_text_color<span style="color: #339933;">:</span> <span style="color: #3366CC;">'white'</span><span style="color: #339933;">,</span>
			caption_text_color<span style="color: #339933;">:</span> <span style="color: #3366CC;">'#222'</span><span style="color: #339933;">,</span>
			background_color<span style="color: #339933;">:</span> <span style="color: #3366CC;">'transparent'</span><span style="color: #339933;">,</span>
			border<span style="color: #339933;">:</span> <span style="color: #3366CC;">'none'</span><span style="color: #339933;">,</span>
			nav_theme<span style="color: #339933;">:</span> <span style="color: #3366CC;">'dark'</span><span style="color: #339933;">,</span>
			easing<span style="color: #339933;">:</span> <span style="color: #3366CC;">'easeInOutQuad'</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>These are the default settings. You will need to modify <code>panel_width</code> and <code>panel_height</code> to have a different sized slideshow.</p>
<p>Now we also have to modify the css a bit. By default the images also get a css width and height. </p>
<p>Open up <code>galleryview.css</code>. On line 57 we have:</p>

<div class="wp_codebox"><table><tr id="p86210"><td class="code" id="p862code10"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.galleryview</span> <span style="color: #6666ff;">.panel</span> img <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">450px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">400px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Modify these with the same width and height as in the javascript code above. Now you can have a slideshow exactly the width you need.</p>
<p>This will work for most people. However there are a few bugs that need ironing out inside the original css. By default it works ok, however I want to make some slight changes.</p>
<ol>
<li>On line 61 inside the <code>galleryview.css</code> change from overflow hidden to visible. This will fix the last thumbnail to be 10px smaller in width then the rest of the thumbnails.

<div class="wp_codebox"><table><tr id="p86211"><td class="code" id="p862code11"><pre class="css" style="font-family:monospace;">.strip_wrapper<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">visible</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

</li>
<li>Now we need to move the right arrow over to the right 10px.

<div class="wp_codebox"><table><tr id="p86212"><td class="code" id="p862code12"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.galleryview</span> img<span style="color: #6666ff;">.nav-prev</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

</li>
<li>Finally, if you&#8217;re using the Thematic Theme Framework for WordPress we need to add a small css fix. The problem is that both the plugin and Thematic share a common css class, named <code>nav-prev</code>. Because of this your right arrow will be stretched to 50% of the post width <img src='http://www.cozmoslabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . This is what we need to add to the end of the plugin&#8217;s css:

<div class="wp_codebox"><table><tr id="p86213"><td class="code" id="p862code13"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.galleryview</span> img<span style="color: #6666ff;">.nav-prev</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

</li>
</ol>
<h3>Going a bit further with our resolve.</h3>
<p>For this plugin to be really useful we&#8217;ll probably need to be able to include it inside out theme files. By default it doesn&#8217;t have a function that will print out the gallery. To go around this we&#8217;ll use the <code> do_shortcode()</code> WordPress function.</p>

<div class="wp_codebox"><table><tr id="p86214"><td class="code" id="p862code14"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> do_shortcode<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;[nggallery id=1 template=galleryview images=0]&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<h3>Our gallery demo. It&#8217;s now 600px wide and 400 tall.</h3>

<div id="ngg-gallery-1-862" class="galleryview">
	<!-- Thumbnails -->
			
	<div class="panel">
		<img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/4267870050_1a8f45786a_b.jpg" />
		<div class="panel-overlay">
			<h2>people in the sun</h2>
			<p>voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non</p>
		</div>
	</div>
 			
	<div class="panel">
		<img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/4268358765_7d25f5f68c_b.jpg" />
		<div class="panel-overlay">
			<h2>a lady</h2>
			<p>proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
		</div>
	</div>
 			
	<div class="panel">
		<img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/4253801746_b2183dfe03_b.jpg" />
		<div class="panel-overlay">
			<h2>some flowers</h2>
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut</p>
		</div>
	</div>
 			
	<div class="panel">
		<img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/4259133644_9d95ce4d62_o.jpg" />
		<div class="panel-overlay">
			<h2>an autumn road</h2>
			<p>laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in</p>
		</div>
	</div>
 			
	<div class="panel">
		<img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/4095262637_ea5ba8ae77_b.jpg" />
		<div class="panel-overlay">
			<h2>a lake</h2>
			<p>labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco</p>
		</div>
	</div>
 			
	<div class="panel">
		<img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/4172130744_ea947f75a8_o.jpg" />
		<div class="panel-overlay">
			<h2>fields</h2>
			<p>laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in</p>
		</div>
	</div>
 			
	<div class="panel">
		<img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/4258960308_dc35af9e5b_b.jpg" />
		<div class="panel-overlay">
			<h2>a misty road</h2>
			<p>labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco</p>
		</div>
	</div>
 			
	<div class="panel">
		<img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/4230226411_2e1c78f401_o.jpg" />
		<div class="panel-overlay">
			<h2>Loch Morlich sunset</h2>
			<p>View west across a frozen Loch Morlich towards the setting sun. Taken in the Cairngorms National Park at Glenmore near Aviemore.</p>
		</div>
	</div>
 			
	<div class="panel">
		<img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/3265687349_517f78c3da_b.jpg" />
		<div class="panel-overlay">
			<h2>a stream</h2>
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut</p>
		</div>
	</div>
 	  	<ul class="filmstrip">
  		
	    <li><img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/thumbs/thumbs_4267870050_1a8f45786a_b.jpg" alt="people in the sun" title="people in the sun" /></li>
		
	    <li><img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/thumbs/thumbs_4268358765_7d25f5f68c_b.jpg" alt="a lady" title="a lady" /></li>
		
	    <li><img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/thumbs/thumbs_4253801746_b2183dfe03_b.jpg" alt="some flowers" title="some flowers" /></li>
		
	    <li><img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/thumbs/thumbs_4259133644_9d95ce4d62_o.jpg" alt="an autumn road" title="an autumn road" /></li>
		
	    <li><img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/thumbs/thumbs_4095262637_ea5ba8ae77_b.jpg" alt="a lake" title="a lake" /></li>
		
	    <li><img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/thumbs/thumbs_4172130744_ea947f75a8_o.jpg" alt="fields" title="fields" /></li>
		
	    <li><img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/thumbs/thumbs_4258960308_dc35af9e5b_b.jpg" alt="a misty road" title="a misty road" /></li>
		
	    <li><img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/thumbs/thumbs_4230226411_2e1c78f401_o.jpg" alt="Loch Morlich sunset" title="Loch Morlich sunset" /></li>
		
	    <li><img src="http://www.cozmoslabs.com/wp-content/gallery/galleryview/thumbs/thumbs_3265687349_517f78c3da_b.jpg" alt="a stream" title="a stream" /></li>
	  	</ul>

</div>

<script type="text/javascript" defer="defer">
	jQuery("document").ready(function(){
		jQuery('#ngg-gallery-1-862').galleryView({
		
		// defaults:
		/*
			panel_width: 450,
			panel_height: 400,
			frame_width: 40,
			frame_height: 40,
			transition_interval: 0,
			overlay_color: '#222',
			overlay_text_color: 'white',
			caption_text_color: '#222',
			background_color: 'transparent',
			border: 'none',
			nav_theme: 'dark',
			easing: 'easeInOutQuad'
		*/
		
			panel_width: 600,
			panel_height: 400,
			frame_width: 40,
			frame_height: 40,
			transition_interval: 0,
			overlay_color: '#222',
			overlay_text_color: 'white',
			caption_text_color: '#222',
			background_color: 'transparent',
			border: 'none',
			nav_theme: 'dark',
			easing: 'easeInOutQuad'
		});
	});
	
</script>


<h3>Conclusions</h3>
<p>I&#8217;ve actually searched quite a lot after an out of the box <strong>WordPress image slideshow plugin</strong>. While GalleryView dose offer a lot, it also falls short in many areas.</p>
<ul>
<li>It hard to modify by non-technical users.</li>
<li>There is no way to have two different sized slideshows.</li>
<li>It&#8217;s recommended that the images are fixed sized when you upload them. Otherwise there is a chance they will look squashed.</li>
</ul>
<p>On the other had, in the hands of a developer or a power user it will be able to cover a large range of problems from normal in-page slideshow to an automated slider for a site&#8217;s leaf pages.</p>
<p>So with this in mind I would recommend you play around with GalleryView plugin for NextGen next time you need an image slideshow!</p>


<p>Related posts:<ol><li><a href='http://www.cozmoslabs.com/2008/09/14/use-wordpress-as-a-cms-with-thematic-part2/' rel='bookmark' title='Permanent Link: Use WordPress as a CMS with Thematic &#8211; Part2'>Use WordPress as a CMS with Thematic &#8211; Part2</a></li>
<li><a href='http://www.cozmoslabs.com/2008/09/07/use-wordpress-as-a-cms-with-thematic-part1/' rel='bookmark' title='Permanent Link: Use WordPress as a CMS with Thematic Theme- Part1'>Use WordPress as a CMS with Thematic Theme- Part1</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.cozmoslabs.com/2010/01/13/wordpress-photo-slideshow/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Database Caching 11/27 queries in 0.015 seconds using disk

Served from: www.cozmoslabs.com @ 2010-07-31 02:11:18 -->