A5下载文章资讯

分类分类

dedecms教程:新建栏目以汉字首字母命名目录名称

2015-09-28 17:00作者:fang

在使用dede(织梦)程序的时候,dede默认使用拼音为保存目录的时候使用的是中文全拼,当栏目名称特别长的时候,就特别长,写路径的时候十分麻烦, 而且对优化不好,我们需要尽量把路径写短一点,文件夹的名称当然也是短一点的好。所以需要修改下,改成首字母组合就好了,这样既方便记住,也能缩短目录的 名字长度。

修改过程如下:

修改: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);

以上就就是本文章的内容,希望对你们有所帮忙。

展开全部

相关

说两句网友评论
    我要跟贴
    取消