ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
论坛的内容不像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> ~~~