Hi!
works!
1.)replace the code above with these, and they can put the "admin link" in the "thumbnail_bit" where ever you want:
while ($image_row = $site_db->fetch_array($result)){
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$new_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$new_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
$admin_links="";
$is_image_owner = ($image_row['user_id'] > USER_AWAITING && $user_info['user_id'] == $image_row['user_id']) ? 1 : 0;
if ($user_info['user_level'] == ADMIN) {
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=editimage&image_id=".$image_row['image_id']))."\" target=\"_blank\">".$lang['edit']."</a> ";
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php?goto=".urlencode("images.php?action=removeimage&image_id=".$image_row['image_id']))."\" target=\"_blank\">".$lang['delete']."</a>";
} elseif ($is_image_owner) {
$admin_links .= ($config['user_edit_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=editimage&".URL_IMAGE_ID."=".$image_row['image_id'])."\">".$lang['edit']."</a> ";
$admin_links .= ($config['user_delete_image'] != 1) ? "" : "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=removeimage&".URL_IMAGE_ID."=".$image_row['image_id'])."\">".$lang['delete']."</a>";
unset ($is_image_owner);
}
$new_images .= $site_template->register_vars("admin_links", $admin_links);
show_image($image_row);
$new_images .= $site_template->parse_template("thumbnail_bit");
$new_images .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$new_images .= "</tr>\n";
$count = 0;
}
unset ($admin_links);
} // end while
2.) now you can write "{admin_links}" where ever you want in your templates/yourTemplates/thumbnail_bit (example):
<!-- you wish detail page in a small javascript open window, use {thumbnail_openwindow} -->
{thumbnail}<br />
<b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new} ({user_name_link})
<br />
<a href="{cat_url}">{cat_name}</a><br />
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}<br />
{lightbox_button}<br>
{admin_links}
mfg Andi