DEDECMS織夢內容管理系統默認的是採用全拼來做欄目名稱,但是對於一些命名很長的朋友全拼就會顯得非常長,不僅難看,而且對於優化來說是冗長。以下就是在系統中更改php文件,使默認全拼更改成爲首字母縮寫的命名方法。(該方法收集於網絡,已經測試了,可以)
找到dede/catalog.add.php文件,並且打開進行修改。
85行
1 $toptypedir = GetPinyin(stripslashes($toptypename));
修改爲
1 $toptypedir = GetPinyin(stripslashes($toptypename),1);
108 行
1 $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v));
修改爲
1 $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v),1);
134行
1 $toptypedir = GetPinyin(stripslashes($toptypename));
修改爲
1 $toptypedir = GetPinyin(stripslashes($toptypename),1);
187行
1 $typedir = GetPinyin(stripslashes($typename));
修改爲
找到dede/catalog.add.php文件,並且打開進行修改。
85行
1 $toptypedir = GetPinyin(stripslashes($toptypename));
修改爲
1 $toptypedir = GetPinyin(stripslashes($toptypename),1);
108 行
1 $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v));
修改爲
1 $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v),1);
134行
1 $toptypedir = GetPinyin(stripslashes($toptypename));
修改爲
1 $toptypedir = GetPinyin(stripslashes($toptypename),1);
187行
1 $typedir = GetPinyin(stripslashes($typename));
修改爲
1 $typedir = GetPinyin(stripslashes($typename),1);