首页 vps [ 编辑 ]

Cuteen主题添加编辑按钮


/usr/themes/Cuteen 目录中,打开 post.php 文件,将代码添加到第23行下方,也就是下面的代码后面

</svg><?= $this->category == null ? "未分类" : $this->category(); ?></span>
</header>

添加

#登录之后显示
<div style="text-align:right"><?php $currGroup = get_object_vars($this->user) ['row']['group'];if ($currGroup == "administrator"): ?>
[
<a href="<?php $this->options->adminUrl('write-post.php?cid=' . $this->cid ); ?>">编辑</a>
]
<?php endif; ?></div>
#不登陆就可以显示
<div style="text-align:right">
        [
        <a href="<?php $this->options->adminUrl('write-post.php?cid=' . $this->cid ); ?>">编辑</a>
        ]
</div>


文章评论