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);