summaryrefslogtreecommitdiff
path: root/single.php
diff options
context:
space:
mode:
authorEltrac Koalar <hi@guhub.cn>2022-08-23 15:12:12 +0800
committerEltrac Koalar <hi@guhub.cn>2022-08-23 15:12:12 +0800
commit91488d03815d43e9a270f240b2059d2744f5932e (patch)
tree053570535487f5cd1fd57a2e1a5a20b9d119335d /single.php
parentdd86fbd411a433ad0ec6ecdb820e84528125811f (diff)
:mag: Add: 初步实现文章阅览量统计
兼容大部分主题和插件,包括使用 viewsNum 作为表项名称的主题(如 VOID)
Diffstat (limited to 'single.php')
-rw-r--r--single.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/single.php b/single.php
index 977fe66..5ff218f 100644
--- a/single.php
+++ b/single.php
@@ -9,6 +9,7 @@
<ul class="post-meta post-meta-atpage">
<li><time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php echo Matcha::date($this->created); ?></time></li>
<li><?php $this->category(','); ?></li>
+ <li><?php echo '阅读 '.Matcha::views($this).' 次'; ?></li>
<?php if($this->user->hasLogin()):?>
<li><a href="<?php $this->options->adminUrl(); ?>write-post.php?cid=<?php echo $this->cid;?>" target="_blank" no-pjax>编辑</a></li>
<?php endif ?>