增加评论区公告

This commit is contained in:
Skywt2003 2021-11-11 23:35:42 +08:00
parent d00ac7e205
commit 7426090c48
2 changed files with 12 additions and 0 deletions

View File

@ -63,6 +63,15 @@
<!-- 评论提交区域 -->
<?php if ($this->allow('comment')): ?>
<hr>
<?php if ($this->options->comments_noti !='') { ?>
<div class="alert alert-primary alert-dismissible fade show shadow" role="alert">
<span class="alert-inner--icon"><i class="fas fa-exclamation-circle"></i></span>
<span class="alert-inner--text"><?php $this->options->comments_noti(); ?></span>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<?php } ?>
<div id="<?php $this->respondId(); ?>" class="respond">
<div>
<?php $comments->cancelReply('<i class="fa fa-window-close"></i> 取消回复'); ?>

View File

@ -21,6 +21,9 @@ function themeConfig($form) {
$notificationIcon = new Typecho_Widget_Helper_Form_Element_Text('notificationIcon', NULL, NULL, _t('网站公告图标'), _t('显示在首页网站公告信息框前的 FontAwesome 图标代码,留空则不显示'));
$form->addInput($notificationIcon);
$comments_noti = new Typecho_Widget_Helper_Form_Element_Text('comments_noti', NULL, NULL, _t('评论区公告'), _t('显示在评论区,留空则不显示'));
$form->addInput($comments_noti);
$bottomLinks = new Typecho_Widget_Helper_Form_Element_Text('bottomLinks', NULL, NULL, _t('底部链接'), _t('(需要配合<a href="http://www.imhan.com/archives/typecho-links/" target="_blank">友情链接插件</a>使用)网站底部的链接分类名称'));
$form->addInput($bottomLinks);