Do not allow attachments to be downloaded to guests and bots

Note: no support provided in this sub-forum
Forum rules
Note: no support provided in this sub-forum
Post Reply
User avatar
Stanton
Registered user
Posts: 1
Last visit: Wed Sep 04, 2024 10:18 am

Do not allow attachments to be downloaded to guests and bots

Post by Stanton »

Open includes/functions_content.php and find

Code: Select all

						'S_FILE'		=> true,
Add after on new line

Code: Select all

						'S_DENIED'		=> (empty($user->data['is_registered']) || !empty($user->data['is_bot'])) ? true : false,
						'DENIED_MESSAGE'	        => 'You do not have the required permissions to download this file.<br>Need to be logged in to the forum to downloaded.',
Clear cache after modification

With this modification the display of images in attached files will be possible to guests and bots, but not file downloading.
This solution makes it possible to do without the authorization provided for in the ACP

deniedfile.png
deniedfile.png (15.3 KiB) Viewed 57 times
Post Reply