Xiuno

Xiuno 不安装插件设置论坛附件回复可见

不想再写成插件了,我一直都觉得一个网站插件越少越好,大家可以参考这个方法。

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 放以下代码(包裹附件框)

<?php }}?>

这样就可以实现了。 注:两个文件缺一不可。

🗨️ 评论区

chicken road deposito google pay <a href="https://rampagedev.com/frame-pacing-why-a-fast-changing-number-on-screen-is-never-the-current-one/" />chicken road deposito google pay</a>
пинко кэшбэк не начислили <a href="https://fti.org.kg/how-to-check-bookmaker-license-status/" />https://fti.org.kg/how-to-check-bookmaker-license-status/</a>
seven casino drop and wins <a href="https://maisonarchives.com/buying-vintage-hair-accessories-at-auction-what-the-lot-description-and-the-prem/" />https://maisonarchives.com/buying-vintage-hair-accessories-at-auction-what-the-lot-description-and-the-prem/</a>
pin up ishchi mirror <a href="https://mostga.am/express-bets-on-football-matches/" />https://mostga.am/express-bets-on-football-matches/</a>
pinco бишкек вход <a href="https://e-bishkek.kg/sports-betting-rules-risks-guide/" />https://e-bishkek.kg/sports-betting-rules-risks-guide/</a>
олимп еженедельные акции <a href="https://tushtuk.kg/sport-and-betting-in-life/" />https://tushtuk.kg/sport-and-betting-in-life/</a>