1、在任意hook文件夹新建一个 thread_message_after.htm 文件,如下代码。
<?php
if (isset($route) && $route == 'thread') {
$uid = isset($uid) ? $uid : 0;
$thread = isset($thread) ? $thread : [];
$user = isset($user) ? $user : [];
$has_replied = false;
if ($uid && isset($thread['tid'])) {
$has_replied = db_count('post', ['uid' => $uid, 'tid' => $thread['tid']]);
}
$is_admin = isset($user['gid']) && $user['gid'] == 1;
if (!$is_admin && !$has_replied && isset($thread['uid']) && ($thread['uid'] != $uid) && isset($thread['files']) && $thread['files'] > 0) { ?>
<fieldset class="fieldset mt-2 m-0">
<legend>本帖中包含附件</legend>
<i class="icon-bell"></i> 附件为<span class="text-danger">回复后可见</span>,请先回复!
</fieldset>
<?php } else { ?>
2、再新建一个文件 thread_filelist_after.htm 放以下代码(包裹附件框)
您好,本帖含有特定内容,请回复后再查看。
声明:本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。
暂无评论