hi,
in the includes/functions.php
you can at function get_random_image_cache() {
set which cat_id should not be used for random images..
example:
function get_random_image_cache() {
global $site_db, $cat_cache, $total_images;
$random_image_cache = array();
$cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN");
if (SHOW_RANDOM_CAT_IMAGE) {
$sql = "SELECT DISTINCT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".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 NOT IN (($cat_id_sql), 123) AND c.cat_id = i.cat_id
ORDER BY RAND()";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
$random_image_cache[$row['cat_id']] = $row;
}
}
else {
if (empty($total_images)) {
$sql = "SELECT COUNT(*) as total_images
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND cat_id NOT IN (($cat_id_sql), 123)";
$row = $site_db->query_firstrow($sql);
$total_images = $row['total_images'];
}
if (empty($total_images)) {
return $random_image_cache;
}
mt_srand((double)microtime() * 1000000);
$number = ($total_images > 1) ? mt_rand(0, $total_images - 1) : 0;
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".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 NOT IN (($cat_id_sql), 123) AND c.cat_id = i.cat_id
LIMIT $number, 1";
$random_image_cache[0] = $site_db->query_firstrow($sql);
}
return $random_image_cache;
}
replace 123 at
(($cat_id_sql), 123)
with your cat id (3 times)
for the [MOD] Slideshow you should ask in that thread