Skip to main content
Topic: Special file permission for guests ? (Read 1468 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Special file permission for guests ?

Hi,

Guests  can see the uploaded image files, but do not download the archive files.

how to make this special permission?
sorry for my bad english

Re: Special file permission for guests ?

Reply #1

Hi,
there is no file permission to set, if guests can see image attachments they can download zip or other files. I just tested on my forum and works.

p.s. you need to click to the filename of the zip to start download, not on the icon
sorry for my bad english

Re: Special file permission for guests ?

Reply #2

want to do; guests  only see images (jpg, png etc.)  in topic.  do not download archive (zip, rar etc.) files.

edit Display.controller.php

find;          

Code: [Select]
// Fetch attachments.
if (!empty($modSettings['attachmentEnable']) && allowedTo('view_attachments'))


replace;
Code: [Select]
      // Fetch attachments.
      if (!empty($modSettings['attachmentEnable']))
      {
                      if(!allowedTo('view_attachments'))
                             $modSettings['attachmentShowImages'] = 0;}

see guests archive (zip, rar) filename, link appears.   ok.

guests click attachment link redirect to login page. ok.  

but the image does not appear to the guests

sorry for my bad english

Re: Special file permission for guests ?

Reply #3

have a look here skodaclub.it/index.php?topic=8172.msg138151#msg138151 , you can view the image attachment and also download the zip attachment

The only problem is that as a member I see the zip icon, while the zip icon is not visible as guest. Probably this could be a bug, what do yo think @Spuds‍  @emanuele‍ ?
sorry for my bad english

Re: Special file permission for guests ?

Reply #4

I don't want guest to download archive files.   Guests see archived (zip, rar etc.)  attachments but not download.  i solved this problem with the above code


Guests  only see images (jpg, png etc.)  in topic.

Untitled 2.png

sorry for my bad english