Z-blogPHP adds an edit button visible only to the administrator on the article details page

在文章详情页添加一个编辑按钮的好处自然不用多数,管理员在查看自己网站时,如果发现哪篇文章需要修改,可以直接点击编辑按钮进入编辑页面。

If there is no edit button, you need to go to the backend of the website-article key, search for the wrong article, and then enter edit and modify.

相比之下,肯定是有编辑按钮最为方便,且这个按钮只有管理员登录后可见,其他人是看不到的!

需要添加的代码如下:

{if $user.Level<=1}<a href="{$host}zb_system/admin/edit.php?act=ArticleEdt&id={$article.ID}" target="_blank" class="ArticleEdt" title="仅管理员登录网站后台后可见的编辑按钮">编辑</a>{/if}

同时你需要在css代码中给这个编辑按钮添加样式:

image.png

t like3

Link to this article:https://en.finchui.com/zblog-course/20.html

netizens commented

guess you like

hot commodity
popular articles
hot Tags
related tags
FinchUI Store Edition Hong Kong Special Area

share

copy Link

Xinglan Studioadd friends

Working hours: 9:00-22:00
Saturday and Sunday: 14:00-22:00
wechat
Scan the code to add customer service WeChat