打开插件目录下的hook目录找到shortcode_case_end.php并打开。
找到
// [reply]...[/reply] => 回复用户可见
$this->bbcode_table["/\[reply\](.*?)\[\/reply\]/is"] = function ($match) {
global $uid, $tid, $thread;
$is_reply = db_find_one('post', array('uid' => $uid, 'tid' => $tid));
if (isset($thread['firstpid'])) {
if ($is_reply || $thread['uid'] === $uid) {
return '<div class="alert alert-success">' . $match[1] . '</div>';
} else {
// 就是这一行要改!
return '<div class="alert alert-warning">' . '本帖有隐藏内容,请您<a href="' . url('post-create-' . $tid) . '" style="font-weight:bold;">回复</a>后查看。' . '</div>';
}
} else {
return '<div class="alert alert-secondary">' . $match[1] . '</div>';
}
};
改成
// [reply]...[/reply] => 回复用户可见
$this->bbcode_table["/\[reply\](.*?)\[\/reply\]/is"] = function ($match) {
global $uid, $tid, $thread;
$is_reply = db_find_one('post', array('uid' => $uid, 'tid' => $tid));
if (isset($thread['firstpid'])) {
if ($is_reply || $thread['uid'] === $uid) {
return '<div class="alert alert-success">' . $match[1] . '</div>';
} else {
// 修改处
if ($uid) {
return '<div class="alert alert-warning">本帖有隐藏内容,请您<a href="javascript:void(0);" onclick="$(\'html, body\').animate({scrollTop: $(\'#quick_reply_form\').offset().top}, 500);" style="font-weight:bold; color:#0084ff;" class="reply-link">回复</a>后查看。</div>';
} else {
// 未登录:跳转到登录页
return '<div class="alert alert-warning">本帖有隐藏内容,请您<a href="' . url('user-login') . '" style="font-weight:bold; color:#0084ff;">登录</a>后回复查看。</div>';
}
}
} else {
return '<div class="alert alert-secondary">' . $match[1] . '</div>';
}
};
温馨提示:楼主使用知乎蓝主题,其他主题未测试可行性
最后于 17小时前
被vasd编辑
,原因: