2012-11-04, 02:11 PM
This has annoyed me for as long as I can remember. You upload a new theme or plugin as a .zip package on your forum and you attach some screenshots to give your users or guests an idea of what you've just uploaded. But the MyBB attachment system also blocks access to image attachments if you don't have permission to access attachments.
This small edit will allow you to block access to .ZIP attachments but allow access to all other attachments (Images etc...)
Open "attachment.php" in your forum root.
Find:
Replace:
This small edit will allow you to block access to .ZIP attachments but allow access to all other attachments (Images etc...)
Open "attachment.php" in your forum root.
Find:
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 ||
($forumpermissions['candlattachments'] == 0 && !$mybb->input['thumbnail']))
{
error_no_permission();
}
Replace:
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 ||
($forumpermissions['candlattachments'] == 0 && !$mybb->input['thumbnail']
&& $attachment['filetype'] == "application/zip"))
{
error_no_permission();
}