vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Guests see thumbnails but can't download attachments (https://vborg.vbsupport.ru/showthread.php?t=69636)

memobug 09-19-2004 06:36 PM

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

-=Sniper=- 09-19-2004 07:04 PM

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]&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 07:08 PM

oh and heres the hack https://vborg.vbsupport.ru/showthread.php?t=67887

memobug 09-25-2004 06:35 AM

Quote:

Originally Posted by -=Sniper=-
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 10:28 AM

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]&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>



All times are GMT. The time now is 11:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02517 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete