• 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

Does anyone has a script to show the amount of GB's used on homepage?

Louca

Chevereto Member
Hello,
Title said it all, and if not could anyone tell me how to make one?
Thanks!
 
This is part of the "Override" section in the documentation: https://v3-docs.chevereto.com/customization/theme.html#theme-overrides

1. Check your installation folder for /app/themes/Peafowl/overrides/views/, this should be empty in a default installation.
2. Now you have to copy the file /app/themes/Peafowl/views/index.php in the folder /app/themes/Peafowl/overrides/views/
3. After that, you customize the copied file /app/themes/Peafowl/overrides/views/index.php and look for the following row:
PHP:
<?php CHV\Render\show_banner('home_after_cta', (function_exists('get_list') ? get_list()->sfw : true)); ?>
4. Now you have to add the following code above these row:
PHP:
    <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($stats['disk_used']); ?> <span><?php echo G\format_bytes($stats['disk_unit']); ?></span></strong>
          <span class="label"><?php _se('Disk used'); ?></span>
        </div>
      </div>
    </div>
5. Click save and reload your page.

6. For some styling properties you can add two file in /app/themes/Peafowl/custom_hooks/
6.1. At first add the file style.css and write the following code:
CSS:
#index .stats-block {background-color: rgba(0, 0, 0, 0.4); border-radius: 2px; border: 1px solid rgba(0, 0, 0, 0.6);}
#index .stats-big-number .number {font-size:25px;}
#home-cover-content {text-shadow: 1px 2px 1px rgba(0, 0, 0, 0.5);}
6.2. Second, add a file style.min.css and copy following code:
CSS:
#index .stats-block{background-color:rgba(0,0,0,0.4);border-radius:2px;border:1px solid rgba(0,0,0,0.6);}#index .stats-big-number .number{font-size:25px;}#home-cover-content{text-shadow:1px 2px 1px rgba(0,0,0,0.5);}
6.3. Save these files and reload your page..
 
Does this work for v4? It does not look like /apps/themes exists in v4.
No. Any customization guide made for Chevereto V3 won't work with Chevereto V4 as the latter changed file locations, namespaces and several method names.
 
Back
Top