很荣幸能够使用SnapicPlus主题 (付费就是好主题 /啊这
主题地址:Free Typecho theme by Snapic - 立云图志 (lopwon.com)
在这里跟大家说一下如何修改PHP文件及样式吧(忘了当时怎么改的了,淦)

效果预览

后台选项
非日间主题 地址:https://g.imashen.cn
日间主题

视频功能使用了CkinPlayer开源的视频播放插件,👍赞

开工

在主题functions.php文件中的25行左右开始,修改为图中代码

$infoBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('infoBlock',
array(
'ChangeColor' => _t('日间主题'),
'ShowTime' => _t('显示时间'),
'ShowAuthor' => _t('显示作者'),
'ShowExcerpt' => _t('显示摘要'),
'ShowCategory' => _t('显示分类'),
'ShowSearch' => _t('显示搜索'),
'ShowICP' => _t('显示备案'),
'ShowPoster' => _t('显示广告')),
array('ShowTitle', 'ShowTime', 'ChangeColor', 'ShowExcerpt', 'ShowCategory', 'ShowSearch', 'ShowICP', 'ShowPoster'),_t('显示设置'));
$form->addInput($infoBlock->multiMode());

随后修改index.php中的代码,大概在84行左右的位置

<?php if (!empty($this->options->infoBlock) && in_array('ShowTime', $this->options->infoBlock)): ?>
<p class="snapic-time"><?php $this->date('Y-m-d'); ?><?php if (!empty($this->options->infoBlock) && in_array('ShowAuthor', $this->options->infoBlock)): ?><a href="改成你的网址" style="float:right"><?php  echo the_author_meta('user_nicename');?></a><?php endif; ?></p>
<?php endif; ?>
<?php if (!empty($this->options->infoBlock) && in_array('ChangeColor', $this->options->infoBlock)): ?>
<style>
body{background:#fff;color:#fff;}.snapic-title,.snapic-time,.snapic-text{color:#ffffff !important;}a{color:#ffffff !important}.grid .grid__item,.grid .grid__sizer{background:#63b4acbd;}.grid .grid__item:hover,.grid .grid__sizer:hover{background:#ff919180 !important;}.fancybox-overlay{background:#63b4acbd;}.loading::before {background: #fff;}
</style>
<?php endif; ?>
<?php if (!empty($this->options->infoBlock) && in_array('ShowExcerpt', $this->options->infoBlock)): ?>
<p class="snapic-text"><?php $this->excerpt(255, '......'); ?></p>
<?php endif; ?>

其次修改style.css中的些许css至自己想要的状态,此处可能涉及一内内的代码版权问题,不对外公开了,如有需要协助,请在下方留言
或添加微信:TaylorLottner

完工

到此已经完成对于SnapicPlus一点儿额外功能的增加了,下面还有一内内的神奇东东

视频功能

1.在header.php中最下方</head>标签上方,<link>引入ckin.css
2.在footer.php中最下方</body>标签上方,<script>引入ckin.js
CkinPlayer项目地址:Ckin — Custom HTML5 Video Player Skins.

图片外链

SnapicPlus主题在文章中不支持使用 ![]() 的Markdown语法插入图片来显示,仅能通过上传附件来显示图片,这就给小水管服务器或者想外链托管/OSS用户造成了不便,可以通过以下的修改来使文章支持URL外链

在主题的functions.php中找到63行至78行 (如图所标)

然后删除它!!! 替换为以下代码

function support_url_pic($content) {
   preg_match_all("/\<img.*?src\=\"(.*?)\"[^>]*>/i", $content, $theurl);
   $img_src = $theurl[1];
   return $img_src;
}

再在主题的index.php中找到86 行至 95 行

然后删除它!!! 替换为以下代码

<?php
$funcpicurl = support_url_pic($this->content);
foreach ($funcpicurl as $picurl) {
    echo '<div class="pic-'.$this->cid.'"><a class="grid__link fancybox-buttons" href="'.$picurl.'" data-fancybox-group="gallery-'.$this->cid.'"><img class="lazy grid__img" src="/usr/themes/SnapicPlus/img/loading.gif" data-original="'.$picurl.'" /></a></div>';
}
?>

然后你就完成了哟~~~

缩略图

你可以在fuctions.php中修改获取图片外链的代码,通过正则函数和preg_replace实现缩略图功能