一、靈動標(biāo)簽應(yīng)用之“調(diào)用友情鏈接”。
眾所周知帝國的友情鏈接調(diào)用標(biāo)簽生成出來的代碼是Table的,不符合標(biāo)準(zhǔn),所以我們用靈動標(biāo)簽調(diào)用友情鏈接。
代碼:
<ul class="links_text">[e:loop={'select * from [!db.pre!]enewslink where checked=1 and lpic="" order by lid',20,24,0}]<li><a href="<?=$bqr[lurl]?>"><?=$bqr[lname]?></a></li>[/e:loop]</ul><ul><li><a href="/" title="首頁" target="_self">首 頁</a></li>[e:loop={'select classid,classname,classpath from [!db.pre!]enewsclass order by classid',0,24,0}]<li class="" id="cid<?=$bqr[classid]?>"><a href="<?=$public_r[newsurl]?><?=$bqr[classpath]?>" title="<?=$bqr[classname]?>" target="_self" ><?=$bqr[classname]?></a></li>[/e:loop]<li class="posr"><a href="/top" title="排行榜" target="_self">排行榜</a></li></ul><script>var changeclass=window.document.getElementById('cid[!--self.classid--]');changeclass.className='active';</script><ul>[e:loop={欄目ID,顯示條數(shù),操作類型,只顯示有標(biāo)題圖片}]<?$newimg="";if(date("m-d",$bqr[truetime])==date("m-d")){$newimg="<img src='New圖片地址'>";}?><li><a href="<?=$bqsr[titleurl]?>" target="_blank"><?=sub($bqr[title],0,10,false)?></a><?=$newimg?></li>[/e:loop]</ul><table width="100%" border="0" cellspacing="1" cellpadding="3">[e:loop={"select tid,subject from cdb_threads order by tid desc limit 10",10,24,0}]<tr><td><a href="/bbs/viewthread.php?tid=<?=$bqr[tid]?>" target="_blank"><?=$bqr[subject]?></a></td></tr>[/e:loop]</table><table width="100%" border="0" cellspacing="1" cellpadding="3">[e:loop={"select tid,subject from pw_threads order by tid desc limit 10",10,24,0}]<tr><td><a href="/bbs/read.php?tid=<?=$bqr[tid]?>" target="_blank"><?=$bqr[subject]?></a></td></tr>[/e:loop]</table><ul>[e:loop={'select userid as userid,truename as title,userpic as titlepic from [!db.pre!]enewsmemberadd order by userid desc limit 8',10,24,0}] <li><a href="/e/space/?userid=<?=$bqr[userid]?>" target="_blank"><img src="<?=$bqr[titlepic]?>" alt="<?=$bqr[title]?>" width="52" height="52" /><?=$bqr[title]?></a></li>[/e:loop]</ul>用戶ID:<?=$bqr[userid]?>用戶頭像:<?=$bqr[titlepic]?>用戶名稱:<?=$bqr[title]?>[e:loop={'select * from [!db.pre!]ecms_news where checked=1 order by diggtop desc,id desc limit 8',10,24,0}]<li><a href="<?=$bqsr[titleurl]?>"><?=sub($bqr[title],0,30,false)?>]</a><span><small>點擊:</small><?=$bqr[onclick]?></span> <span><small>頂:</small><?=$bqr[diggtop]?></span></li>[/e:loop][e:loop={'select * from [!db.pre!]ecms_news where checked=1 order by plnum desc,id desc limit 8',10,24,0}]<li> <small><a href="<?=$bqsr[titleurl]?>" class="title"><?=sub($bqr[title],0,30,false)?></a></small><p><?=$bqr[smalltext]?></p></li>[/e:loop][e:loop={'select classid,classname,classpath,wburl from [!db.pre!]enewsclass where bclassid=0 and showclass=0 order by myorder',0,24,0}] <li><a href="<?phpif(empty($bqr[wburl])){ echo $public_r[newsurl].$bqr[classpath];} else { echo $bqr[wburl];}?>" title="<?=$bqr[classname]?>" target="_self"><?=$bqr[classname]?></a></li>[/e:loop]
新聞熱點
疑難解答