============================================================================================================================
Modification Title: Deletion Of Posts For Staff Only

Version: 1.0

Author: John Briggs

Description:
This modification will prevent the option for members to delete there own posts and allow only staff to delete them.

Copyright:  2010 John Briggs. All Rights Reserved.

Compatability: XMB 1.9.5 SP1

Install Note: Before adding this modification to your forum, you should back up all files related to this modification.

License Note: This modification is released under the GPL License v3. A copy is provided with this software package.

Author Note:
You downloaded this modification from XMBGarage.com, the #1 source for XMB related downloads.
Please visit http://www.xmbgarage.com/ for support.
============================================================================================================================
=======
Step 1:
=======
===============
Edit File: post.php
===============
==========
Find Code:
==========

        if ( $postinfo['usesig'] == "yes") {
            $offcheck3 = "checked=\"checked\"";
        } else {
            $offcheck3 = '';
        }

===============
Add Code Below:
===============

        // Deletion Of Posts For Staff Only Mod Begin
        $status1 = modcheck($self['status'], $username, $forums['moderator']);
        if ($self['status'] == 'Super Moderator') {
            $status1 = 'Moderator';
        }

        $deleteoption = '';
        if (X_ADMIN || X_STAFF && $status1 == 'Moderator') {
            $deleteoption = '<input type="checkbox" name="delete" value="yes" /> <strong>'.$lang['textdelete'].'</strong>';
        }
        // Deletion Of Posts For Staff Only Mod End

==========
Find Code:
==========

            if ( $isfirstpost['pid'] == $pid && !(isset($delete) && $delete == "yes")) {

===============
Add Code Above:
===============

            // Deletion Of Posts For Staff Only Mod Begin
            $delete = (isset($delete) && $delete == 'yes' && X_STAFF && $status1 == 'Moderator') ? 'yes' : 'no';
            // Deletion Of Posts For Staff Only Mod End

============================================================================================================================
=======
Step 2:
=======
===============================
Go To Administration Panel --> Templates
===============================
===================
Edit Template: post_edit
===================
==========
Find Code:
==========

<input type="checkbox" name="delete" value="yes" /> <strong>$lang[textdelete]</strong>

==================
Replace Code With:
==================

$deleteoption

============================================================================================================================
Enjoy!