<?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>alex.rabe &#187; templates</title>
	<atom:link href="http://alexrabe.de/tag/templates/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexrabe.de</link>
	<description>ALEX RABE &#124; learning by doing...</description>
	<lastBuildDate>Mon, 09 Apr 2012 09:26:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>New in Version 1.00 : Templates</title>
		<link>http://alexrabe.de/2008/11/25/new-in-version-100-templates/</link>
		<comments>http://alexrabe.de/2008/11/25/new-in-version-100-templates/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 21:24:35 +0000</pubDate>
		<dc:creator>Alex Rabe</dc:creator>
				<category><![CDATA[NextGEN Gallery]]></category>
		<category><![CDATA[NextGEN-Gallery]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://alexrabe.de/2008/11/25/new-in-version-100-templates/</guid>
		<description><![CDATA[During the last year I analyzed the question in the forums what could be the next step forward for NextGEN Gallery. I&#8217;m no company, I have not twenty people which are analyze the layout, code or waste their time with brainstorming for the next release. But I&#8217;m read between the lines in all of your [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://alexrabe.de/wp-content/uploads/newstyle.png" alt="Templates 1" align="left" />During the last year I analyzed the question in the forums what could be the next step forward for NextGEN Gallery. I&#8217;m no company, I have not twenty people which are analyze the layout, code or waste their time with brainstorming for the next release. But I&#8217;m read between the lines in all of your questions : How can I show Exif information ? Can be the pagination on top of the gallery ? Can I include the album name ? Can I show this or that ?</p>
<p> <span id="more-290"></span></p>
<p>There are of course also functional requests (Flickr or Picasa support, sub-album, comments etc.) but the most questions are around layout or design. Since WordPress introduce the automatic upgrade feature, all you changes in the code could not be saved during a upgrade. Also it&#8217;s not so easy to study my code to do some minor changes on the layout.</p>
<p>With Version 1.00 I extract the most output code to separate files and enable new templates which can be ceated without any code changes in the core plugin. Here a example :</p>
<p><img src="http://alexrabe.de/wp-content/uploads/newstyle2.png" alt="Templates 2" align="left" /><a href="http://www.webdesignerwall.com/tutorials/css-decorative-gallery/">Web Designer Wall</a> published a very good example how do you can style a gallery without editing the images itself. If you read the post, you will see that you need a &lt;span&gt; element inside the &lt;div&gt; or &lt;ul&gt;. In the past you need to modify my core plugin files, but now you can create a new file which include all the changes you need for your new gallery design. Custom templates are PHP files that can be stored in the folder <strong>nggallery</strong>, inside your theme directory. For example, if you are using the default WordPress theme then you can store a template file at :</p>
<blockquote><p>/wp-content/themes/default/nggallery/gallery-sample1.php</p></blockquote>
<p>To use now this template in a post or page you insert the tag:</p>
<p><code>[ nggallery id=1 <strong>template=sample1</strong> ]</code></p>
<p>This tells NextGEN Gallery to use &#8216;gallery-<strong>sample1</strong>.php&#8217; to show the gallery output. Without this template tag, NextGEN takes the default template in the plugin folder, normally located at :</p>
<blockquote><p>/wp-content/plugins/nextgen-gallery/view/gallery.php</p></blockquote>
<p>The same you can use for album, singlepic or imagebrowser, all of them are template driver so that you can easily modify the output without having problems during a upgrade.</p>
<p><a href="http://nextgen.boelinger.com/templates/example-3/">Here now a example</a> , I copied the original gallery.php file and changed it to a &lt;li&gt; output instead the &lt;div&gt; classic way :</p>
<pre class="brush: php">

&lt;ul id=&quot;ngg-gallery-&lt;?php echo $gallery-&gt;ID ?&gt;&quot; class=&quot;sample3&quot;&gt;

&lt;!-- Thumbnails --&gt;
&lt;?php foreach ($images as $image) : ?&gt;

&lt;li id=&quot;ngg-image-&lt;?php echo $image-&gt;pid ?&gt;&quot;&gt;
&lt;a href=&quot;&lt;?php echo $image-&gt;imageURL ?&gt;&quot; title=&quot;&lt;?php echo $image-&gt;description ?&gt;&quot; &lt;?php echo $image-&gt;thumbcode ?&gt; &gt;
&lt;span&gt;&lt;/span&gt;
&lt;em&gt;&lt;?php echo $image-&gt;alttext ?&gt;&lt;/em&gt;
&lt;img title=&quot;&lt;?php echo $image-&gt;alttext ?&gt;&quot; alt=&quot;&lt;?php echo $image-&gt;alttext ?&gt;&quot; src=&quot;&lt;?php echo $image-&gt;thumbnailURL ?&gt;&quot; &lt;?php echo $image-&gt;size ?&gt; /&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;?php endforeach; ?&gt;
&lt;/ul&gt;
</pre>
<p>The CSS styles can be now added from the samples of Web Designer Wall without any changes :</p>
<pre class="brush: css">

.sample3 {
list-style: none;
margin: 0;
padding: 0;
text-indent:0px !important;
}
.sample3 li:before {
content: &#039;&#039; !important;
}
.sample3 li {
padding: 10px;
margin: 0;
float: left;
position: relative;
width: 180px;
height: 130px;
}
.sample3 li:hover img {
border-color: #000;
}
.sample3 img {
background: #fff;
border: solid 1px #ccc;
padding: 5px;
}
.sample3 em {
background: #fff;
color: #000;
font-style: normal;
padding: 2px 8px 0 22px;
display: block;
position: absolute;
top: 20px;
left: 5px;
border: 1px solid #999;
}
.sample3 a {
text-decoration: none;
}
.sample3 span {
width: 30px;
height: 60px;
display: block;
position: absolute;
top: 7px;
left: 9px;
background: url(images/paper-clip-mini.png) no-repeat;
z-index: 3;
}
</pre>
<p>You find more gallery layout examples at <a href="http://nextgen.boelinger.com/templates/example-2/">nextgen.boelinger.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alexrabe.de/2008/11/25/new-in-version-100-templates/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
	</channel>
</rss>

