Customizing SMF > Tips and Tricks

No attachment limit for admins

(1/6) > >>

dschwab9:
I would like to be able to have the file size/extension limits not apply to admins.  Is this easy to do?  There's times I need to upload a couple of meg zip or something, but I don't want to give the world access to do that.  I've been changing the limit, uploading the file, then changing it back.

[Unknown]:
Post.php, find:

--- Code: ---if (!empty($modSettings['attachmentSizeLimit']) && $_FILES['attachment']['size'][$n] > $modSettings['attachmentSizeLimit'] * 1024)
--- End code ---

Replace:

--- Code: ---if (!$user_info['is_admin'] && !empty($modSettings['attachmentSizeLimit']) && $_FILES['attachment']['size'][$n] > $modSettings['attachmentSizeLimit'] * 1024)
--- End code ---

-[Unknown]

dschwab9:
Perfect!  Thanks

Ben_S:
This should be in tips and tricks ;).

dschwab9:

--- Quote from: Ben_S on September 27, 2004, 09:47:27 AM ---This should be in tips and tricks ;).

--- End quote ---

Well, can you move it there?

Navigation

[0] Message Index

[#] Next page

Go to full version