• 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

Get the number of picture code

tongxin

Chevereto Member
How can I get the number of web pages? For example, there are 1000 pictures, how to write, the site has saved 1000 pictures, how to write the code, thank you.
 
Use this code where you want to show total image hosted on your website publicly.
Code:
<h4>Proudly hosting <?php echo $stats['images'] > 999999 ? $stats['images'] : number_format($stats['images']); ?> images</h4>

If you just want to check the statistics, it is in dashboard.
 
Use this code where you want to show total image hosted on your website publicly.
Code:
<h4>Proudly hosting <?php echo $stats['images'] > 999999 ? $stats['images'] : number_format($stats['images']); ?> images</h4>

If you just want to check the statistics, it is in dashboard.

I'm afraid that such information is inaccurate as that code asumes the set/use of $stats variable.

Code:
$stats= CHV\Stat::getTotals();
 
I'm afraid that such information is inaccurate as that code asumes the set/use of $stats variable.

Code:
$stats= CHV\Stat::getTotals();

Code:
<?php
$stats = CHV\Stat::getTotals();
echo $stats['images'] > 999999 ? $stats['images'] : number_format($stats['images']); // Will output the total n° images
?>

This is perhaps a better implementation?
 
Back
Top