discuz 主题关闭提示 单独查询调用

时间:2018-12-25 09:10作者:网友投稿
代码糙,最近脑子不行,用的fetch_all
<!--{if $_G['forum_thread']['closed'] == 1}-->
<!--{eval $thread_mods = DB::fetch_all("select * from ".DB::table("forum_threadmod")." where tid='$_G[tid]' and `action` in ('ECL','CLS') order by `dateline` desc limit 0,1")}-->
<!--{if $thread_mods}-->
<i class="fa fa-lock"></i> 该主题已被 {$thread_mods[0][username]} 锁定 (限时 {echo date("Y年m月d日 H:i",$thread_mods[0][dateline])} 至 {if $thread_mods[0]['action']=='ECL'}{echo date("Y年m月d日 H:i",$thread_mods[0][expiration])}{else}永久{/if})
<!--{/if}-->
<!--{/if}-->

重点是`action` in ('ECL','CLS'),这种ECL、CLS值的含义网上搜不到完整的解释。
之前自己一边测试一遍记录了一部分。
discuz 主题操作记录

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。