PDA

View Full Version : Guests see thumbnails but can't download attachments


memobug
09-19-2004, 07:36 PM
I am not sure if this could be done in templates alone, but I would like to make it possible for guests to see thumbnails of attachments, but they would need to register to download the actual attachment.

I have prohibited guests from downloading attachments mainly for bandwidth reasons, but I don't see why they should not be able to see the thumbnails, like they can in PhotoPost gallery.

I don't mind the small bandwidth hit for thumbnails, plus, they are excellent 'teasers' to encourage registration.

Can this be done in templates or would it take a hack?

Regards,

Matt

-=Sniper=-
09-19-2004, 08:04 PM
use this in the postbit_attachmentthumbnail template


<if condition="$bbuserinfo[userid] == '0'"><else /><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]"></if><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]">$vbphrase[image_larger_version_x_y_z]</phrase>" /><if condition="$bbuserinfo[userid] == '0'"><else /></a></if>
&nbsp;<if condition="$show['br']"><br /><br /></if>


there other if conditions that you can use! but thats what I use! also theres hack like this if you do a search!

this however doesnt stop people from making a manual link to the image to view a larger version! e.g. http://www.hardwareforums.com/showthread.php?t=2267

I hope this helps!

-=Sniper=-
09-19-2004, 08:08 PM
oh and heres the hack https://vborg.vbsupport.ru/showthread.php?t=67887

memobug
09-25-2004, 07:35 AM
use this in the postbit_attachmentthumbnail template

this however doesnt stop people from making a manual link to the image to view a larger version! e.g. http://www.hardwareforums.com/showthread.php?t=2267

I hope this helps!
Thank you but this wasn't working for me. After changing the template, I still got the text links for guests. I even tried to enable downloads for guests. Then I got the thumbnails, but guests could get the large version too.

So there must be something I am doing wrong, or something else I need to do to make this work besides changing one template.

Thanks,

Matt

P.S. I have no problem if they can link around manually. I am doing this mainly for bandwidth limits, not security.

-=Sniper=-
09-25-2004, 11:28 AM
try using this in the same template

<if condition="$bbuserinfo['usergroupid'] == '1'"><else /><a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]"></if><img class="thumbnail" src="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;stc=1&amp;thumb=1" border="0" alt="<phrase 1="$attachment[filename]" 2="$attachment[counter]" 3="$attachment[filesize]">$vbphrase[image_larger_version_x_y_z]</phrase>" /><if condition="$bbuserinfo['usergroupid'] == '1'"><else /></a></if>
&nbsp;<if condition="$show['br']"><br /><br /></if>