首页 > CMS建站 > 织梦DEDE > 正文

dedecms 5.7 后台广告及版权去除

2020-04-03 23:12:00
字体:
来源:转载
供稿:网友
新版的织梦dedecms 5.7 版本在后台登陆的时候,以及登陆之后的页面,都留了广告的位置。原则上对我们影响不大,但是细想一下,一旦dedecms的广告服务器被攻陷,广告位的位置被挂上了马,后果可想而知。于是想到去掉它。下面开始行动。
 
一、去除后台登陆页面广告。
 
1、用记事本打开/dede/templets/login.htm文件,找到以下代码并删除。
 
<div><iframe name="loginad" src="login.php?dopost=showad" frameborder="0" id="loginad" scrolling="no" marginwidth="0" marginheight="0" width="100%"></iframe></div>
以上代码是后台登陆框下方的广告。
 
<div>Powered by<a href="http://www.dedecms.com" title="DedeCMS官网"><strong>DedeCMS<?php echo $cfg_version; ?></strong></a>&copy; 2004-2011 <a href="http://www.desdev.cn" target="_blank">DesDev</a> Inc.</div>
</div>
以上代码是版权声明部分,也可以直接删除的。然后再顺手修改标题部分代码:
 
<title><?php echo $cfg_softname." ".$cfg_version; ?></title>
修改为:
 
<title><?php echo $cfg_webname; ?> - 后台管理登陆</title>    最终效果为:网站名称 - 后台管理登陆
2、打开/dede/login.php 文件,找到第42到46行部分代码,将其去掉即可。
 
if ($dopost=='showad')
{
    include('templets/login_ad.htm');
    exit;
}
并且还要删除对应的”/dede/templets/login_ad.htm”模板文件,这个文件是多余的,官方加的广告链部分。
 
二、去除后台登陆后默认首页广告
 
主要去掉的部分为:赞助商链接,开发团队,商业授权查询
 
1、打开/dede/index_body.php,在文件最末尾处找到如下代码:
 
<?php
exit;
} else if ($dopost=='showauth')
{
    include('templets/index_body_showauth.htm');
    exit;
} else if ($dopost=='showad')
{
    include('templets/index_body_showad.htm');
    exit;
}
?>
修改为:
 
<?php
exit;
}
?>
然后,删除/dede/templets/index_body_showauth.htm  和  /dede/templets/index_body_showad.htm  文件即可。
 
2、打开/dede/templets/index_body.htm,删除如下代码:
 
<dl class='dbox' id="item8">
            <dt class='lside'><div class='l'>赞助商链接(<a href="http://ad.dedecms.com/ad/" target="_blank">说明</a>)</div></dt>
            <dd>
                <iframe name="showad" src="index_body.php?dopost=showad" frameborder="0" width="100%" id="showad" frameborder="0" scrolling="no"  marginheight="5"></iframe>
            </dd>
        </dl><!--赞助商链接结束-->
以上是 赞助商链接的广告
 
        <dl class='dbox' id="item5">
            <dt class='lside'><div class='l'>开发团队</div></dt>
            <dd class='intable'>
                <table width="98%">
                    <tr>
                        <td width='25%' height='36' class='nline' style="text-align:right"> 主程序开发: </td>
                        <td class='nline' style="text-align:left">天涯、IT柏拉图、沙羡、蓝色随想、Niap、木匠、cha369</td>
                    </tr>
                    <tr>
                        <td height='36' class='nline' style="text-align:right">界面及交互设计:</td>
                        <td class='nline' style="text-align:left">、like、猪头心宇、方域、小王</td>
                    </tr>
                    <tr>
                        <td height='36' class='nline' style="text-align:right">官方论坛协助:</td>
                        <td class='nline' style="text-align:left">感谢以下站长(排名不分先后):疯狂的锤子、木木/阿杰</td>
                    </tr>
                </table>
            </dd>
        </dl><!--开发团队结束-->
以上是开发团队介绍信息。
 
        <dl class='dbox' id="item2">
            <dt class='lside'><span class='l'>商业授权查询</span></dt>
            <dd>              
                <iframe name="showauth" src="index_body.php?dopost=showauth" width="100%" frameborder="0" scrolling="no" marginwidth="10" marginheight="10" id="showauth"></iframe>               
            </dd>
        </dl><!--更新消息结束-->
以上是商业授权查询模块。
 
3、后台顶部版权信息及链接主要修改/dede/templets/index_top2.htm 和 /dede/templets/index2.htm 两个模板文件。
 
4、去掉左栏“系统帮助”,修改模板文件为:/dede/inc/inc_menu.php
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表