Page 1 of 1

Do not allow attachments to be downloaded to guests and bots

Posted: Wed Sep 04, 2024 10:18 am
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 153 times