插件名称:自定义内容页静态化文件名
适用版本:v9语言编码:GBK简体 UTF8简体插件作者:PHPCMS THE" TEAM版权所属:Lampbrother LIUBO支持网站:www.lampbrother.net插件介绍:自定义内容页静态化文件名,方法与 小博的不同,代码更简单更省,且只需要修改一个文件。适用版本号:ALL
$categorydir = $this->get_categorydir($catid);$catdir = $category['catdir'];$year = date('Y',$time);$month = date('m',$time);$day = date('d',$time);
/*******2013.05.08 mod by liubo@lampbrother.net*********/$content_db = pc_base::load_model('content_model');$content_data= $content_db->get_content($catid,$id);$prefixs = $content_data['perfix'];if(CHARSET != 'utf-8') {$prefixs = iconv('utf-8', CHARSET, $prefixs);} else {$prefixs = iconv('utf-8', 'gbk', $prefixs);}$content_db->set_catid($catid);/*******2013.05.08 mod by liubo@lampbrother.net*********/
$urls = str_replace(array('{$categorydir}','{$catdir}','{$year}','{$month}','{$day}','{$catid}','{$id}','{$page}'),
array($categorydir,$catdir,$year,$month,$day,$catid,$id,$page),$urlrule);
$urls = str_replace(array('{$categorydir}','{$catdir}','{$year}','{$month}','{$day}','{$catid}','{$id}','{$page}',
'{$prefix}'),array($categorydir,$catdir,$year,$month,$day,$catid,$id,$page,$prefixs),$urlrule);
if(CHARSET != 'utf-8') {$prefixs = iconv('utf-8', CHARSET, $prefixs);} else {$prefixs = iconv('utf-8', 'gbk', $prefixs);}
if(CHARSET == 'utf-8') {$prefixs = iconv('utf-8', 'gbk', $prefixs);} else {$prefixs = iconv('utf-8', CHARSET, $prefixs);}
下一篇:V9版实现浏览记录功能修改