// Step 1
In index.php file,
find:
unset($new_images);
add after:
//-----------------------------------------------------
//--- Show Last images with thumbnails ----------------
//-----------------------------------------------------
$sql1 = "
SELECT i.image_id, i.image_name, i.image_thumb_file, i.image_media_file, i.cat_id" . get_user_table_field(", u.", "user_name") . "
FROM (" . IMAGES_TABLE . " i, " . CATEGORIES_TABLE . " c)
LEFT JOIN " . USERS_TABLE . " u ON (" . get_user_table_field("u.", "user_id") . " = i.user_id)
WHERE i.image_active = 1 AND i.cat_id = c.cat_id AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
ORDER BY i.image_date DESC
LIMIT 5
";
$result = $site_db->query($sql1);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$last_images_with_thumbnails = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$last_images_with_thumbnails .= $lang['no_new_images'];
$last_images_with_thumbnails .= "</td></tr></table>";
}
else {
$last_images_with_thumbnails = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($last_images_with_thumbnails_row = $site_db->fetch_array($result)) {
$user_name = format_text(trim(ucfirst($last_images_with_thumbnails_row[$user_table_fields['user_name']]), 2));
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$last_images_with_thumbnails .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$last_images_with_thumbnails .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($last_images_with_thumbnails_row);
$last_images_with_thumbnails .= $site_template->parse_template("thumbnail_bit");
$last_images_with_thumbnails .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$last_images_with_thumbnails .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$last_images_with_thumbnails .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$last_images_with_thumbnails .= "</tr>\n";
}
}
$last_images_with_thumbnails .= "</table>\n";
} // end else
$site_template->register_vars("lang_last_images_with_thumbnails_from_home", preg_replace("/" . $site_template->start . "user_name" . $site_template->end . "/siU", $user_name, $lang['last_images_with_thumbnails_from_home']));
$site_template->register_vars("last_images_with_thumbnails", $last_images_with_thumbnails);
unset($last_images_with_thumbnails);
// Step 2
In lang/english/main.php file,
add in top ?>:
$lang['last_images_with_thumbnails_from_home'] = "Latest images with thumbnails";
// Step 3
In templates/your_template/home.html file,
find:
<td class="head1">{new_images}</td>
</tr>
</table>
<br />
add after:
{if last_images_with_thumbnails}
<table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="head1" valign="top">{lang_last_images_with_thumbnails_from_home}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="head1">{last_images_with_thumbnails}</td>
</tr>
</table>
<br />
{endif last_images_with_thumbnails}
(or place block where you like for place in home.html file).
Finish.