织梦CMS文章标题页显示路径为“标题拼音.html”,例如:文章标题为:文章标题,文章路径显示:wenzhangbiaoti.html的方法。
进入网站栏目管理,修改栏目的高级选项,文章命名规则:{typedir}/{Y}{M}{D}/{aid}.html修改为:{typedir}/{pinyin}.html
更新一下文档,wenzhangbiaoti_1.html 出来了,但是后面还多了个_aid,怎么去掉这个呢?
修改文件:include/helpers/channelunit.helper.php在大约194多行的地方找到
$articleRule = str_replace("{pinyin}",GetPinyin($title)."_".$aid,$articleRule);
把."_".$aid去掉,就可以了!
修改文件: include/inc/inc_fun_funAdmin.php
for ($i = 0; $i < $slen; $i++) {
if (ord($str[$i]) > 0x80) {
$c = $str[$i].$str[$i + 1];
$i++;
if (isset($pinyins[$c])) {
if ($ishead == 0) $restr. = $pinyins[$c]."-";
else $restr. = $pinyins[$c][0];
} else $restr. = "_";
} else if (eregi("[a-