Copyright 2013-2014 All Rights Reserved Theme by www.tbwwir.cn 版權所有
AB模板網(www.tbwwir.cn)專注企業網站模板制作,包括企業pbootcms網站模板,靜態網頁模板,網站源碼下載,HTML網站模板等等。XML地圖 網站地圖 今日更新
免責聲明:本站所有資源(模板、圖片)搜集整理于互聯網或者網友提供,僅供學習與交流使用,如果不小心侵犯到你的權益,請及時聯系我們刪除該資源。
隨著越來越多的站長開始重視seo了,對rel="nofollow"也在乎得多了。但是由于百度編輯器ueditor并不自帶rel="nofollow"功能,在引入其他站點URL鏈接的時候,就會導致蜘蛛流失,自己的網站權重下降。
今天AB模板網整理了一下,來教大家怎么改,讓ueditor的link自帶rel="nofollow"標簽,話不多說,直接上圖。
1、找到/core/extend/ueditor/dialogs/link/link.html,修改第81行。
修改成:
'href' : href, 'target' : $G("target").checked ? "_blank" : '_self', 'title' : $G("title").value.replace(/^\s+|\s+$/g, ''), '_href':href |
'href' : href, 'target' : $G("target").checked ? "_blank" : '_self', 'title' : $G("title").value.replace(/^\s+|\s+$/g, ''), 'rel': 'nofollow', '_href':href |
2、找到/core/extend/ueditor/ueditor.config.js,修改第370行。
a: ['target', 'href', 'title', 'class', 'style','name','id'], abbr: ['title', 'class', 'style'], abbr: ['title', 'class', 'style'], area: ['shape', 'coords', 'href', 'alt'], |
修改成:
a: ['target', 'href', 'title', 'class', 'style','name','rel','id'], abbr: ['title', 'class', 'style'], abbr: ['title', 'class', 'style'], area: ['shape', 'coords', 'href', 'alt'], |
上述兩個文件修改好就可以實現rel="nofollow"了,網站后臺測試添加鏈接,測試成功,演示圖如下。