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]: Total Filesize  (Read 2827 times)

0 Members and 1 Guest are viewing this topic.

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
[Solved]: Total Filesize
« on: February 19, 2008, 10:51:18 am »

I have recently lost the whole of my site and moved to a new host.

Now I'm trying to the same as what I originally asked for in this thread >> http://forum.coppermine-gallery.net/index.php?topic=41174.0

Nibbler helped and it worked a treat but for some reason I cannot get it to work now.

On my home Laptop it shows the info I want:

Code: [Select]
Total Covers: 903 Total GB: 0
but on my Work system it shows the following:

Code: [Select]
903 files in [albums] albums and [cat] categories with [comments] comments viewed [views] times
Here's the code from my index.php file:

Code: [Select]
        $sql = "SELECT sum(hits), sum(total_filesize) FROM {$CONFIG['TABLE_PICTURES']} as p " . 'LEFT JOIN ' . $CONFIG['TABLE_ALBUMS'] . ' as a ' . 'ON p.aid=a.aid ' . 'WHERE 1' . $pic_filter;
        $result = cpg_db_query($sql);
        $nbEnr = mysql_fetch_array($result);
        $hit_count = (int)$nbEnr[0];
        $total_filesize = (int)$nbEnr[1];
        mysql_free_result($result);

        if (count($cat_data)) {
            $statistics = strtr($lang_list_categories['stat1'], array('[pictures]' => $picture_count,
                    '[total_filesize]' => round($total_filesize/1024/1024/1024, 0)
                    ));
        } else {
            $STATS_IN_ALB_LIST = true;
            $statistics = strtr($lang_list_categories['stat3'], array('[pictures]' => $picture_count,
                    '[albums]' => $album_count,
                    '[comments]' => $comment_count,
                    '[views]' => $hit_count));
        }

Here's my code from my English lang file:

Code: [Select]
$lang_list_categories = array(
  'home' => 'Home',
  'stat1' => '<b>Total Covers:</b> [pictures] <b>Total GB:</b> [total_filesize]GB',
);

Would be great if someone can help me out on where I've gone wrong

Thanks ;D
« Last Edit: February 21, 2008, 05:35:43 pm by Joachim Müller »
Logged

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: Total Filesize
« Reply #1 on: February 20, 2008, 10:30:25 pm »

No help on this then ???
Logged

Nibbler

  • Guest
Re: Total Filesize
« Reply #2 on: February 20, 2008, 11:00:41 pm »

Did you edit the right lang file? Post a link.
Logged

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: Total Filesize
« Reply #3 on: February 21, 2008, 01:29:56 am »

I must of as it show ok on my Home system but different on my work system, take a look see if you get what I get at work >> http://cdcoverhideout.com/covers ;D
Logged

Nibbler

  • Guest
Re: Total Filesize
« Reply #4 on: February 21, 2008, 01:55:56 am »

Right. You made your edits to english.php . If you use a browser set to another language (eg. British English) you won't see the change since that's a different lang file. Either change all lang files or delete all except english.php to make it (US) english only.
Logged

will

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 263
Re: Total Filesize
« Reply #5 on: February 21, 2008, 10:20:17 am »

Thanks worked great, Thanks ;)
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 20 queries.