From 0d1875937ecd3288c4a4b2d3a2a953be0921fccc Mon Sep 17 00:00:00 2001 From: Eltrac <45323514+BigCoke233@users.noreply.github.com> Date: Wed, 22 Jan 2020 12:53:11 +0800 Subject: =?UTF-8?q?=F0=9F=93=A9=20Add:=20=E8=AF=84=E8=AE=BA=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=87=AA=E5=AE=9A=E4=B9=89=E9=9A=90=E8=97=8F=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=88=E6=A0=B7=E5=BC=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 2 ++ includes/comments.php | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index 85b0afc..d8e80b0 100644 --- a/functions.php +++ b/functions.php @@ -35,6 +35,8 @@ function themeFields(Typecho_Widget_Helper_Layout $layout) { $layout->addItem($excerpt); $meta = new Typecho_Widget_Helper_Form_Element_Text('meta', NULL, NULL,_t('元信息'), _t('页面/文章内页会显示该页面的评论数和创建日期(元信息),如果你不需要,可以写一段文字来代替这些内容。')); $layout->addItem($meta); + $commentShow = new Typecho_Widget_Helper_Form_Element_Select('commentShow',array('0'=>'显示','1'=>'隐藏'),'0','是否显示评论列表'); + $layout->addItem($commentShow); } /** diff --git a/includes/comments.php b/includes/comments.php index 4a0baff..721c4cf 100644 --- a/includes/comments.php +++ b/includes/comments.php @@ -45,10 +45,11 @@ echo $commentClass;
commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?>
- have()): ?> + have())://如果有评论 则显示 ?>