纯净主题的几个东西的备份
一,关于新增分页模板的include.php修改,纯净主题每加个自定义模板如haowu,则改之
function tpure_DefaultTemplate(&$template) { global $zbp; if($template->GetTags('type') == 'index' && $template->GetTags('page') != '1'){ switch($zbp->Config('tpure')->PostINDEXSTYLE){ case "1": $template->SetTemplate('forum'); break; case "2": $template->SetTemplate('album'); break; case "3": $template->SetTemplate('sticker'); break; case "4": $template->SetTemplate('hotspot'); break; case "5": $template->SetTemplate('haowu'); break; default: $template->SetTemplate('catalog'); } } if(($template->GetTags('type') == 'category' && $template->GetTags('category')->Template != 'forum' && $template->GetTags('category')->Template != 'album' && $template->GetTags('category')->Template != 'sticker' && $template->GetTags('category')->Template != 'hotspot' && $template->GetTags('category')->Template != 'haowu') || ($template->GetTags('type') == 'tag' && $template->GetTags('tag')->Template != 'forum' && $template->GetTags('tag')->Template != 'album' && $template->GetTags('tag')->Template != 'sticker' && $template->GetTags('tag')->Template != 'hotspot' && $template->GetTags('tag')->Template != 'haowu') || $template->GetTags('type') == 'date'){ $template->SetTemplate('catalog'); } if($template->GetTags('type') == 'author' && $template->GetTags('author')->Template != 'catalog' && $template->GetTags('author')->Template != 'forum' && $template->GetTags('author')->Template != 'album' && $template->GetTags('author')->Template != 'sticker' && $template->GetTags('author')->Template != 'hotspot' && $template->GetTags('author')->Template != 'haowu'){ $template->SetTemplate('author'); } }
第二部分
function tpure_JudgeListTemplate($listtype) { global $zbp; $listtype = $zbp->Config('tpure')->PostSEARCHSTYLE; switch($listtype) { case 1: $template = 'forum'; break; case 2: $template = 'album'; break; case 3: $template = 'sticker'; break; case 4: $template = 'hotspot'; break; case 5: $template = 'haowu'; break; default: $template = ''; } return $template; }
二,由于纯净主题的IP归属地数据库不太理想,所以用的插件替代,如
<div class="cmtsname">{if $comment.Author.HomePage}<a href="{$comment.Author.HomePage}" rel="nofollow" target="_blank">{$comment.Author.StaticName}</a>{else}{$comment.Author.StaticName}{/if}{if $comment.Author.ID >= 59 && $comment.Author.ID <= 95} <i class="bi bi-robot"></i> {/if}{if $zbp->Config('tpure')->PostCMTIPON == '1'}<em>IP:{tpure_ipLocation($comment.IP)}</em>{/if} <em>{$comment.CommentUA['browser']['title']}</em> <em>{$comment.CommentUA['platform']['title']}</em></div>
三,评论处添加自定义提示,如commentpost.php,comment.php等
<textarea name="txaArticle" id="txaArticle" rows="3" tabindex="1" placeholder="请输入您的评论。点击“评论”按钮后,如果信息无误会自动刷新页面,即评论成功。因为缓存、CDN等因素,新评论将延时展示,并不能第一时间看到自己的评论。"></textarea>
四,纯净主题的文章页面在新版本的略缩图不可用,上传自定义略缩图无效,保存文章直接500;
五,纯净主题的文章页面的音乐播放与修改后的模板某些地方js冲突,只能优先使用拓源的mp3插件;
六,纯净主题暂不支持PHP8.*,故每次更新需要覆盖plugin/phpmailer;
七,每次更新要注意footer.php内版权信息的更新。
其他需要注意的地方
右侧的作者统计,数字展示已经更改
https://www.dao.js.cn/new/2025020511594.shtml
暂时没有任何办法强制评论邮箱、网址、用户名均为必填,故如下
https://www.dao.js.cn/new/2024092011436.shtml
文章页面新增的ai摘要,每次升级需注意添加
https://www.dao.js.cn/new/2024121611540.shtml
文章页面新增的时间因子,每次升级需要注意添加