The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Guests see thumbnails but can't download attachments
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 |
#2
|
|||
|
|||
use this in the postbit_attachmentthumbnail template
HTML Code:
<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]&stc=1&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> <if condition="$show['br']"><br /><br /></if> 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! |
#3
|
|||
|
|||
oh and heres the hack https://vborg.vbsupport.ru/showthread.php?t=67887
|
#4
|
|||
|
|||
Quote:
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. |
#5
|
|||
|
|||
try using this in the same template
HTML Code:
<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]&stc=1&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> <if condition="$show['br']"><br /><br /></if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|