catpos本来就是用来获取栏目路径的,专题不属于栏目。下面是我改的代码,觉得可以的话就拿去吧function catpos($catid, $symbol=' > '){
$category_arr = array();
$siteids = getcache('category_content','commons');
$siteid = $siteids[$catid];
$category_arr = getcache('category_content_'.$siteid,'commons');
if(!isset($category_arr[$catid])) {
$db = pc_base::load_model('module_model');
$info = $db->get_one('`module`=\''.$_GET['m'].'\'');
return $info['name'].' ';
}
$pos = '';
$siteurl = siteurl($category_arr[$catid]['siteid']);
$arrparentid = array_filter(explode(',', $category_arr[$catid]['arrparentid'].','.$catid));
foreach($arrparentid as $catid) {
$url = $category_arr[$catid]['url'];
if(strpos($url, '://') === false) $url = $siteurl.$url;
$pos .= '<a href="'.$url.'">'.$category_arr[$catid]['catname'].'</a>'.$symbol;
}
return $pos;
}
$category_arr = array();
$siteids = getcache('category_content','commons');
$siteid = $siteids[$catid];
$category_arr = getcache('category_content_'.$siteid,'commons');
if(!isset($category_arr[$catid])) {
$db = pc_base::load_model('module_model');
$info = $db->get_one('`module`=\''.$_GET['m'].'\'');
return $info['name'].' ';
}
$pos = '';
$siteurl = siteurl($category_arr[$catid]['siteid']);
$arrparentid = array_filter(explode(',', $category_arr[$catid]['arrparentid'].','.$catid));
foreach($arrparentid as $catid) {
$url = $category_arr[$catid]['url'];
if(strpos($url, '://') === false) $url = $siteurl.$url;
$pos .= '<a href="'.$url.'">'.$category_arr[$catid]['catname'].'</a>'.$symbol;
}
return $pos;
}
$category_arr = array();
$siteids = getcache('category_content','commons');
$siteid = $siteids[$catid];
$category_arr = getcache('category_content_'.$siteid,'commons');
if(!isset($category_arr[$catid])) return '';
$pos = '';
$siteurl = siteurl($category_arr[$catid]['siteid']);
$arrparentid = array_filter(explode(',', $category_arr[$catid]['arrparentid'].','.$catid));
foreach($arrparentid as $catid) {
$url = $category_arr[$catid]['url'];
if(strpos($url, '://') === false) $url = $siteurl.$url;
$pos .= '<a href="'.$url.'">'.$category_arr[$catid]['catname'].'</a>'.$symbol;
}
return $pos;
}这是PHPCMS的源码,请楼主注意打脸。
既然楼主天资聪慧,改哪了我就不说了。
第一次一次性回复三条,用在楼主这种人身上真尼玛浪费..
对于楼主你的回复:
1、是global.func.php,第一次打脸
2、这论坛都是神人,我只是个用了PHPCMS三个多月的鸟人。
3、我尊重PHPCMS开发团队,但我不尊重你。
4、请楼主理解,我指的是改,并非原创,请不要断章取义。
5、楼主你眼瞎,多了几行代码也看不出来。
6、楼主你眼瞎啊