Any option or mod to let guest see attachment link, but not download it?

Started by ApplianceJunk, February 11, 2018, 06:18:05 PM

Previous topic - Next topic

ApplianceJunk

I'm running SMF 2.0.15

I found the check box in "Manage Permission" to allow "Guest" to "View Attachments".

But when you uncheck the box a guest can no longer even tell that a attachment has been added to the topic or post.

I would like to set up my forum so guest can see a attachment link is there, but when they click on it they are told they don't have permission to download it.

Is there already a setting for this built in that I'm missing or a mod that I missed?

Would also be great if I could set it so guest can't download .pdf attachments only. Other image attachments like .jpg would be fine.

I have been looking through settings and the mod site but didn't see any other options that would work.

Thanks,

vbgamer45

I would change this code in sources/display.php

// If there _are_ messages here... (probably an error otherwise :!)
if (!empty($messages))
{
// Fetch attachments.
if (!empty($modSettings['attachmentEnable']) && allowedTo('view_attachments'))
{

Change to


// If there _are_ messages here... (probably an error otherwise :!)
if (!empty($messages))
{
// Fetch attachments.
if (!empty($modSettings['attachmentEnable']))
{
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

ApplianceJunk

That works great!

Guest click on the attachment link and are taken to the login page, perfect!

Thank you!

Kindred

Smf, by design, does not show any action that you can not complete...

So, that's why guests can not see attachments, if they are not allowed to download them.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: