Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 8 Years, 10 Months, 3 Weeks ago Permit display of uploaded images for selected users
#11
Solved: 8 Years, 10 Months, 3 Weeks ago
It is a common request. The point - was that by making the simple code edits you could allow guests to view images. I must admit I am a bit baffled by what the issue is. Do you have guests allowed to view attachments?
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#12
Solved: 8 Years, 10 Months, 3 Weeks ago
Lee, my apologies for being a bit dense about this, BUT;

under each forum's permissions there is no permission setting I see to allow/disallow guests from viewing attachments. But there IS a 'can download attachments' setting.

Checking that permits viewing (*downloading*) of the uploaded images by guests.

I suppose that by accessing the image to view it, a guest is downloading it...Rolleyes

Thanks again for your patience.
#13
Solved: 8 Years, 10 Months, 3 Weeks ago
Right, I think that the idea was that you allow guests to "download attachments" - images are attachments - but nothing else.

This code edit from OMar would do that

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();
} 

What that does is it allows all guest users to download IMAGE attachments. No others. You have to edit the core file like Frank says in his first post.

http://community.mybb.com/thread-128763-...#pid933116
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


#14
Solved: 8 Years, 10 Months, 3 Weeks ago
I understand, Lee.
As I mentioned a couple posts ago:
"yes, those code mods do permit access to the link in the post for an uploaded image: a user not logged-in can click on the link to see the image in a new browser tab. (one version EXCLUDES specified filetypes from access to unregistered users; the other excludes all filetypes NOT specified)"

In other words, I had tested and applied those mods, and found they worked...but only to permit viewing in a SEPARATE tab, not as embedded images in the post.
What did not click with my li'l brain was that the term "downloading" (in the Admin Forum Permissions) = "viewing".

I'll mark this one "solved", thanks again!


Forum Jump:


Users browsing this thread: 1 Guest(s)