V@no So far everything works fine. Thank you so much for your fantastic support.
$image_id = $site_db->get_insert_id();
if ($result && (!$cat_cache[$cat_id]['cat_image'] || $cat_cache[$cat_id]['cat_image'] == 7))
{
$sql = "UPDATE ".CATEGORIES_TABLE."
SET cat_image = ".$image_id."
WHERE cat_id = ".$cat_id;
$site_db->query($sql);
}
I have a category-structure for my concert-gallery like
1. Category (interpret)
1.1 Subcategory (date of the concert)
1.1.1 Photos of this concert
1.1.2 Videos of this concert
2. Category (interpret)
2.1 Subcategory (date of the concert)
2.1.1 Photos of this concert
2.1.2 Videos of this concert
3. Category (interpret)
3.1 Subcategory (date of the concert)
3.1.1 Photos of this concert
3.1.2 Videos of this concert
...sooo everytime the same way. And with your help and in combination with the MOD to let users add subcategories, users are building 3 Subcategories: For example 1.1 Subcategory (date of the concert), 1.1.1 Photos of this concert and 1.1.2 Videos of this concert... all in ONE function. If somebody is uploading a picture to the subcategory 1.1.1, the first uploaded picture is also the "category image" for its (sub)category. And this works fine.
NOW I'd like to add also automatically a "category image" to the category above: in this case "1.1 Subcategory (date of the concert)". It's the same way like above, but addionally an catimage for the whole concert not only for the photo or video section. Is there a way to add this Function? So if somebody upload a picture and the catimage is "7" for the default-picture, the thumbnail will be set as the catimage of its category and one category above. I hope, my ugly english will be understand?
Thx!
Below the
addcat.php and the
member.php attached...