垃圾站 Discuz教程 如何去掉Discuz论坛版权链接、防水墙链接、Archiver、搜索页面版权链接

如何去掉Discuz论坛版权链接、防水墙链接、Archiver、搜索页面版权链接

每次去爱战网查询自己论坛的友情链接时,看到那句“首页无本站链接”心里就觉得别扭,特别是discuz论坛,一下子居然有3个这种单向链接,真是忍无可忍啊!可又不知到怎么删掉那些链接,十分的苦恼,不过这个问题总算被垃圾站解决了,下面就看看教程吧!

如何去掉Discuz论坛版权链接、防水墙链接、Archiver、搜索页面版权链接插图

首先:去掉底部防水墙链接的方法→

FTP登陆网址根目录,查找source\plugin\security里面security.class.php文件,使用Dreamwever打开security.class.php搜索以下代码(大概在代码91行,不同的DZ版本不同):

[php]
function global_footerlink() {
return '&nbsp;<a href="http://discuz.qq.com/service/security" target="_blank" title="'.lang('plugin/security', 'title').'"><img src="static/image/common/security.png"></a>';
}
[/php]

如果想直接去掉链接则替换为以下代码:

[php]
function global_footerlink() {
return '&nbsp;<img src="static/image/common/security.png"></a>';
}
[/php]

(实际上是删除这段代码即可<a href="http://discuz.qq.com/service/security" target="_blank" title="'.lang('plugin/security', 'title').'">):

当然也可保留链接而加上nofollow标签:

[php]
function global_footerlink() {
return ' <a title="'.lang('plugin/security', 'title').'" href="http://discuz.qq.com/service/security"rel="nofollow" target="_blank"><img src="static/image/common/security.png" alt="" /></a>';
}
[/php]

第二:去掉底部版权Powered by Discuz! X2.5、© 2009-2012 Comsenz Inc.处链接→
打开根目录下template\default\common 找到footer.htm文件,用deamweaver打开,点击编辑,再点击查找和替换powerd by Discuz! 知道相应的位置修改底部版权的相应内容,找到以下代码:

[php]
<p>Powered by <strong><a href="http://www.discuz.net" target="_blank">Discuz!</a></strong> <em>$_G['setting']['version']</em><!--{if !empty($_G['setting']['boardlicensed'])}--> <a href="http://license.comsenz.com/?pid=1&host=$_SERVER[HTTP_HOST]" target="_blank">Licensed</a><!--{/if}--></p>
<p class="xs0">&copy; 2001-2012 <a href="http://www.comsenz.com" target="_blank">Comsenz Inc.</a></p>
[/php]

并删除代码中的:
(1)<a href="http://www.discuz.net" target="_blank">
(2)<a href="http://license.comsenz.com/?pid=1&host=$_SERVER[HTTP_HOST]" target="_blank">
(3)<a href="http://www.comsenz.com" target="_blank">
这三段代码就可去掉底部链接!

第三:去掉Archiver页面的版权链接→
查找以下代码:

[php]
Powered by <strong><a target="_blank" href="http://www.discuz.net">Discuz! <?php echo $_G['setting']['version']; ?> Archiver</a></strong> &nbsp; &copy 2001-2012 <a target="_blank" href="http://www.comsenz.com">Comsenz Inc.
[/php]

删除\source\archiver\common\footer.php文件中超链接代码<a target="_blank" href="http://www.discuz.net">即可:

第四:删除搜索页面的版权链接→

在根目录template/default/search/footer.htm找到以下代码:

[php]
<em>Powered by <strong><a href="http://www.discuz.net" target="_blank">Discuz!</a></strong> <em>$_G['setting']['version']</em><!--{if !empty($_G['setting']['boardlicensed'])}--> <a href="http://license.comsenz.com/?pid=1&host=$_SERVER[HTTP_HOST]" target="_blank">Licensed</a><!--{/if}--></em> &nbsp;
<em>&copy; 2001-2012 <a href="http://www.comsenz.com" target="_blank">Comsenz Inc.</a>
[/php]

删除超链接代码即可……

当然如果不想删除以上的这些DZ论坛超链接,也可保留链接而加上nofollow标签,方法同文章中加粗红字标注的方法一致!

本文由垃圾站编辑整理,版权所有,转载请保留原文链接!

上一篇
下一篇
联系我们

联系我们

返回顶部