View Single Post
  #1   IP: 49.87.40.201
Old 2014-03-16, 10:05 AM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default 定制文章标题

文章标题计划用3部分组成, 如 USA Patent 788778244 Cheap Eyeglasses Online,

788778244是专利号, Cheap Eyeglasses Online是专利标题,USA Patent 是外加的短语, 同时用生成文章的url.

如何让DEDE生成这样的标题呢?

进入目录dede,打开article_add.php. 将
Code:
$title = preg_replace("#\"#", '"', $title);
    $title = htmlspecialchars(cn_substrR($title,$cfg_title_maxlen));
移到
Code:
$filename = trim(cn_substrR($filename,40));
下边
再在
Code:
$filename = trim(cn_substrR($filename,40));
下边加上一行:
Code:
$title = "USA Patent ".$filename." ".$title;
Reply With Quote