基于zouql制作的标签修改。原帖:http://bbs.powereasy.net/dispbbs.asp?boardID=69&ID=198129&page=1
以下在动易2006 SP5最新SQL版中测试通过。
SQL查询语句:
select top 6 ArticleID,ChannelID,Title,DefaultPicUrl from PE_Article where Deleted ={$PE_False} and Elite ={$PE_True} and Status =3 and DefaultPicUrl like '%.jpg' order by ArticleID desc
标签内容如下:
<script type="text/javascript">
<!--{Loop}
{Infobegin}
imgUrl{$AutoID}="{$Field(1,GetChannel,1)}/{$Field(1,GetChannel,3)}/{$Field(3,Text,0,0,0)}"
imgLink{$AutoID}="{$Field(0,GetUrl,Article,1)}"
imgtext{$AutoID}="{$Field(2,Text,
{input(0)},1,0)}"{Infoend}
{Infobegin}
{/Loop}
var focus_width={input(1)}
var focus_height={input(2)}
var text_height={input(3)}
var swf_height = focus_height+text_height
var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5+"|"+imgUrl6
var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5+"|"+imgLink6
var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5+"|"+imgtext6
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cabversion=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="
{$InstallDir}skin/bbsou_com/bbsou2.swf"><param name="quality" value="high"><param name="bgcolor" value=
{input(4)}>');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="
{$InstallDir}skin/bbsou_com/bbsou2.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor=ffffff quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="
http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
//-->
</script>
在模板中这样调用:
{$MY_bbsou_comFLA(36,260,210,18,ffff00)}
其中: 36是标题字符数,260是图片宽,210是图片高,18是行高,ffff00是背景色----参数可以自行修改
说明:
1、确保网站文章频道中至少添加了6篇含有图片的文章,而且设为推荐文章。
2、注意swf图片路径正确无误(上面代码中红色标识)点击下载附件
3、粘贴标签代码后,请不要点击可视编辑区域,直接点击保存按钮
4、强烈推荐学习动态标签基础知识:http://help.powereasy.net/CMS/CMS2006/label/1148.html