-
电子元件电路板类网站织...
-
电脑系统软件下载类网站...
-
钢结构岗亭营销型织梦网...
-
中英双语律师事务所类网...
-
精工机械轴承生产厂家类...
-
貂绒大衣服装设计类网站...
-
蔬菜鲜果配送类网站织梦...
-
玩具动漫类网站织梦模板...
-
仪器仪表科技公司类网站...
-
食品百货英文外贸类网站...
-
装饰建材公司类网站织梦...
-
人力资源管理类网站织梦...
-
水利工程施工类网站织梦...
-
仪器分析仪类网站织梦模...
-
手游APP软件下载类网站织...
-
财税记账工商注册认证类...
-
物流快运速递类网站织梦...
-
营销型无缝钢管定制生产...
-
展览展会信息类网站织梦...
-
网站模板资源下载类网站...
打开/include/extend.func.php文件
在最下面加入这个方法
<span style="font-size:14px;" deep="13">function Getimgurls($aid,$num=4){global $dsql;$imgurls = $result = '';$imgrow = $dsql->GetOne( "Select imgurls From `mydiy_addonimages` where aid='$aid' ");$imgurls = $imgrow['imgurls'];if($imgurls != ''){$dtp = new DedeTagParse();$dtp->LoadSource($imgurls);$images = array();if(is_array($dtp->CTags)){foreach($dtp->CTags as $ctag){if($ctag->GetName() == 'img'){$row = array();$row['width'] = $ctag->GetAtt('width');$row['height'] = $ctag->GetAtt('height');$row['imgsrc'] = trim($ctag->GetInnerText());$row['text'] = $ctag->GetAtt('text');$images[] = $row;}}}$dtp->Clear();$i = 0;foreach($images as $row){if($i == $num) break;if($row['imgsrc'] != ''){$result .= "<li><a title='{$row['text']}' href='{$row['imgsrc']}'><img src='{$row['imgsrc']}' mid='{$row['imgsrc']}' big='{$row['imgsrc']}' width='70' height='70'></a></li>";}$i++;}return $result;}}</span>
前端调用
<span style="font-size:14px;">[field:id function=Getimgurls(@me,5)/]</span>