首页 > CMS > Discuz > 正文

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

2024-09-11 09:04:53
字体:
来源:转载
供稿:网友
代码糙,最近脑子不行,用的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 主题操作记录
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表