[织梦CMS]织梦新建栏目自动使用拼音首字母做栏目名称教程

deegao  于 2020-5-30 16:03:36 回帖奖励 |阅读模式
0 2726
Dedecms织梦程序默认使用拼音为保存目录的时候使用的是中文全拼,当遇到栏目名称比较长的时候目录名称看起来有点冗长,这时候大多数站长喜欢使用拼音首字母作为栏目的保存目录,那么就需要修改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);
这样就完成了织梦栏目自动用拼音首字母自动命名

| 0 人收藏
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
回复

使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    • 售后服务
    • 关注我们
    • 社区新手

    QQ|Archiver|手机版|小黑屋|德高网络.  

    Powered by Discuz! X3.2  © 2001-2018 Comsenz Inc.