2012-11-08, 08:27 AM
Pages: 1 2
2012-11-08, 07:35 PM
You are disabling only ZIP downloads. This may be more suitable:
if(!$forumpermissions['canview'] || !$forumpermissions['canviewthreads'] || (!$forumpermissions['candlattachments'] && !$mybb->input['thumbnail'] && !in_array($attachment['filetype'], array('image/gif', 'image/bmp', 'image/png', 'image/jpeg', 'image/unknown'))))
{
error_no_permission();
}
2012-11-09, 07:07 AM
Thanks Omar for this
2015-04-19, 10:53 PM
I was successfully using this modification for some time but yesterday I noticed that some zip files had been downloaded more than they should have. I created a new account and to my surprise I was able to download zip files , the strange thing is trying to download old zip files brings up a no permissions page, but all new zip files start downloading. This is happening in the same section, for example: Section A> Error downloading a zip file from two months ago, Section A> Success downloading a zip file that was uploaded yesterday.
Since I made the modification I have installed two plugins: Template Conditionals and Ajax Upload Multiple Attachments Plugin (disabled when I'm not uploading). There has also been a forum update in this time. As a test I uploaded a zip file with both plugins disabled and tested (with a new account) if I was able to download zip files, I was.
I'm not sure what else to try, any ideas please?
Since I made the modification I have installed two plugins: Template Conditionals and Ajax Upload Multiple Attachments Plugin (disabled when I'm not uploading). There has also been a forum update in this time. As a test I uploaded a zip file with both plugins disabled and tested (with a new account) if I was able to download zip files, I was.
I'm not sure what else to try, any ideas please?
2017-02-03, 01:32 PM
(2012-11-08, 07:35 PM)Omar G. Wrote: [ -> ]You are disabling only ZIP downloads. This may be more suitable:
if(!$forumpermissions['canview'] || !$forumpermissions['canviewthreads'] || (!$forumpermissions['candlattachments'] && !$mybb->input['thumbnail'] && !in_array($attachment['filetype'], array('image/gif', 'image/bmp', 'image/png', 'image/jpeg', 'image/unknown')))) { error_no_permission(); }
Hello Omar G. can you double confirm it this suitable for mybb latest version 1.8.10 ?
Just want the guest can download image file , no others .
Pages: 1 2