forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Colliope on December 05, 2008, 04:54:27 pm
-
I've just noticed that the number of categories shown in the statistics on my main page is wrong.
It says there are 21 categories but I've only got 3 categories (no subcategories in them).
Perhap this number includes categories that have been deleted?
Is it possible to correct this number?
Thanks,
C
-
Post a link to your gallery.
-
keangenes.com/cpg143
User: TestUser
PW: Temp123
After I created this TestUser account, the number of categories showing increased to 22.
-
Upgrade! If the problems persist, come back and post again.
Upgrade it's not optional but mandadory!
-
Sigh. If I can't get any help here without updating I guess I have no choice but to deal with the hassle.
-
You are running too many version behind, more than 10. So, it's so probably when you update you're issue goes away. ;)
-
Sigh all you want but there is no support on versions older then the current stable one. So please do so and report back with your findings.
-
I had a look at the code on Colliope's website. This "problem" is caused by a mod, which counts the categories and the number of users:
if ($CONFIG["user_gal_as_root"]) {
$result = cpg_db_query("SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$totalCats = $nbEnr[0];
$result = cpg_db_query("SELECT count(*) FROM {$CONFIG['TABLE_USERS']} WHERE 1");
$nbEnr = mysql_fetch_array($result);
$totalUsers = $nbEnr[0];
$cat_count = $totalCats - $HIDE_USER_CAT - 1 + $totalUsers;
mysql_free_result($result);
} else {
$sql = "SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1";
$result = cpg_db_query($sql);
$nbEnr = mysql_fetch_array($result);
$cat_count = $nbEnr[0] - $HIDE_USER_CAT;
mysql_free_result($result);
}
FYI: It seems that this mod (user_gal_as_root) displays the user galleries like public root categories. That's why the calculation of the categorie statistics was modded.
I corrected the issue. Solved!