灵动标签调用方法:
[e:loop={591,6,0,0}]
<?php
if(!$bqr[titlepic])$bqr[titlepic]="/skin/news/".rand(1,10).".jpg";
$resizeimgurl=sys_ResizeImg($bqr[titlepic],210,125,1,'list_'.$bqno);
echo"<img src='$resizeimgurl' title='".$bqr[title]."'>";
?>
[/e:loop]
<?php
if(!$bqr[titlepic])$bqr[titlepic]="/skin/news/".rand(1,10).".jpg";
$resizeimgurl=sys_ResizeImg($bqr[titlepic],210,125,1,'list_'.$bqno);
echo"<img src='$resizeimgurl' title='".$bqr[title]."'>";
?>
[/e:loop]
列表页调用方法:
需开启:列表内容模板(list.var) (*)
$rand=rand(1,10);
if($r[titlepic]){
$listpic='[!–titlepic–]';
}else{
$listpic='/skin/news/'.$rand.'.jpg';
}
$listtemp='
<li><a href="[!–titleurl–]" class="ph"><img src="'.$listpic.'"></a><div><div class="ta"><a href="[!–this.classlink–]">[!–this.classname–]</a></div><h3><a href="[!–titleurl–]">[!–title–]</a></h3>
<p><span>[!–befrom–]</span><span></span><label>[!–newstime–]</label></p></div>
';
if($r[titlepic]){
$listpic='[!–titlepic–]';
}else{
$listpic='/skin/news/'.$rand.'.jpg';
}
$listtemp='
<li><a href="[!–titleurl–]" class="ph"><img src="'.$listpic.'"></a><div><div class="ta"><a href="[!–this.classlink–]">[!–this.classname–]</a></div><h3><a href="[!–titleurl–]">[!–title–]</a></h3>
<p><span>[!–befrom–]</span><span></span><label>[!–newstime–]</label></p></div>
';
评论前必须登录!
注册