POST TIME:2020-03-31 12:03
織夢程序默認(rèn)添加欄目的時(shí)候使用拼音默認(rèn)的中文全拼,當(dāng)遇到欄目名稱比較長的時(shí)候目錄名稱看起來有點(diǎn)冗長,我們有時(shí)候?yàn)榱朔奖阒苯犹顚憴谀棵Q,文件保存目錄的欄目拼音我們都是默認(rèn)的,懶得修改的話欄目拼寫長的話就好難看,這時(shí)候大多數(shù)站長喜歡使用拼音首字母作為欄目的保存目錄。那么怎么讓他自動(dòng)保存為欄目拼音的首字母為目錄呢?這就需要修改程序文件了。
首先找到dede/catalog.add.php文件
85行 $toptypedir = GetPinyin(stripslashes($toptypename));
修改為 $toptypedir = GetPinyin(stripslashes($toptypename),1);
108 行 $typedir = $toptypedir.’/’.GetPinyin(stripslashes($v));
修改為 $typedir = $toptypedir.’/’.GetPinyin(stripslashes($v),1);
134行 $toptypedir = GetPinyin(stripslashes($toptypename));
修改為 $toptypedir = GetPinyin(stripslashes($toptypename),1);
187行 $typedir = GetPinyin(stripslashes($typename));
修改為 $typedir = GetPinyin(stripslashes($typename),1);
修改完成后趕快保存后添加幾個(gè)欄目頁測試吧,是不是已經(jīng)搞定了欄目拼音首字母命名呢?
如果大家還有什么好的織夢秘訣的話,分享出來!