washun 2006-10-21 09:37
如何只有登陆后才能看到文章显示下面的"编辑"[已解决]
我在 b_article-multi.html和b_article-single.html的文章显示下面都加了编辑,实现了不登陆后台即可编辑.
<a href="<#ZC_BLOG_HOST#>cmd.asp?act=ArticleEdt&type=fckeditor&id=<#article/id#>"><#ZC_MSG078#></a>
但是,“编辑”两个字不仅我能看到,而且一般访客都能看到,因此他们很喜欢点这个,每次都出现没有权限。
请问,如何让一般访客看不到,只有我自己才能看到。请教。
[[i] 本帖最后由 washun 于 2006-11-17 21:37 编辑 [/i]]
washun 2006-10-23 10:50
有没有高手指导一下,谢谢!
seag 2006-10-23 13:08
为什么连我都不能看到编辑呢
我只能去后台编辑
月上之木 2006-10-23 19:34
<script>
if(GetCookie("inpName")=="[color=red]管理员用户名[/color]"){
document.write("<a href=\"<#ZC_BLOG_HOST#>cmd.asp?act=ArticleEdt&type=fckeditor&id=<#article/id#>\"><#ZC_MSG078#></a>")
}
</script>
[color=#ff0000]管理员用户名[/color] 改成自己的
这样大概可以做到只有管理员才能看到编辑二字了
washun 2006-10-23 22:43
我按你的方法试过了,不行啊,编辑两个字都不见了。
zx.asd 2006-10-24 20:46
是这样的
<script>
if(GetCookie("password")!==""){
document.write("<a href=\"<#ZC_BLOG_HOST#>cmd.asp?act=ArticleEdt&type=fckeditor&id=<#article/id#>\"><#ZC_MSG078#></a>")
}
</script>
washun 2006-10-27 12:46
我试了一下 还不对阿
我就是用这段代码替换<a href="<#ZC_BLOG_HOST#>cmd.asp?act=ArticleEdt&type=fckeditor&id=<#article/id#>"><#ZC_MSG078#></a>
然后重建文件和索引 退出登陆 刷新了一下 还是能看到编辑两个字
wxw 2006-10-28 01:43
<script>if(GetCookie("password")){document.write("<a href=\"../cmd.asp?act=ArticleEdt&id=<#article/id#>\" rel=\"nofollow\">编辑文章</a>")}</script><a href="../cmd.asp?act=ArticleEdt&id=<#article/id#>" rel="nofollow">编辑文章</a>
见[url]http://www.56kg.com/public[/url]
的效果
washun 2006-10-28 11:59
我试了一下 还不对阿
我就是用这段代码替换<a href="<#ZC_BLOG_HOST#>cmd.asp?act=ArticleEdt&type=fckeditor&id=<#article/id#>"><#ZC_MSG078#></a>
然后重建文件和索引 退出登陆 刷新了一下 还是能看到[b]编辑文章[/b]个字,点[b]编辑文章[/b]仍然出现权限不足。登陆后竟然看到两个[b]编辑文章[/b]
我的意思是这样的效果:没有登陆就看不到“编辑”,只有登陆了才能看到。
[[i] 本帖最后由 washun 于 2006-10-28 12:00 编辑 [/i]]
washun 2006-10-31 09:28
其他高手有没有办法?
freesky 2006-11-6 23:33
<script>
if(GetCookie("password")){
document.write("<a href=\"<#ZC_BLOG_HOST#>cmd.asp?act=ArticleEdt&id=<#article/id#>\" /><#ZC_MSG078#></a> | ")}</script>
[[i] 本帖最后由 freesky 于 2006-11-6 23:41 编辑 [/i]]
washun 2006-11-7 17:20
freesky的方法是对的!!谢谢!:victory:
asongzhang 2007-3-5 06:51
做个记号,好
washun 2007-7-30 16:38
请大家按照11楼的方法
效果图
[[i] 本帖最后由 washun 于 2007-7-30 17:19 编辑 [/i]]
birder 2007-7-30 17:16
果然是这样的效果,另外,版主,不好意思,连我这层现在只盖到15楼,16楼方法在哪?
zihaow 2007-7-30 17:17
记号!
birder 2007-7-30 17:33
版主,按11楼方法,我的后台,左侧,不能显示admin的导航条了,你的是不是这样,有什么方法解决?
能不能把你的b_article-multi.html代码贴出来看看
washun 2007-7-30 18:18
效果和你的一样 我没解决办法
Z-blog模板结构都一样 要看代码不用我来邀请吧
birder 2007-7-31 11:22
就这样了,大致实现了管理登陆显示编辑。主要遗憾是,主框架无法显示,重建索引,还需要重新进入管理。哪位有能力,完善一下吧。
<script>
if(GetCookie("password")){
document.write(" | <a href=\"<#ZC_BLOG_HOST#>cmd.asp?act=ArticleEdt&type=fckeditor&id=<#article/id#>\" /><#ZC_MSG078#></a>")}</script>
这个是使用FCK来编辑文章的代码。
Jude 2007-8-2 10:45
非常好,我加了target="_blank"
<script>
if(GetCookie("password")){
document.write(" <a href=\"<#ZC_BLOG_HOST#>cmd.asp?act=ArticleEdt&type=fckeditor&id=<#article/id#>\" target="_blank"/><#ZC_MSG078#></a>")}</script>
leafor 2008-1-14 16:36
测试成功,:victory: 楼上的都辛苦啦。
[url]http://leafor.com/[/url]欢迎路过
googleah 2008-4-4 10:59
我也去试试 看来都是高手 人多力量大啊
老寒 2008-6-1 15:07
第一次看到Washun还会有提问题的时候。估计那时候他也刚来这里;P
页:
[1]