Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
// 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.
// display hit counts for selected picture
$hit_id = plogger_get_picture_id();
$new_hits = 1;
if (!isset($_SESSION['hit_id'][$hit_id])) {
$result = run_query("SELECT `hits` FROM `plogger_pictures` WHERE `id`=$hit_id");
if ( mysql_num_rows($result) ) {
$row = mysql_fetch_array($result);
$old_hits = $row['hits'];
//update hits
$new_hits = $old_hits + 1;
}
run_query("UPDATE `plogger_pictures` SET `hits`=$new_hits WHERE `id`=$hit_id");
$_SESSION['hit_id'][$hit_id] = true;
}
$result = run_query("SELECT `hits` FROM `plogger_pictures` WHERE `id`=$hit_id");
if ( mysql_num_rows($result) ) {
$row_new = mysql_fetch_array($result);
$n_hits = $row_new['hits'];
}
<div id="picture-holder">
<a accesskey="v" href="<?php echo plogger_get_source_picture_url(); ?>"><img class="photos-large" src="<?php echo plogger_get_picture_thumb(THUMB_LARGE); ?>" width="<?php echo $thumb_width; ?>" height="<?php echo $thumb_height; ?>" title="<?php echo plogger_get_picture_caption('clean'); ?>" alt="<?php echo plogger_get_picture_caption('clean'); ?>" /></a>
<br><?php print '<b>'.$n_hits.' views</b>'?></br>
<?php while(plogger_has_pictures()) : plogger_load_picture();
// 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_width = $thumb_width + 30; // Account for padding/border width
$div_height = $thumb_height + 75; // Account for padding/border width
// Display number of times pictures viewed
$hit_id = plogger_get_picture_id();
$result = run_query("SELECT `hits` FROM `plogger_pictures` WHERE `id`=$hit_id");
if ( mysql_num_rows($result) ) {
$row = mysql_fetch_array($result);
$n_hits = $row['hits'];
}
<a href="<?php echo plogger_get_picture_url(); ?>"><?php echo $imgtag; ?></a><br />
<span><?php echo plogger_get_picture_caption(); ?> <?php echo plogger_download_checkbox(plogger_get_picture_id()); ?></span>
<br><?php print ''.$n_hits.' views'; ?></br>
1 to 2 of 2