来个效果图:
嗯开始魔改
通用版本
这里 Win11 会显示成 Win10
CSS
# 更换图床域名,修改部分图标,添加Apple图表亮暗适配 (26.3.6)
# 更换图床
<style> #backtop {padding: 0.75em 1em;}
.google-auto-placed {display: none; }
.biaoqing.quyin {margin-bottom: -.3125rem;min-height: 3.25rem;height: 1em}
.ua-icon {display: inline-block;width: 1pc;height: 1pc;background-size: cover;background-repeat: no-repeat;vertical-align: text-top}
.icon-360 {background-image: url(https://smms-vip3.see.you/2025/04/18/glvkt5GDaJAxm94.webp)}
.icon-android {background-image: url(https://smms-vip3.see.you/2025/04/18/EyC7KfBert2F4Hj.png);height: 19px}
body.dark-mode .icon-apple {background-image: url(https://i.see.you/2026/03/06/8Aev/9aaedb74b842663706bf72aaed233974.png)}
.icon-apple {background-image: url(https://i.see.you/2026/03/06/ze7Q/61c6203a8a0a210a0843dc720900b8bb.png)}
.icon-baidu {background-image: url(https://smms-vip3.see.you/2025/04/18/8TuikAsv7Wew23z.webp)}
.icon-chrome {background-image: url(https://smms-vip3.see.you/2025/04/18/5T3GztAfElIYX8n.png)}
.icon-edge {background-image: url(https://smms-vip3.see.you/2025/04/18/eHd9wPoKnDlF6b5.png)}
.icon-firefox {background-image: url(https://smms-vip3.see.you/2025/04/18/t2eYbVEz9R6Tirg.png)}
.icon-google {background-image: url(https://smms-vip3.see.you/2025/04/18/5T3GztAfElIYX8n.png)}
.icon-ie {background-image: url(https://smms-vip3.see.you/2025/04/18/2ZEPeTV4KR9JibO.webp)}
.icon-liebao {background-image: url(https://smms-vip3.see.you/2025/04/18/nuKkAxUL3DFP9Tl.webp)}
.icon-linux {background-image: url(https://smms-vip3.see.you/2025/04/18/m3F1pIvyNkGg8uK.png)}
body.dark-mode .icon-mac {background-image: url(https://i.see.you/2026/03/06/8Aev/9aaedb74b842663706bf72aaed233974.png)}
.icon-mac {background-image: url(https://i.see.you/2026/03/06/ze7Q/61c6203a8a0a210a0843dc720900b8bb.png)}
.icon-opera {background-image: url(https://smms-vip3.see.you/2025/04/18/Q3UfOu7rhVZTsWm.png)}
.icon-qq {background-image: url(https://smms-vip3.see.you/2025/04/18/b1K5MmkonDhzIEP.png)}
.icon-quark {background-image: url(https://smms-vip3.see.you/2025/04/18/MYmzENFPid9ZIv3.webp)}
.icon-safari {background-image: url(https://smms-vip3.see.you/2025/04/18/8WK3vhUoRQOcu1H.png)}
.icon-ubuntu {background-image: url(https://i.see.you/2026/03/06/zaA3/2d62668e3f90b96f6c567aca60fe5d4b.png)}
.icon-uc {background-image: url(https://smms-vip3.see.you/2025/04/18/XDrLxyj16iz5WS7.png)}
.icon-win1 {background-image: url(https://smms-vip3.see.you/2025/04/18/qAHMKlO5FSI498W.png)}
.icon-win2 {background-image: url(https://smms-vip3.see.you/2025/04/18/4oLSAva6Du8tJsi.png)}
.icon-telegram {background-image: url(https://smms-vip3.see.you/2026/02/05/geyqVbm9kIKMTQY.png)}
</style>PHP
加到 /usr/themes/Mirages/function.php 最后即可
# 针对PHP8.1+做了适配
function getOs($agent) {
$os = false;
if (preg_match('/win/i', $agent)) {
if (preg_match('/nt 6.0/i', $agent)) {
$os = 'Windows Vista';
} else if (preg_match('/nt 6.1/i', $agent)) {
$os = 'Windows 7';
} else if (preg_match('/nt 6.2/i', $agent)) {
$os = 'Windows 8';
} else if (preg_match('/nt 6.3/i', $agent)) {
$os = 'Windows 8.1';
} else if (preg_match('/nt 5.1/i', $agent)) {
$os = 'Windows XP';
} else if (preg_match('/nt 10.0/i', $agent)) {
$os = 'Windows 10';
} else {
$os = 'Windows X64';
}
} else if (preg_match('/android/i', $agent)) {
if (preg_match('/android 9/i', $agent)) {
$os = 'Android Pie';
} else if (preg_match('/android 8/i', $agent)) {
$os = 'Android Oreo';
} else {
$os = 'Android';
}
} else if (preg_match('/ubuntu/i', $agent)) {
$os = 'Ubuntu';
} else if (preg_match('/linux/i', $agent)) {
$os = 'Linux';
} else if (preg_match('/iPhone/i', $agent)) {
$os = 'iPhone';
} else if (preg_match('/mac/i', $agent)) {
$os = 'MacOS';
} else if (preg_match('/fusion/i', $agent)) {
$os = 'Android';
} else {
$os = 'Linux';
}
echo $os;
}HTML 输出
先找到需要修改的文件位置
如果版本为 1.2.0, 则为 /usr/themes/Mirages/lib/comments_1.2.php 中 (373 行左后)
如果是旧版本, 则为 /usr/themes/Mirages/lib/comments.php 中 (122 行 zuo'you)
搜索 ClassName: comment-author
找到对应的 div, 如:
<div
class="comment-author"
itemprop="creator"
itemscope
itemtype="http://schema.org/Person">
<?php $this->outputAvatar($singleCommentOptions->avatarSize,
$singleCommentOptions->defaultAvatar); ?>
<cite class="fn color-main" itemprop="name"
><?php $singleCommentOptions->beforeAuthor(); $this->author();
$singleCommentOptions->afterAuthor(); ?></cite>在最后加上如下代码 (所有版本通用):
<?php getOs($this->agent); ?>
<?php getBrowser($this->agent); ?>
像这样:
<div
class="comment-author"
itemprop="creator"
itemscope
itemtype="http://schema.org/Person">
<?php $this->outputAvatar($singleCommentOptions->avatarSize,
$singleCommentOptions->defaultAvatar); ?>
<cite class="fn color-main" itemprop="name"
><?php $singleCommentOptions->beforeAuthor(); $this->author();
$singleCommentOptions->afterAuthor(); ?></cite>
<span class="comment-ua">
<?php getOs($this->agent); ?>
<?php getBrowser($this->agent); ?>
</span>