织梦CMS去广告方法 for DedeCMS V5.7

DedeCms 5.7新版发布,下来上传至服务器安装完毕,点击进入后台登陆界面,怎么多了广告链,而且登陆界面也变了,以前可不带这样的啊。按步骤一步一步来去版权再去广告吧。

  一,去处后台登陆页login.php广告链。

  1,查看html源文件,找到广告部分代码如下:

  < div class ="dede-iframe" >

< iframe name ="loginad" src ="login.php?dopost=showad" frameborder ="0" id ="loginad" scrolling ="no" marginwidth ="0" marginheight ="0" width ="100%" > </ iframe >
  </ div>

  以上代码对应/dede/templets/login.html部分,删除之,并修改login.htm底部版权声明部分。
  然后再顺手修改标题部分代码:
  <title><?php echo $cfg_softname." ".$cfg_version; ?></title>
  为:
  <title><?php echo $cfg_webname; ?> - 后台管理登陆</title>
  2,仔细分析发现“login.php?dopost=showad ”对应的是login.php第42到46行部分代码,去掉这部分代码即可:
  if ($dopost=='showad'){
  include('templets/login_ad.htm');
  exit;
  }

  并且还要删除对应的"/dede/templets/login_ad.htm"模板文件,这个文件是多余的,官方加的广告链部分。
  PS:网上很多类似教程都没有这一步哈。只是取消调用并没有真正删除。
  3,去处登陆或者操作成功提示跳转页信息“Dede CMS 提示信息!”include/common.func.php 182和215行共两处。

  二,去除后台登陆后默认首页广告
  1,主要是去掉两部分:文字链广告和开发团队声明。
  打开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;
  }
  ?>
  删除删除模板目录里对应的模板文件“index_body_showad.htm”和“index_body_showauth.htm”。
  2,修改模板index_body.htm,涉及修改内容为:标题部分/广告链部分/开发团队部分等,此处省略具体步骤。
  3,后台顶部版权信息及链接主要修改index_top2.htm和index2.htm两个模板文件。

       4,右栏细节部分去处DedeCMS主要涉及3个模板文件:sys_data.htm/sys_info_mark.htm/sys_info.htm。

  5,去掉左栏“系统帮助”,修改模板文件为:/dede/inc/inc_menu.php

  =================================================================================
  至此,基本全部完成后台去广告链和版权操作,简洁清爽的dedecms5.7后台界面呈现在我们面前。 

       ======================================================================

织梦5.7版本的版权信息对于之前的版本,相对增加了一个版权信息,就是在友情链接上增加的友链的版权和一些网站的广告。因此现在需要更改19个文件,才能彻底去除织梦的版权。

首先,我们先列出去除模板里的版权文件。

1.搜索页面:

/templets/default/search.htm

/templets/plus/heightsearch.htm

/templets/default/advancedsearch.htm

2.通用底部模板:

/templets/default/footer.htm

3.购物车:

/templets/plus/car.htm

/templets/plus/carbuyaction.htm

/templets/plus/shops_action_payment.htm

/templets/plus/shops_buyaction.htm

4.下载地址列表

/templets/plus/download_links_templet.htm

5.挑错页面

/templets/plus/erraddsave.htm

6.友情链接

/templets/plus/flink-add.htm

/templets/plus/flink-list.htm

7.列表模板

/templets/plus/list_diyform.htm

8.留言板

/templets/plus/plus_foot.htm

/templets/plus/guestbook-admin.htm

/templets/plus/guestbook-user.htm

9.发布模板

/templets/plus/post_diyform.htm

10.推荐

/templets/plus/recommend.htm

11.RSS订阅地图

/templets/plus/rssmap.htm

12银行账号信息

/templets/plus/shops_bank.htm

13.图集详细页面

/templets/plus/showphoto.htm

14.网站地图

/templets/plus/sitemap.htm

15.详细内容

/templets/plus/view_diyform.htm

16.提示信息

/templets/plus/view_msg.htm

/templets/plus/view_msg_catalog.htm

17.投票结果

/templets/plus/vote.htm

其次,就是提示信息的版权,修改为自己网站的版权。

/include/common.func.php

最后,就是去除新增加的友链版权。

首先找到根目录下的 include/taglib/flinktype.lib.php 文件

然后打开找到,如下代码

$dedecms = false;

$dedecms->id = 999;

$dedecms->typename = ‘织梦链’;

if($type == ‘dedecms’) $row[] = $dedecms;

删除以上 文字保存下 ,织梦链就消失了。

清风明月本无价,近水远山皆有情。
原文地址:https://www.cnblogs.com/onlylove2015/p/4393608.html