• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • 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