Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
Save this code as latest-images.php, upload it to your plogger directory (same level as the files included in the beginning of the code), then add a php include ( <?php include('ploggerdirectory/latest-images.php'); ?> ) to the page you want to display the thumbnails on.
<?php
include_once('plog-globals.php');
include_once('plog-load_config.php');
include_once('plog-functions.php');
global $config;
$amount = '6'; //How many images do you want shown?
//The URL of your Plogger directory E.G. http://yoursite.com/ploggerdirectory ***IMPORTANT*** DO NOT INCLUDE A TRAILING SLASH
$siteurl = 'http://www.yourdomain.tld/ploggerdirectory';
$q = "SELECT * FROM plogger_pictures ORDER BY `id` DESC LIMIT $amount";
$result = mysql_query($q) or die ("Could not execute query: $q." . mysql_error());
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$path = $row['path'];
$number = strrpos($path, '/');
$number = $number+1;
$url = substr($path, $number);
?>
<li><a href="<?php echo $siteurl; ?>/index.php?level=picture&id=<?php echo $id; ?>"><img class="imgborder" src="<?php echo $siteurl; ?>/thumbs/<?php echo $id; ?>-<?php echo $url; ?>" border="0" /></a></li>
<?php } ?>
.imgborder {
background-color: #ccc;
border: 2px solid #0fc;
padding: 2px;
}
<div id="updates" class="boxed">
<h2 class="title">Recent Updates</h2>
<div class="content">
<div id="updates" class="boxed">
<h2 class="title">Recent Updates</h2>
<div style="text-align: left; margin-left: 5px;">
while ($row = mysql_fetch_array($result)) {
$id = $row['id'];
$path = $row['path'];
$number = strrpos($path, '/');
$number = $number+1;
$url = substr($path, $number);
?>
<a href="<?php echo $siteurl; ?>/index.php?level=picture&id=<?php echo $id; ?>"><img class="imgborder" src="<?php echo $siteurl; ?>/thumbs/<?php echo $id; ?>-<?php echo $url; ?>" width="80" height="60" border="0" /></a>
<?php } ?>
//$thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_LARGE);
$thumbpath = generate_thumb($picture_path, $result['picture_id'],THUMB_LARGE);
src="<?php echo generate_thumb($path, $id); ?>"
src="<?php echo generate_thumb($path, $id, THUMB_LARGE); ?>"
1 to 22 of 22