POST TIME:2017-11-30 16:50
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%" >
以上代碼對應/dede/templets/login.html部分,刪除之,并修改login.htm底部版權聲明部分。
然后再順手修改標題部分代碼:
為:
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,找到如下代碼:
} else if ($dopost=='showauth') {
include('templets/index_body_showauth.htm'); exit;
} else if ($dopost=='showad') {
include('templets/index_body_showad.htm'); 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;
刪除以上 文字保存下 ,織夢鏈就消失了。