diff options
| author | Eltrac Koalar <hi@guhub.cn> | 2022-08-23 15:12:12 +0800 |
|---|---|---|
| committer | Eltrac Koalar <hi@guhub.cn> | 2022-08-23 15:12:12 +0800 |
| commit | 91488d03815d43e9a270f240b2059d2744f5932e (patch) | |
| tree | 053570535487f5cd1fd57a2e1a5a20b9d119335d /single.php | |
| parent | dd86fbd411a433ad0ec6ecdb820e84528125811f (diff) | |
:mag: Add: 初步实现文章阅览量统计
兼容大部分主题和插件,包括使用 viewsNum 作为表项名称的主题(如 VOID)
Diffstat (limited to 'single.php')
| -rw-r--r-- | single.php | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 ?> |
