ga('set', 'anonymizeIp', 1);
Categories: 运维

chevereto V3和V4的改造

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

一、增加顶部导航条导航链接

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发送邮件暗抄

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

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

四、仪表板去除新闻

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顶部导航条透明化,去模糊
转载请注明出处,多谢。

madlaxcb

Recent Posts

解决WIN10显示器重启后分辨率变低窗口乱跳问题

  最近换了显示器,当有事离开…

2月 ago

宝塔开启堡塔防入侵会导致Chevereto的Cron运行失败

昨晚给服务器搬迁,新服务器装了…

7月 ago

win11开启bbr2

powershell: net…

1年 ago

OVH使用API安装发行版内核的系统(关于API,IPXE,RAID等)

OVH的新面板提供的系统模板比…

2年 ago