Title: Add Attachments For Staff Only v1.0

Author: John Briggs

Description:
This mod will allow only staff to add attachments to posts if attachments are set to be allowed.

Copyright:  2006 John Briggs. All rights reserved.

Compatability: XMB 1.9.5 Final

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

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

Author Note:
You downloaded this hack from XMBMods.com, the #1 source for XMB related downloads.
Please visit http://www.xmbmods.com/ for support.

=======================================================================================================================================
=======
Step 1:
=======

===================
Edit File: post.php
===================

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

if ( $forums['attachstatus'] != "off") {
    eval("\$attachfile = \"".template("post_attachmentbox")."\";");
} else {
    $attachfile = '';
}

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

$attachfile = '';
if (X_STAFF && isset($forums['attachstatus']) && $forums['attachstatus'] != 'off') {
    eval('$attachfile = "'.template('post_attachmentbox').'";');
}

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

        // Start Displaying the Post form
        if ( $forums['attachstatus'] != "off") {
            eval("\$attachfile = \"".template("post_attachmentbox")."\";");
        } else {
            $attachfile = '';
        }

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

        // Start Displaying the Post form
        $attachfile = '';
        if (X_STAFF && isset($forums['attachstatus']) && $forums['attachstatus'] != 'off') {
            eval('$attachfile = "'.template('post_attachmentbox').'";');
        }

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

        if ( $postinfo['filename'] != '') {
            eval("\$attachment = \"".template('post_edit_attachment')."\";");
        }else{
            $attachment = $attachfile;
        }

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

        if (X_STAFF && $postinfo['filename'] != '') {
            eval('$attachment = "'.template('post_edit_attachment').'";');
        } else {
            $attachment = $attachfile;
        }

=======================================================================================================================================