仿cnbeta的关键是每个栏目对应一个缩略图,下面是我的一个思路: Copy codeALTER TABLE dede_arctype ADD typelitpic varchar(80) NOT NULL DEFAULT ‘’; 将来图片的地址就是对应存放在typelitpic字段,你可以根据自己的喜欢取名; 接着 就是让{dede:arclist /} 能获取 dede_arctype.typelitpic里的值 方法是在后台:◇标签源码碎片管理 >> 修改标签 修改 arclist.lib.php Copy code<?php if(!defined('DEDEINC')) exit('Request Error!'); function lib_arclist(&$ctag,&$refObj) { global $envs; $autopartid = 0; $tagname = $ctag->GetTagName(); $channelid = $ctag->GetAtt('channelid'); if($tagname=='imglist' || $tagname=='imginfolist') { $listtype = 'image'; } else if($tagname=='specart') { $channelid = -1; $listtype=''; } else if($tagname=='coolart') { $listtype = 'commend'; } else if($tagname=='autolist') { $autopartid = $ctag->GetAtt('partsort'); } else { $listtype = $ctag->GetAtt('type'); } //排序 if($ctag->GetAtt('sort')!='') $orderby = $ctag->GetAtt('sort'); else if($tagname=='hotart') $orderby = 'click'; else $orderby = $ctag->GetAtt('orderby'); //对相应的标记使用不同的默认innertext if(trim($ctag->GetInnerText()) != '') $innertext = $ctag->GetInnerText(); else if($tagname=='imglist') $innertext = GetSysTemplets('part_imglist.htm'); else if($tagname=='imginfolist') $innertext = GetSysTemplets('part_imginfolist.htm'); else $innertext = GetSysTemplets("part_arclist.htm"); //兼容titlelength if($ctag->GetAtt('titlelength')!='') $titlelen = $ctag->GetAtt('titlelength'); else $titlelen = $ctag->GetAtt('titlelen'); //兼容infolength if($ctag->GetAtt('infolength')!='') $infolen = $ctag->GetAtt('infolength'); else $infolen = $ctag->GetAtt('infolen'); $typeid = trim($ctag->GetAtt('typeid')); if(empty($typeid)) { $typeid = ( isset($refObj->Fields['typeid']) ? $refObj->Fields['typeid'] : $envs['typeid'] ); } if($listtype=='autolist') { $typeid = lib_GetAutoChannelID($ctag->GetAtt('partsort'),$typeid); } if($ctag->GetAtt('att')=='') { $flag = $ctag->GetAtt('flag'); } else { $flag = $ctag->GetAtt('att'); } return lib_arclistDone ( $refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen, $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby, $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid, $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag') ); } function lib_arclistDone(&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160, $imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='', |