dedecms 5.1 utf-8版本英文修改方法
2024-07-12 08:51:51
供稿:網(wǎng)友
 
						本修改經(jīng)過多次測試在 大部分國外空間都安裝正常。 
如果不會(huì)修改的,請下載我提供的dedecms5.1UTF-8英文版本 文章模塊。已經(jīng)修改好的下載地址:dedecms5.1-utf-8英文修改版本。 
這次修改的主要部分: 
1.文章翻頁的英文化 
2.生成文章地址去掉文章數(shù)據(jù)ID 
3.改掉DEDECMS的提示窗口 改成英文。 
4.更改轉(zhuǎn)向提示為英文 
5.搜索顯示該成英文提示 
6.頁面的meta設(shè)置 
1.翻頁的英文化 
include/inc_archives_view.php 
include/inc_arclist_view.php 
include/inc_arcsearch_view.php 
下的修改主要是針對 文章列表頁面 內(nèi)容翻頁 搜索頁面翻譯的 英文化。 
依次用記事本打開以上三文件。 
我們先打開include/inc_archives_view.php 
依次找到 
//獲取上一篇,下一篇鏈接 
//獲得動(dòng)態(tài)頁面分頁列表 
//獲得靜態(tài)頁面分頁列表 
這三處,把這三處下面出現(xiàn)的中文改成英文 
打開include/inc_arclist_view.php 
依次找到 
//獲取靜態(tài)的分頁列表 
//獲取動(dòng)態(tài)的分頁列表 
這兩處,把這兩處下面出現(xiàn)的中文改成英文 
打開include/inc_arcsearch_view.php 
依次找到 
//獲取動(dòng)態(tài)的分頁列表 
這一處,把這一處下面出現(xiàn)的中文改成英文 
2.生成文章地址去掉文章數(shù)字ID 
用記事本打開 include/inc_channel_unit_function.php 
找到 
$articleRule = str_replace("{pinyin}",GetPinyin($title)."_".$aid,$articleRule); 
改成 
$articleRule = str_replace("{pinyin}",GetPinyin($title),$articleRule); 
簡單的說就是去掉 ."_".$aid 
然后在后臺(tái)把 欄目的 高級選項(xiàng)里 
文章命名規(guī)則:{typedir}/{pinyin}.html 
3.改掉DEDECMS的提示窗口 改成英文。 
這個(gè)必須用Dreamweaver編輯,不能用記事本編輯否則會(huì)出現(xiàn)后臺(tái)空白的情況! 
用Dreamweaver打開include/inc_functions.php 
找到 ShowMsg 然后往下看。依次找到: 
DedeCms 系統(tǒng)提示 
DedeCms 提示信息: 
如果你的瀏覽器沒反應(yīng),請點(diǎn)擊這里... 
對應(yīng)修改成 
DedeCms Message 
DedeCms Message: 
If your browser is no response, please click here ... 
4.更改轉(zhuǎn)向提示為英文 
用記事本打開 include/jump.html 
依次找到: 
正在轉(zhuǎn)向: 請稍候... 
內(nèi)容簡介: 
TO: 
對應(yīng)修改成 
TO: 
Are turning to: Please wait ... 
Brief Introduction: 
5.搜索顯示該成英文提示 
用記事本打開 plus/search.php 
依次找到: 
服務(wù)器忙,請稍后搜索 
你的關(guān)鍵詞輸入不合法! 
你的信息中存在非法內(nèi)容,被系統(tǒng)禁止![返回] 
關(guān)鍵字長度必須要3-30字節(jié)之間! 
對應(yīng)修改成 
Server is busy,please search later 
You do not legally enter the keywords! 
Your information in the illegal content,the system was prohibited! [Back] 
Keyword length must be between 3-30 bytes! 
6.頁面的mate設(shè)置 
這個(gè)主要是做摸板的時(shí)候注意不要掉了meta,這樣每個(gè)頁面的MATE信息都不一樣。 
首頁和列表頁面的meta可以自己在后臺(tái)設(shè)置。而內(nèi)容頁面的MATE是根據(jù)內(nèi)容自動(dòng)截取的。 
首頁meta 
<meta name="keywords" content="{dede:global name='cfg_keywords'/},dedecms"> 
<meta name="description" content="{dede:global name='cfg_description'/}dedecms"> 
列表頁面meta 
<meta name="keywords" content="{dede:field name='keywords'/}"> 
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}"> 
內(nèi)容頁面meta 
<meta name="keywords" content="{dede:field name='keywords'/}"> 
<meta name="description" content="{dede:field name='description' function='html2text(@me)'/}">