Topic: Disallow moderators to delete posts/topics
Is there a tiny change on the source to disallow moderators to delete posts/topics?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.4 troubleshooting → Disallow moderators to delete posts/topics
Is there a tiny change on the source to disallow moderators to delete posts/topics?
hook dl_pre_permission_check
$forum_page['is_admmod'] = ($forum_user['g_id'] == FORUM_ADMIN) ? true : false;
I don't understand where to add this code sorry.
I suppose the file is delete.php, but after which line?
Create folfer not_delete in folder /extensions.
Create file manifest.xml in folder /extensions/not_delete:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">
<extension engine="1.0">
<id>not_delete</id>
<title>Not delete for moderators</title>
<version>1.0.0</version>
<description>Not delete for moderators</description>
<author>Visman</author>
<minversion>1.4.2</minversion>
<maxtestedon>1.4.2</maxtestedon>
<hooks>
<hook id=" dl_pre_permission_check"><![CDATA[
$forum_page['is_admmod'] = ($forum_user['g_id'] == FORUM_ADMIN) ? true : false;
]]></hook>
</hooks>
</extension>
Go to Administration → Extensions → Manage extensions and install Not delete for moderators
You are so kind thank you.
@Visman a moderator said me that now he can't edit also his own posts!!!
Could you please fix the code?
Thank you very much!
This code influences only deleting of posts. It doesn't influence editing. You watch forum settings.
PunBB Forums → PunBB 1.4 troubleshooting → Disallow moderators to delete posts/topics
Powered by PunBB, supported by Informer Technologies, Inc.