[BUG] Fix Discuz 3x users unable to delete their own posts

discuz 真的是日落西山了,BUG层出不穷也没人修复。在论坛上找了很多相关问题,也没人回答。只能自己动手了。

情况:用户无法删除自己发的帖子。解决办法:

1.设置

在后台 – 全局 – 用户权限 – 允许用户编辑帖子时删除帖子 选择是了还是无法删除帖子。

2. 修改模板

在default/forum/post_editor_attribute.htm 中找到

<tr>
  <td class="xw1" valign="top">{lang post_delpost}</td>
  <td>
    <button type="button" class="pn xi1" onclick="deleteThread();">
      <span>{lang post_delpost}</span>
    </button>
    <input type="hidden" name="delete" id="delete" value="0" /> {lang del_thread_warning}
    <!--{if $thread[special] == 3}-->, {lang reward_price_back}
    <!--{/if}-->
  </td>
</tr>

看到上面有个if了吗?改成:

<!--{if $_GET[action] == 'edit' && $isorigauthor && !$rushreply && $_G['setting']['editperdel']}-->

搞定。

This site Original article All followed" Attribution—NonCommercial—ShareAlike 4.0 (CC BY-NC-SA 4.0) ”。 Please keep the following marks for sharing and interpretation:

Original author: Jake Tao Source: 「[BUG]修复Discuz 3x 用户无法删除自己的帖子」

Praise 192
0 0 192

Further reading

Post a reply

Log in can only be commented on later
Share this page
Back to top