I created a really really bad hack for this:
in member.php, about line 236 (right before if ($action == "uploadform") { ) I added the following:
$user_id = $user_info['user_id'];
function check_cat_limit($cat_id, $user_id) {
$sql = "SELECT image_id FROM 4images_images WHERE cat_id=$cat_id AND user_id=$user_id";
$result = mysql_query($sql);
$cat_images_user = mysql_num_rows($result);
if($cat_images_user >= 5) {
return false;
} else {
return true;
}
}
and added "!check_cat_limit($cat_id, $user_id)" to the second line of if ($action == "uploadform") { as:
if ($cat_id != 0 && (!isset($cat_cache[$cat_id]) || !check_permission("auth_up
load", $cat_id) || !check_cat_limit($cat_id, $user_id))) {
Please note that this is hard-coded and applies to all user levels. The error message is just the incorrect login error, so it's not friendly. If you attempt to use this code and something goes wrong, please don't blame me. It seems to work ok for me, but I can't say if it will work for you.
Of course I would like to see a good solution, where the image limit is set per gallery through user levels. Until then, I will have to use my bad hack.