• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

Statistics Home page ?

How can i get the stats in the right form like the dashboard? Especially the disk usaged.
PHP:
$stats = CHV\Stat::getTotals();
/*
[users] => 1
[images] => 16
[albums] => 2
[image_views] => 17
[likes] => 0
[disk_used] => 18774631
*/
echo $stats['images']; // Will output the total # images

This is how i get the stats for the homepage, but i liked to see it in e.g. 5.5 GB and not in 54625452

Thanks for your help
 
Okay, i don't get it. I found the function but i don't really know what i should do.
 
Well, i think its to much for me. This is my Code, whats wrong ...
HTML:
<div class="overflow-auto text-align-center margin-top-20">
            <?php $stats = CHV\Stat::getTotals(); ?>
            <div class="stats-block c6 fluid-column display-inline-block">
                <span class="stats-big-number">
                    <strong class="number"><?php echo $stats['images'] > 999999 ? $stats['images'] : number_format($stats['images']); ?></strong>
                    <span class="label"><?php _ne('Image', 'Images', $stats['images']); ?></span>
                </span>
            </div>
            <div class="stats-block c6 fluid-column display-inline-block">
                <span class="stats-big-number">
                    <strong class="number"><?php echo $stats['albums'] > 999999 ? $stats['albums'] : number_format($stats['albums']); ?></strong>
                    <span class="label"><?php _ne('Album', 'Albums', $stats['albums']); ?></span>
                </span>
            </div>
            <div class="stats-block c6 fluid-column display-inline-block">
                <div class="stats-big-number">
                    <strong class="number"><?php echo G\format_bytes($bytes, $stats['disk_used']); ?> <span><?php echo $stats['disk_unit']; ?></span></strong>
                    <span class="label"><?php _se('Disk used'); ?></span>
                </div>
            </div>
        </div>
 
It's me, again... :(

Anyone who can help with the storage stats? I don't get the hint from @Rodolfo o_O:oops:
I am not familiar with PHP Frameworks.
----------------------------------------------------------
Damn, i got it.. :cool::D

It should look like:
PHP:
<div class="stats-block c6 fluid-column display-inline-block">
          <div class="stats-big-number">
          <strong class="number"><?php echo G\format_bytes($stats['disk_used']); ?> <span><?php echo G\format_bytes($stats['disk_unit']); ?></span></strong>
           <span class="label"><?php _se('Disk used'); ?></span>
           </div>
 </div>
 
Last edited:
Back
Top