just insert this:$sql = "SELECT *
FROM ".LIGHTBOXES_TABLE."
WHERE ".get_user_table_field("", "user_id")." = ".$user_row['user_id'];
$user_lightbox_info = $site_db->query_firstrow($sql);
$num_rows_all = 0;
if (!empty($user_lightbox_info['lightbox_image_ids'])) {
$image_id_sql = str_replace(" ", ",", trim($user_lightbox_info['lightbox_image_ids']));
$sql = "SELECT COUNT(image_id) AS images
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND image_id IN ($image_id_sql)";
$result = $site_db->query_firstrow($sql);
$num_rows_all = $result['images'];
}
before$site_template->register_vars(array(
and this:"lang_show_user_lightbox" => $lang['show_user_lightbox']." (".$num_rows_all.")",
"url_show_user_lightbox" => ($user_info['user_level'] == ADMIN) ? $site_sess->url(ROOT_PATH."search.php?search_lightbox=".$user_row['user_id']) : "",
after:$site_template->register_vars(array(