tongxin Chevereto Member Mar 31, 2018 #1 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.
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.
Rodolfo ⭐ Chevereto Godlike Chevereto Staff Administrator Mar 31, 2018 #2 Check the dashboard route source code, it uses the stats class so you can see it in action. Upvote 0 Downvote
tomsit Cheese Community Manager Apr 2, 2018 #3 I even think that it's an guide for it somewhere Upvote 0 Downvote
lovedigit 👽 Chevereto Freak Apr 2, 2018 #4 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. Upvote 0 Downvote
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.
Rodolfo ⭐ Chevereto Godlike Chevereto Staff Administrator Apr 2, 2018 #5 lovedigit said: 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. Click to expand... I'm afraid that such information is inaccurate as that code asumes the set/use of $stats variable. Code: $stats= CHV\Stat::getTotals(); Upvote 0 Downvote
lovedigit said: 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. Click to expand... I'm afraid that such information is inaccurate as that code asumes the set/use of $stats variable. Code: $stats= CHV\Stat::getTotals();
lovedigit 👽 Chevereto Freak Apr 3, 2018 #6 Rodolfo said: I'm afraid that such information is inaccurate as that code asumes the set/use of $stats variable. Code: $stats= CHV\Stat::getTotals(); Click to expand... 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? Upvote 0 Downvote
Rodolfo said: I'm afraid that such information is inaccurate as that code asumes the set/use of $stats variable. Code: $stats= CHV\Stat::getTotals(); Click to expand... 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?
Rodolfo ⭐ Chevereto Godlike Chevereto Staff Administrator Apr 3, 2018 #7 That's the implementation, is not better or worse. Upvote 0 Downvote