<?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>Ardamis &#187; plogger</title>
	<atom:link href="http://www.ardamis.com/tag/plogger/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ardamis.com</link>
	<description>Ardamis is a blog about web development and technology in general.</description>
	<lastBuildDate>Thu, 02 Feb 2012 07:07:02 +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>Plogger 3 theme: Broadway</title>
		<link>http://www.ardamis.com/2007/09/10/plogger-3-theme-broadway/</link>
		<comments>http://www.ardamis.com/2007/09/10/plogger-3-theme-broadway/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 05:50:54 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Web Site Dev]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[plogger]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/2007/09/10/plogger-3-theme-broadway/</guid>
		<description><![CDATA[A dark Plogger theme that takes elements from the Yahoo! Broadway page of 2007.]]></description>
			<content:encoded><![CDATA[<p>This is a rough beta of a new, dark, Plogger 3 theme.  It takes elements from the Yahoo! Broadway page of 2007.</p>
<div class="isolate"><a class="hidelink" href="http://www.ardamis.com/images/broadway-ss.jpg"><img style="border: 1px solid #cacaca;" src="http://www.ardamis.com/images/broadway-ss-thumb.jpg" alt="Plogger 3 theme: Broadway screenshot" /></a></div>
<h3>Download the beta version (v0.1 beta)</h3>
<p>Download the beta version of the Plogger 3 Broadway theme here.  I still need to clean up the code and the CSS, and check it more thoroughly in IE6 and some other browsers.</p>
<p class="download"><a href="http://www.ardamis.com/downloads/plogger3-broadway.zip">Download the &#8220;Broadway&#8221; Plogger 3 theme</a></p>
<h3>Updated:  Broadway 2</h3>
<p>I&#8217;ve changed the theme to display the album thumbnails in the same grid format as the picture thumbnails, and also fixed a few other layout bugs.</p>
<p class="download"><a href="http://www.ardamis.com/downloads/broadway2.zip">Download the &#8220;Broadway 2&#8243; Plogger 3 theme</a></p>
<p></p>
<p><strong>Update 12/19/09:</strong> I&#8217;ve updated the theme to be compatible with the recently-released Plogger v.1.0.  If you&#8217;re running an earlier version, I would recommend that you update to the current stable release.</p>
<h3>Want this with Lightbox?</h3>
<p>I&#8217;ve incorporated the Lightbox 2 JavaScript into the Broadway 2 theme.  You can download it at <a href="http://www.ardamis.com/2009/02/24/broadway-2-lightbox-plogger-theme/">Broadway 2 + Lightbox</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2007/09/10/plogger-3-theme-broadway/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Centering the thumbnails in Plogger</title>
		<link>http://www.ardamis.com/2007/08/05/centering-the-thumbnails-in-plogger/</link>
		<comments>http://www.ardamis.com/2007/08/05/centering-the-thumbnails-in-plogger/#comments</comments>
		<pubDate>Sun, 05 Aug 2007 05:00:41 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Site Dev]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[plogger]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[themes]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/2007/08/05/centering-the-thumbnails-in-plogger/</guid>
		<description><![CDATA[This post illustrates a method of centering the thumbnails in the album view of the PHP image gallery Plogger. The method automatically adjusts for thumbnails of varying widths and pages containing less than a full row of images. This method is implemented in the Plogger 3 theme: Air, but it should work in any theme [...]]]></description>
			<content:encoded><![CDATA[<p>This post illustrates a method of centering the thumbnails in the album view of the PHP image gallery <a href="http://plogger.org/">Plogger</a>.  The method automatically adjusts for thumbnails of varying widths and pages containing less than a full row of images.</p>
<p>This method is implemented in the <a href="http://www.ardamis.com/2007/07/05/plogger-beta-3-theme-air/">Plogger 3 theme: Air</a>, but it should work in any theme that uses the unordered list derived from the default Plogger theme and that has a fixed and determinable width for the element &#8216;ul.slides&#8217;.</p>
<h2>Overview of the method</h2>
<p>In brief, the template file album.php is edited to add a PHP script that figures out how many thumbnails are in the first row and then adjusts the left margin of each &#8216;li.thumbnail&#8217; in order to keep the same amount of space on either side of each image.  The user is required to manually set 3 variables: <code>$center_thumbs</code>, <code>$total_space</code> and <code>$thumb_padding</code>, and the script does the rest.</p>
<h2>Line-by-line documentation</h2>
<p>Below is all of the relevant code, to be placed into the theme file &#8216;album.php&#8217;.</p>
<pre><code><?php plogger_load_picture();
// Set variables for the thumbnails
$capt = plogger_get_picture_caption();
$date = plogger_get_picture_date();
// Find thumbnail width
$thumb_info = plogger_get_thumbnail_info();
$thumb_width = $thumb_info[0]; // The width of the thumbnail image, in pixels.
$thumb_height = $thumb_info[1];	// The height of the thumbnail image, in pixels.

// Set album page options
$center_thumbs = 'true'; // When the value of "$center_thumbs" is set to 'true', the theme will center the thumbnail images
$total_space = 798; // Set the value of $total_space to equal the width, in pixels, of the interior of 'ul.slides' (i.e. after deducting for any padding)
$thumb_padding = 33; // Set the value of $thumb_padding to equal the sum of all padding and borders on 'ul.slides li.thumbnail', the thumbnail image and the anchor tag (this can be tricky to calculate)

$thumbs_on_page = $GLOBALS["available_pictures"];
$actual_thumb_width = $thumb_width + $thumb_padding;
$max_thumbs_per_row = floor($total_space / $actual_thumb_width);
($thumbs_on_page < $max_thumbs_per_row)? $thumbs_per_row = $thumbs_on_page : $thumbs_per_row = $max_thumbs_per_row ;
$avail_space = $total_space - ($thumbs_per_row * $actual_thumb_width);
$left_margin = floor($avail_space / ($thumbs_per_row + 1));
?>
<li class="thumbnail"<?php if ($center_thumbs == 'true') echo 'style="margin-left: ' . $left_margin . 'px"'; ?>>
</code></pre>
<p>Here&#8217;s how the whole thing works, with each code section followed by a description of what&#8217;s happening:</p>
<pre><code>$center_thumbs = 'true'; // When the value of "$center_thumbs" is set to 'true', the theme will center the thumbnail images
$total_space = 798; // Set the value of $total_space to equal the width, in pixels, of the interior of 'ul.slides' (e.g.: after deducting for any padding)
$thumb_padding = 33; // Set the value of $thumb_padding to equal the sum of all padding and borders on 'ul.slides li.thumbnail', the thumbnail image and the anchor tag (this can be tricky to calculate)
</code></pre>
<p>The centering feature can be toggled on and off by setting <code>$center_thumbs</code> to &#8216;true&#8217; or any other value.  The user will need to specify integer values for <code>$total_space</code> and <code>$thumb_padding</code>, as described in the commented lines.</p>
<pre><code>$thumbs_on_page = $GLOBALS["available_pictures"];</code></pre>
<p>The number of available pictures on the current page is assigned to the <code>$thumbs_on_page</code> variable.</p>
<pre><code>$actual_thumb_width = $thumb_width + $thumb_padding;</code></pre>
<p>The actual width of each &#8216;li.thumbnail&#8217; is calculated and saved as the variable <code>$actual_thumb_width</code>.  The width of the thumbnail image is available to the theme as <code>$thumb_width</code>, but the user must specify a value for <code>$thumb_padding</code>, which is an integer equal to the sum of all of the padding and borders on the thumbnail image, the surrounding anchor tag, and the ul list item &#8216;.thumbnail&#8217;.  This can be rather tricky to calculate, so you may want to increase your figure by a few pixels just to be safe.</p>
<pre><code>$max_thumbs_per_row = floor($total_space / $actual_thumb_width);</code></pre>
<p>The maximum possible number of thumbnails per row is calculated by dividing the useable width of &#8216;ul.slides&#8217; by the actual width of a &#8216;li.thumbnail&#8217;, then rounding down the quotient to the next lowest integer using the PHP function <code>floor()</code>.  For example, if the quotient of <code>$total_space / $actual_thumb_width</code> is 4.9, <code>$max_thumbs_per_row</code> would equal 4, because 5 thumbnails would be wider than the available space.</p>
<pre><code>($thumbs_on_page < $max_thumbs_per_row)? $thumbs_per_row = $thumbs_on_page : $thumbs_per_row = $max_thumbs_per_row ;</code></pre>
<p>The actual number of thumbs in the first row is calculated and assigned to <code>$thumbs_per_row</code> using a ternary operator.  If the number of thumbs on the current page is less than the maximum number possible in a single row, it follows that the row isn't full, and the number of thumbs on the page is assigned to the variable <code>$thumbs_per_row</code>.  However, if the number of thumbs on the page is equal to or greater than the maximum number possible in a single row, it follows that the first row contains the maximum number possible, and so the thumbs will be spaced as though every row is full.  Doing it this way maintains the grid, but if one wanted partially filled rows to be centered according to the number of remaining images, that would be possible.</p>
<pre><code>$avail_space = $total_space - ($thumbs_per_row * $actual_thumb_width);</code></pre>
<p>The amount of white space, <code>$avail_space</code>, is calculated by subtracting from the total usable space the sum of the widths of the thumbs in the first row.</p>
<pre><code>$left_margin = floor($avail_space / ($thumbs_per_row + 1));</code></pre>
<p>Finally, the number of pixels for the left margin of each 'li.thumbnail', <code>$left_margin</code>, is calculated by dividing <code>$avail_space</code> by the sum of 1 plus the number of thumbs in the first row, and then rounding down the quotient to the next lowest integer.  The number of thumbs must be increased by 1 to account for the white space to the right of the last thumbnail.</p>
<p>In practice, the white space to the right of last thumbnail may be a few pixels wider or narrower than the left margins, but this deviation should be limited to within 4 or 5 pixels.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2007/08/05/centering-the-thumbnails-in-plogger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plogger 3 theme: Air</title>
		<link>http://www.ardamis.com/2007/07/05/plogger-beta-3-theme-air/</link>
		<comments>http://www.ardamis.com/2007/07/05/plogger-beta-3-theme-air/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 05:49:52 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Web Site Dev]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[plogger]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/2007/07/05/plogger-beta-3-theme-air/</guid>
		<description><![CDATA[Air is a full-featured Plogger 3 stand alone theme that takes visual cues from the Yahoo! TV beta of mid 2007. The theme files validate as XHTML 1.0 Strict (while Plogger itself is either Strict or Transitional, depending on some options). The theme looks nearly identical in Firefox 2.0 and Internet Explorer 7, and uses [...]]]></description>
			<content:encoded><![CDATA[<p>Air is a full-featured Plogger 3 stand alone theme that takes visual cues from the Yahoo! TV beta of mid 2007.  The theme files validate as XHTML 1.0 Strict (while Plogger itself is either Strict or Transitional, depending on some options).  The theme looks nearly identical in Firefox 2.0 and Internet Explorer 7, and uses conditional CSS to be very similar in IE6.  A version of this theme is included in the official <a href="http://www.plogger.org/">Plogger 3</a> build, released on 7/10/07.</p>
<div class="isolate"><a class="hidelink" href="http://www.ardamis.com/images/air-ss.jpg"><img style="border: 1px solid #cacaca;" src="http://www.ardamis.com/images/air-ss-thumb.jpg" alt="Plogger beta 3 theme: Air screenshot" /></a></div>
<p>The fundamental changes are:</p>
<ul>
<li>The theme template files are now primarily HTML with some PHP, rather than being entirely written in PHP.  This will make it easier for people with basic knowledge of HTML to further customize the theme.</li>
<li>The compatibility with Internet Explorer 7 has been greatly improved.  Among other things, a new <a href="http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/FloatedClearedBug.html">float and clear bug introduced in IE 7</a> has been avoided.  The theme is inherently much more stable and less prone to breaking in different browsers.</li>
</ul>
<p>Note that this theme is only for use with Plogger 3.  If you&#8217;re using an earlier version, it&#8217;s recommended that you upgrade.</p>
<h3>Download the stable version (v0.1)</h3>
<p>Download the latest stable version of the Plogger 3 Air theme here.  Because I tend to tinker with things, the files here will probably be slightly more up-to-date than those bundled with the full Plogger download.</p>
<p class="download"><a href="http://www.ardamis.com/downloads/plogger3-air.zip">Download the &#8220;Air&#8221; Plogger 3 theme</a></p>
<h3>Download the beta version (v0.2 beta)</h3>
<p>If you don&#8217;t mind the occasional bug or glitch, download the beta version to get a look at some new features.  The album view in v0.2 beta supports centered thumbnails and can be set to display each picture&#8217;s date when no description exists &#8211; take a look at album.php for commented instructions.  I&#8217;ve posted some documentation regarding the method for centering the thumbnails at <a href="http://www.ardamis.com/2007/08/05/centering-the-thumbnails-in-plogger/">Centering the thumbnails in Plogger</a>.  The code should work for any fixed-width theme derived from the default, but the method could be adapted to center many other layouts that use floated list items instead of tables.</p>
<p class="download"><a href="http://www.ardamis.com/downloads/plogger3-air-beta.zip">Download the &#8220;Air&#8221; Plogger 3 theme &#8211; beta</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2007/07/05/plogger-beta-3-theme-air/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

