This is MOD for see in details page - all relate upload image of each uploader (relate image of upload).
// Step 1
In details.php file,
find:
//-----------------------------------------------------
//--- Show Image --------------------------------------
//-----------------------------------------------------
$image_allow_comments = (check_permission("auth_readcomment", $cat_id)) ? $image_row['image_allow_comments'] : 0;
$image_name = format_text($image_row['image_name'], 2);
show_image($image_row, $mode, 0, 1);
add after:
//-----------------------------------------------------
//--- Show All Related Images By Uploader -------------
//-----------------------------------------------------
$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.image_id != " . $image_id . " AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
";
$result = $site_db->query($sql1);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$uploader_related_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$uploader_related_images .= $lang['no_new_images'];
$uploader_related_images .= "</td></tr></table>";
}
else {
$uploader_related_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($uploader_related_images_row = $site_db->fetch_array($result)) {
$user_name = format_text(trim(ucfirst($uploader_related_images_row[$user_table_fields['user_name']]), 2));
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$uploader_related_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$uploader_related_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($uploader_related_images_row);
$uploader_related_images .= $site_template->parse_template("thumbnail_bit");
$uploader_related_images .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$uploader_related_images .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$uploader_related_images .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$uploader_related_images .= "</tr>\n";
}
}
$uploader_related_images .= "</table>\n";
} // end else
$site_template->register_vars("lang_uploader_related_images", preg_replace("/" . $site_template->start . "user_name" . $site_template->end . "/siU", $user_name, $lang['uploader_related_images']));
$site_template->register_vars("uploader_related_images", $uploader_related_images);
unset($uploader_related_images);
// Step 2
In lang/english/main.php file,
add in top ?>:
$lang['uploader_related_images'] = "See other images uploaded by {user_name}";
// Step 3
In templates/your_template/details.html file,
find:
{admin_links}<br />
{endif admin_links}<br />
{lightbox_button} {postcard_button} {download_button} {download_zip_button}
</div>
<br />
add after:
{if uploader_related_images}
<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_uploader_related_images}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="head1">{uploader_related_images}</td>
</tr>
</table>
<br />
{endif uploader_related_images}
Finish.