• 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.
    • We recommend purchasing a Chevereto license to participate in this community.
    • Purchase a Community Subscription to get even faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

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 😡😳
I am not familiar with PHP Frameworks.
----------------------------------------------------------
Damn, i got it.. πŸ˜ŽπŸ˜€

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