great addon by the way but I made a small modification which I believe you should include in your next version...
Basically I had some categories that have no images in, and they were showing up so I simply added a if statement around certain areas that checked to see if $num_rows is 0 if it did then it skips that section...
PHP Code:
if ($num_rows > 0){
$albumview .= "<div class=\"albumWrapper2\" >";
}
$catquery = "select ".$pixelpost_db_prefix."pixelpost.id, ".$pixelpost_db_prefix."catassoc.id, image_id, cat_id, image from ".$pixelpost_db_prefix."catassoc, " .$pixelpost_db_prefix. "pixelpost where ((".$pixelpost_db_prefix."pixelpost.id = image_id) and (cat_id = ".$row['id'].") and (datetime<='$cdate')) ORDER BY datetime DESC LIMIT 1";
$catresults= mysql_query ($catquery);
while ($row1=mysql_fetch_array($catresults)) {
if ($num_rows > 0){
$albumview .= "<a href=\"index.php?x=browse&category=" . $row1['cat_id'] . "\"><img src=\"" . $thumbpath . "/thumb_" .$row1['image'] . "\" border=\"0\" alt=\" \" class=\"album-thumbnails\" /></a>";
}
}
if ($language_abr == $default_language_abr) {
if ($num_rows > 0){
$albumview .= "<div class=\"albumTitle\"><a href=\"index.php?x=browse&category=" . $row['id'] . "\">" . stripslashes($row['name']) . " <span class=\"number\">($num_rows)</span></a></div>";
}
} else {
if ($num_rows > 0){
$albumview .= "<div class=\"albumTitle\"><a href=\"index.php?x=browse&category=" . $row['id'] . "\">" . stripslashes($row['alt_name']) . " <span class=\"number\">($num_rows)</span></a></div>";
}
}
if ($num_rows > 0){
$albumview .= "</div>";
}
Currently this is only for <ALBUMVIEW> because this is all I need, above is line 45 to 67 so you can get an idea of my mod.