今天有空升级了chevereto到新版本4.08,顺便把以前一些V3的改造也搬过来

一、增加顶部导航条导航链接
FwY4f.png
V3
修改/app/themes/Peafowl/header.php

<li class="phone-hide pop-btn top-btn-el pop-btn-delayed">
<a target="_blank" href="https://madlax.pw/" class="top-btn-text"><span class="icon fas fa-home"></span><span class="btn-text phone-hide phablet-hide">博客</span></a>
</li>
//插入到以下代码前,可以插入多个
                    <?php if (is_upload_enabled()

V4
修改/content/legacy/themes/Peafowl/header.php

<li class="phone-hide pop-btn top-btn-el pop-btn-delayed">
<a target="_blank" href="https://madlax.pw/" class="top-btn-text"><span class="icon fas fa-home"></span><span class="btn-text phone-hide phablet-hide">博客</span></a>
</li>
//插入到以下代码前,可以插入多个
            <?php if (Handler::cond('upload_enabled'))

二、增加首页显示图片数量
V3
修改/app/themes/Peafowl/views/index.php

('Upload and share your images.'); ?></h1>
//插入到以上代码后
<h1>本站共托管 <?php
$stats = CHV\Stat::getTotals();
echo $stats['images'] > 999999 ? $stats['images'] : number_format($stats['images']); // Will output the total n° images
?> 张图片</h1>

V4
修改/content/legacy/themes/Peafowl/views/index.php
和V3有变化,我不懂PHP,期待其他大佬提供,仪表板对应代码在
/content/legacy/themes/Peafowl/views/dashboard/stats.php

<?php echo Handler::var('totals')['images'] > 999999 ? Handler::var('totals_display')['images'] : number_format((float) Handler::var('totals')['images']); ?>

三、SMTP发送邮件暗抄
Fwv20.png
因为我自己的邮件服务器SMTP发送无记录,不知道SMTP发过哪些邮件,所以改造发送时暗抄一份给自己留档。
V3
修改/www/wwwroot/imglink.org/app/lib/functions.php
V4
修改/www/wwwroot/imglink.org/app/src/Legacy/functions.php

$mail->Password = getSettings()['email_smtp_server_password'];
//在以上代码后添加 
$mail->AddBCC("BCC@abc.com","BCC@abc.com");

四、仪表板去除新闻
FwuuL.png
V3
修改/www/wwwroot/imglink.org/app/themes/Peafowl/views/dashboard.php
V4
修改/www/wwwroot/imglink.org/content/legacy/themes/Peafowl/views/dashboard/stats.php
删除<div class="header header-tabs no-select">和<div class="card-wrapper margin-bottom-40">这两段代码

五、顶部导航条透明化,去模糊
V3参见以前发的[1]chevereto顶部导航条透明化,去模糊
转载请注明出处,多谢。