打开 include/taglib/likearticle.lib.php 找到
1 if($keyword != '')
在它的上面加入
01 //获得附加表的相关信息 02 $addField = ""; 03 $addJoin = ""; 04 if(is_object($refObj->ChannelUnit)) 05 { 06 $addtable = $refObj->ChannelUnit->ChannelInfos['addtable']; 07 if($addtable!="") 08 { 09 $addJoin = " LEFT JOIN $addtable ON arc.id = ".$addtable.".aid "; 10 $addField = ""; 11 $fields = explode(",",$refObj->ChannelUnit->ChannelInfos['listfields']); 12 foreach($fields as $k=>$v) 13 { 14 $nfields[$v] = $k; 15 } 16 foreach($refObj->ChannelUnit->ChannelFields as $k=>$arr) 17 { 18 if(isset($nfields[$k])) 19 { 20 if(!empty($arr['rename'])) 21 { 22 $addField .= ",".$addtable.".".$k." as ".$arr['rename']; 23 } 24 else 25 { 26 $addField .= ",".$addtable.".".$k; 27 } 28 } 29 } 30 } 31 }
1 tp.sitepath
1 tp.sitepath $addField
1 arc.typeid=tp.id
1 arc.typeid=tp.id $addJoin
1 {dede:likearticle row='10' col='' titlelen='100' infolen='200'} 2 [field:title/] 3价格:¥[field:jiage/]
4 {/dede:likearticle}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)