其他分享
首页 > 其他分享> > 齐博x1标签实例:标签如何调用论坛内容

齐博x1标签实例:标签如何调用论坛内容

作者:互联网

论坛的内容不像CMS其它模块可以直接用变量 {$rs.content}

因为论坛的内容数据表是放在另一个表的,单独分开的. 当前也是为了考试效率问题而这样设计的. 所以他的调用要用下面的代码

{:fun('bbs@getContents',$rs.id,400)}

400代表取400个字节

上面是简洁的用法,下面是可以同时调取html源代码,方便再取内容中的图片

{:get_word(del_html($content=fun('bbs@getContents',$rs.id)),400)}

比如上面取了内容介绍后,还要接着显示内容中的图片

<div class="morepic">
						  	{volist name=":getArray($pics=$rs.picurls?:fun('content@get_images',$content))" id="vs"}
						  		{if $i<4}<a href="{$rs.url}"><img style="{if count($pics)==1}max-width:600px;{else /}height:100px;{/if}margin:5px 5px 15px 5px;" src="{$vs.picurl}"></a>{/if}
							{/volist}
 </div>

标签:rs,齐博,标签,content,内容,400,fun,x1,id
来源: https://www.cnblogs.com/wanxiangsucai/p/15550831.html