• 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

Display the image count on the homepage.

madlaxcb

Chevereto Member
https://madlax.pw/2025/05/483.html

Modify
Code:
/content/legacy/themes/Peafowl/views/index.php

Add use Chevereto\Legacy\Classes\Stat; in the header loading section.

Before the line <div class="home-buttons">, insert the following code,You can also modify the description content that needs to be displayed.:

PHP:
                <!-- 添加图片数量显示 -->
        <p class="c20 center-box text-align-center">
            <?php
            try {
                $totalImages = Stat::getTotals()['images'] ?? 0;
                echo _s('本站已存储图片数量(Total images uploaded): %d', $totalImages);
            } catch (Exception $e) {
                echo _s('Error retrieving image count.');
            }
            ?>
        </p>

The revised code is shown in the image below.

cqjZg.png
 
Of course, the same code can be used to show users, tags, etc.
 
Back
Top