dedecms让likearticle的mytypeid支持多个栏目ID。
打开文件:\include\taglib\likearticle.lib.php,找到:
<span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:14px;">if( !empty($typeid) && !preg_match('#,#', $typeid) ) {
$typeid = GetSonIds($typeid);
}</span></span>
在【下面】加上代码:
//dedecms让likearticle的mytypeid支持多个栏目ID https://www.360muye.cn/
<span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:14px;">else
{
$typeids = explode(',', $typeid);
foreach($typeids as $ttid) {
$typeidss[] = GetSonIds($ttid);
}
$typeidStr = join(',', $typeidss);
$typeidss = explode(',', $typeidStr);
$typeidssok = array_unique($typeidss);
$typeid = join(',', $typeidssok);
}
</span></span>
至此织梦的likearticle中的mytypeid就可以支持多个栏目ID了。