Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: [Solved]: Number of Categories in statistics is wrong  (Read 2690 times)

0 Members and 1 Guest are viewing this topic.

Colliope

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 126
[Solved]: Number of Categories in statistics is wrong
« 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

« Last Edit: December 10, 2008, 03:48:20 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Number of Categories in statistics is wrong
« Reply #1 on: December 05, 2008, 04:58:13 pm »

Post a link to your gallery.
Logged

Colliope

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 126
Re: Number of Categories in statistics is wrong
« Reply #2 on: December 06, 2008, 02:14:04 pm »

keangenes.com/cpg143
User: TestUser
PW: Temp123

After I created this TestUser account, the number of categories showing increased to 22.
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Number of Categories in statistics is wrong
« Reply #3 on: December 06, 2008, 02:28:31 pm »

Upgrade! If the problems persist, come back and post again.

Upgrade it's not optional but mandadory!
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Colliope

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Female
  • Posts: 126
Re: Number of Categories in statistics is wrong
« Reply #4 on: December 07, 2008, 05:46:10 pm »

Sigh. If I can't get any help here without updating I guess I have no choice but to deal with the hassle.
Logged

Fabricio Ferrero

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 1996
  • From San Juan, Argentina, to the World!
    • http://fabricioferrero.com/
Re: Number of Categories in statistics is wrong
« Reply #5 on: December 07, 2008, 06:57:58 pm »

You are running too many version behind, more than 10. So, it's so probably when you update you're issue goes away. ;)
Logged
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: Number of Categories in statistics is wrong
« Reply #6 on: December 07, 2008, 07:19:49 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Number of Categories in statistics is wrong
« Reply #7 on: December 10, 2008, 03:38:24 pm »

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:
Code: [Select]
        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!
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.