• 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

    • ⚠️ 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

How to add stats counter to login/homepage

JakeSully

πŸ‘½ Chevereto Freak
Hi,

I need help with adding live counter thingy thats from dashboard so it shows on index page/homepage total of images, albums, users, are on site. So when visitors visits then they can see how active site is.

I wouldn't mind a Ajax based counter as well so when some 1 currently uploads It will automatically update live to the visitors/members.

I hope some 1 here knows how to do this since I tired to but then it wouldn't show.
 
Copy index.php from app/themes/Peafowl/views to the overrides folder.

Edit the index.php in overrides and find this line
Code:
        <?php CHV\Render\show_banner('home_after_cta', (function_exists('get_list') ? get_list()->sfw : TRUE)); ?>

When you have located this line copy and paste this code on a new line above it.
Code:
        <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 Uploaded', $stats['images']); ?></span>
                </span>
            </div>
           <div id="powered-by" class="footer">Stats Counter by <a href="https://freeimage.host" rel="generator">Free image host</a> image hosting</div>
        </div>
 
Last edited:
I have this working...Thanks!

How would I go about changing the font, size and color?

<font face="verdana" size="3" color="gray"># # # # Uploaded</font></size>
 
Congratz!

I have this working...Thanks!

How would I go about changing the font, size and color?

<font face="verdana" size="3" color="gray"># # # # Uploaded</font></size>


You create a new class in your CSS (you remember custom css?) by adding your very special focker class.

Code:
.focker {
    font-family: veranda;
    font-size: 3px; /* THIS IS SMALL, LIKE WTF... UP THIS IF YOU CAN'T READ YOUR STATS */
    color: grey;

}

Then you open your index.php which you put in the overrides folder and replace the class


Chevereto original class:
Code:
<span class="stats-big-number">

focker class:
Code:
<span class="focker">


I think you are catching the drift on how to customize the text, so just try some stuff out and find your golden style.

If you want to change the texting just "CTRL+F" "Images Uploaded" (index.php)


You can also spin it around and have it say "Total images uploaded: 329857" by changing the order of the stats and text line and removing this line
Code:
<div class="stats-block c6 fluid-column display-inline-block">
 
Last edited:
I can't belive I did it...Thank You!.

Amazing right? There was no real guide on how to do this for "dummies", only bits of information here and there.. just figured the stats part out myself and I'm happy that it could help you out too, and hopefully others.
 
is there a way to add how many registered user as well and even make these ajax based so when a image is uploaded it shall automaticly count on uploads and new users?

P.s i know this is old topic now, but would like to add more stats and functions to counter πŸ™‚
 
User counters are available at the chv_users table itself. user_image_count, user_album_count.

Global stats counters are on chv_stats "total".
 
I have updated to v3.20 and this mod now seems to have scrollbar under it, anyone know how to fix?
Thanks
 

Attachments

  • Screenshot 2021-07-07 at 19.27.21.png
    Screenshot 2021-07-07 at 19.27.21.png
    42.2 KB · Views: 28
  • Screenshot 2021-07-07 at 19.27.28.png
    Screenshot 2021-07-07 at 19.27.28.png
    40.2 KB · Views: 28
I have updated to v3.20 and this mod now seems to have scrollbar under it, anyone know how to fix?
Thanks
Change the code as follows.
<div class="overflow-auto text-align-center">
<?php $stats = CHV\Stat::getTotals(); ?>
<div class="display-inline-block margin-10">
<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>
 
It would be great if she added the statistics live and there is a solution for this, but I don't know, I did a lot of research but I couldn't find it πŸ™
 
Back
Top