1

Topic: Disallow moderators to delete posts/topics

Is there a tiny change on the source to disallow moderators to delete posts/topics?

Re: Disallow moderators to delete posts/topics

hook dl_pre_permission_check

$forum_page['is_admmod'] = ($forum_user['g_id'] == FORUM_ADMIN) ? true : false;
ForkBB
I speak only Russian  :P

3

Re: Disallow moderators to delete posts/topics

I don't understand where to add this code sorry.
I suppose the file is delete.php, but after which line?

Re: Disallow moderators to delete posts/topics

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

ForkBB
I speak only Russian  :P

5

Re: Disallow moderators to delete posts/topics

You are so kind thank you. smile

6 (edited by Lok 2014-01-17 10:14)

Re: Disallow moderators to delete posts/topics

@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!

Re: Disallow moderators to delete posts/topics

This code influences only deleting of posts. It doesn't influence editing. You watch forum settings.

ForkBB
I speak only Russian  :P