<?php while (plogger_has_collections()) { plogger_load_collection(); // Find thumbnail width/height $thumb_info = plogger_get_thumbnail_info(); $thumb_width = $thumb_info['width']; // The width of the image. It is integer data type. $thumb_height = $thumb_info['height']; // The height of the image. It is an integer data type. ?> <div class="collection"> <a class="collection-image-link" href="<?php echo plogger_get_collection_url(); ?> "><img class="photos" src="<?php echo plogger_get_collection_thumb(); ?> " width="<?php echo $thumb_width; ?> " height="<?php echo $thumb_height; ?> " title="<?php echo plogger_get_collection_name(); ?> " alt="<?php echo plogger_get_collection_name(); ?> " /></a> <h2><a href="<?php
<?php plogger_get_header(); print '<div id="thumbnail_container">'; if (plogger_has_collections()) { print '<ul class="slides">'; while (plogger_has_collections()) { $row = plogger_load_collection(); $desc = plogger_get_collection_description(); print '<li class="thumbnail"><div class="tag"><a href="' . plogger_get_collection_url() . '">'; // generate XHTML with thumbnail and link to picture view. print '<img class="photos" src="' . plogger_get_collection_thumb() . '" title="' . $desc . '" alt="' . $desc . '" />'; print '</a><br/>'; print plogger_download_checkbox(plogger_get_collection_id()); print plogger_get_collection_name() . ' <br />'; print '<div class="meta-header">('; $num_albums = plogger_collection_album_count(); print $num_albums . ' '; print $num_albums == 1 ? "album" : "albums"; print ')</div></div></li>'; } print '</ul>'; } else { print "No collections yet"; } print '</div>'; plogger_get_footer();
function plogger_get_thumbnail_info() { global $thumbnail_config; global $config; $thumbpath = ''; // Make sure we generate the thumbnail before we try to get the image information switch ($GLOBALS['plogger_level']) { case 'collections': $thumbpath = plogger_get_collection_thumb(); break; case 'collection': $thumbpath = plogger_get_album_thumb(); break; case 'album': case 'search': $thumbpath = plogger_get_picture_thumb($size = THUMB_SMALL); break; case 'picture': $thumbpath = plogger_get_picture_thumb($size = THUMB_LARGE); break; } // Get the absolute path instead of the URL $thumbpath = str_replace($config['gallery_url'], $config['basedir'], $thumbpath); if (!is_readable($thumbpath)) { // Again, do we want to support video in the Plogger core? // $image_info = getimagesize($config['basedir'].'plog-graphics/thumb-video.gif'); return false; } else { $image_info = getimagesize($thumbpath); $image_info['width'] = $image_info[0]; $image_info['height'] = $image_info[1]; } return $image_info; }