1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to make attachments visible to guests ?

Discussion in 'XenForo Questions and Support' started by erich37, Mar 26, 2011.

  1. erich37

    erich37 Well-Known Member

    when visiting the Forum as a guest, then images attached into Forum-posts are only visible as small icons.

    Is there a way to make images visible in full size also to guests ?

    Many thanks!
     
  2. Brett Peters

    Brett Peters Well-Known Member


    This should be what you are looking for
    ACP > Users > user permissions > unregistered / unconfirmed > view attachments to posts
     
    erich37 likes this.
  3. erich37

    erich37 Well-Known Member

    thanks !
    works fine indeed!

    I guess doing so will massively increase the server load ?
    Are you guys have images and attachments visible to guests or not ?

    Will having attachments visible to guests increase the amount of visitors to the website?
     
  4. James

    James Well-Known Member

    Increase in server load, that shouldn't necessarily be true.

    Having attachments visible to guests won't increase the visitors unless your visitors have a use for the attachments (in which case they'd register to view them anyway).
     
  5. erich37

    erich37 Well-Known Member

    but when having the images (attachments) visible to guests, the images get loaded. I guess the images are actually not loaded when not visible to guests ?
    isnĀ“t this increasing server load ?

    I would like to have images visible to guests, but am afraid of the server-load.......?
     
  6. James

    James Well-Known Member

    The images aren't loaded until they're clicked, what's loaded is actually a thumbnail (which is loaded to guests whether the permissions are granted or not - from my testing anyway).
     
  7. erich37

    erich37 Well-Known Member

    well, I actually mean "inline attachments".....
     
  8. James

    James Well-Known Member

    Server load should be negligible. Enable attachments for guests for a few days and see how your server load pans out... it shouldn't be too bad though.
     
  9. Dean

    Dean Well-Known Member

    Keep in mind that guest will be able to download all attachments such as attached pdf files too. That may or may not concern you.
     
    erich37 likes this.
  10. Ray

    Ray Active Member

    Google will no longer receive 403 errors and your images will now show in Google Images Search results, resulting in more traffic to your site.
     
    erich37 likes this.
  11. erich37

    erich37 Well-Known Member

    yeah, this is a plus and minus to this.
    I am trying now which will be better for the users......
     
  12. Markos

    Markos Well-Known Member

    The Google Images traffic is totally "useless".I'm also agree with James about the server load issues.
     
  13. Ray

    Ray Active Member

    Just as useless as Google search traffic, I agree.
     
  14. snoopy5

    snoopy5 Well-Known Member


    Hi this setting does not work. I do NOT want the attachmenst be visible to Guests/ unregistered. I mde teh settings accordingly, but they still are shown as thumbnails.How can I forbid this also for thumbnails? My users are freaking out becase they do not want the images shown with google search!

    Those images are imported from a vb forum by the way, in case that matters..
     
  15. DRE

    DRE Well-Known Member

  16. snoopy5

    snoopy5 Well-Known Member

  17. DRE

    DRE Well-Known Member

    I didn't read that far into the thread my bad.
     
  18. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> attached_files

    Add the red code:

    Code:
    <xen:require css="attached_files.css" />
    
    <div class="attachedFiles">
    	<h4 class="attachedFilesHeader">{xen:phrase attached_files}:</h4>
    	<ul class="attachmentList SquareThumbs"
    		data-thumb-height="{xen:calc '{$xenOptions.attachmentThumbnailDimensions} / 2'}"
    		data-thumb-selector="div.thumbnail > a">
    		<xen:foreach loop="$post.attachments" value="$attachment">
    			<li class="attachment{xen:if {$attachment.thumbnailUrl}, ' image'}" title="{$attachment.filename}">
    				<div class="boxModelFixer primaryContent">
    					
    					<div class="thumbnail">
    						<xen:if is="{$attachment.thumbnailUrl} AND {$canViewAttachments}">
    							<a href="{xen:link attachments, $attachment}" target="_blank" class="LbTrigger"
    								data-href="{xen:link misc/lightbox}"><img 
    								src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="LbImage" /></a>
    						<xen:elseif is="{$attachment.thumbnailUrl} AND 0" />
    							<a href="{xen:link attachments, $attachment}" target="_blank"><img
    								src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" /></a>
    						<xen:else />
    							<a href="{xen:link attachments, $attachment}" target="_blank" class="genericAttachment"></a>
    						</xen:if>
    					</div>
    					
    					<div class="attachmentInfo pairsJustified">
    						<h6 class="filename"><a href="{xen:link attachments, $attachment}" target="_blank">{$attachment.filename}</a></h6>
    						<dl><dt>{xen:phrase file_size}:</dt> <dd>{xen:number $attachment.file_size, size}</dd></dl>
    						<dl><dt>{xen:phrase views}:</dt> <dd>{xen:number $attachment.view_count}</dd></dl>
    					</div>
    				</div>
    			</li>
    		</xen:foreach>
    	</ul>
    </div>
    
    <xen:comment><xen:require css="xenforo.css" /></xen:comment>
    
     
  19. snoopy5

    snoopy5 Well-Known Member

    Hi

    I added the code in red, but still, not logged in usrs can see all thumbnails...
     
  20. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Then either they have permission to view attachments (the Unregistered group) or you are editing the wrong style.

    Also note that even with this template edit, thunbnail images are not actually protected by the permission system, so users can still load direct URLs to view thumbs even though they are not shown on the page.
     

Share This Page