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了。
博客介绍了让DedeCMS的likearticle的mytypeid支持多个栏目ID的方法,通过打开文件\\include\\taglib\\likearticle.lib.php,在指定位置添加代码来实现。
636

被折叠的 条评论
为什么被折叠?



