如果你设置了 type='top' ,那么 channel 标签会忽略 typeid 设置的。
如果你要获取 type='top' 并且 typeid='1,2,3,4' 的话,那么你只能修改 channel 标签的实现,或者自己写一个。
下面是我提供给你的改法,你可以参考下。
修改后, type='top' 并且 typeid='1,2,3:top' 提供 :top 是为了兼容之前的标签。
else
{
if(preg_match('/((?:\d+,?)+):top$/', $typeid, $matche))
{
$typeid = $matche[1];
$reid = 0;
$topid = 0;
}
else
{
$row2 = $dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$typeid' ");
$typeid = $row2['id'];
$reid = $row2['reid'];
$topid = $row2['topid'];
}
$issetInfos = true;
}
if($type=='' || $type=='sun') $type='son';
if($innertext=='') $innertext = GetSysTemplets("channel_list.htm");
if($type=='top')
{
if(strpos($typeid, ',') === false)
{
$sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
From `#@__arctype` WHERE reid=0 And ishidden1 order by sortrank asc limit 0, $line ";
}
else
{
$sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
From `#@__arctype` WHERE typeid in ($typeid) And ishidden1 order by sortrank asc limit 0, $line ";
}
}