<a href="{xen:link attachments, $attachment}" target="_blank"><img src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="bbCodeImage" /></a>
<a class="highslide" href="{xen:link attachments, $attachment}" onclick="return hs.expand(this)">
<img src="{xen:if $attachment.thumbnailUrl, $attachment.thumbnailUrl, '@imagePath/xenforo/widgets/page.png'}" alt="{$attachment.filename}" />
</a>
<xen:else />
<a href="{xen:link attachments, $attachment}" target="_blank"><img src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="bbCodeImage" /></a>
</xen:if>
<xen:else />
<xen:if is="{$canView}">
<div class="highslide-gallery">
<a class="highslide" href="{xen:link attachments, $attachment}" onclick="return hs.expand(this)"><img src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="bbCodeImage" /></a>
</div>
<xen:else />
<a href="{xen:link attachments, $attachment}" target="_blank"><img src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="bbCodeImage" /></a>
</xen:if>
</xen:if>
This should be default
Nice.... XF should use something like this by default... ie. a lightbox type setup so you can just shift through images like a album when viewing multiple images attached to a post.
Kier saw it, xf is beta.. All we need is a bit more Time
Yes, with Kier taking a peek at this thread, I would imagine he'd like to bring something like this to xF
I reckon this is the fix for highslide on inserted thumbnails. It is working for me, but I'd appreciate it if someone can check the fix.
Edit: bb_code_tag_attach
Replace two occurrences of
<snipped>
Where the files are placed? Please provide full path from the root of XenForo.Step 4 of 6: Add the following to the end of the XF page_container_js_head template:
Step 5 of 6: Edit the XF attached_files template in two spots. First find this:
The specified files should be placed inside of a directory at:Where the files are placed? Please provide full path from the root of XenForo.
Thanx
Thanks for all the 'likes' and thanks. BamaStangGuy and Moses, you're correct, this only applies to thumbnails in the attachments area at the bottom of posts, not when the images are placed inline. To get the inline thumbnails to Highslide looks to be an edit of the XF bb_code_tag_attach template.
Untested, too tired ATM, but if you are willing, try this. In the XF bb_code_tag_attach template find:
Code:<xen:else /> <a href="{xen:link attachments, $attachment}" target="_blank"><img src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="bbCodeImage" /></a> </xen:if>
And replace with:
Code:<xen:else /> <xen:if is="{$canView}"> <div class="highslide-gallery"> <a class="highslide" href="{xen:link attachments, $attachment}" onclick="return hs.expand(this)"><img src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="bbCodeImage" /></a> </div> <xen:else /> <a href="{xen:link attachments, $attachment}" target="_blank"><img src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="bbCodeImage" /></a> </xen:if> </xen:if>
Again that's untested but it might do the trick.
So you want image attachments to pop-up instead of open in a new window, eh? Let's Highslide them.
Step 1 of 6: Go to http://highslide.com/download.php and download Highslide (free for non-commercial purposes).
Step 2 of 6: Save Highslide to your PC, unzip it, and find the /highslide sub-directory.
Step 3 of 6: Create a new /your_forum/js/highslide directory on your server, and into this new directory FTP the following from the /highslide sub-directory on your PC:
When you are done, it should look like this:
- /graphics and its contents
- highslide-ie6.css
- highslide-with-gallery.js
- highslide.css
View attachment 3614
Step 4 of 6: Add the following to the end of the XF page_container_js_head template:
Code:<script type="text/javascript" src="js/highslide/highslide-with-gallery.js"></script> <link rel="stylesheet" type="text/css" href="js/highslide/highslide.css" /> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="js/highslide/highslide-ie6.css" /> <![endif]--> <script type="text/javascript"> hs.graphicsDir = 'js/highslide/graphics/'; hs.align = 'center'; hs.transitions = ['expand', 'crossfade']; hs.fadeInOut = true; hs.dimmingOpacity = 0.8; hs.outlineType = 'rounded-white'; hs.captionEval = 'this.thumb.alt'; hs.marginBottom = 105; // make room for the thumbstrip and the controls hs.numberPosition = 'caption'; // Add the slideshow providing the controlbar and the thumbstrip hs.addSlideshow({ //slideshowGroup: 'group1', interval: 5000, repeat: false, useControls: true, overlayOptions: { className: 'text-controls', position: 'bottom center', relativeTo: 'viewport', offsetY: -60 }, thumbstrip: { position: 'bottom center', mode: 'horizontal', relativeTo: 'viewport' } }); </script>
Step 5 of 6: Edit the XF attached_files template in two spots. First find this:
Code:<ul class="attachmentList">
And replace with this:
Code:<ul class="attachmentList highslide-gallery">
Second find this:
Code:<div class="thumbnail"> <a href="{xen:link attachments, $attachment}" target="_blank"> <img src="{xen:if $attachment.thumbnailUrl, $attachment.thumbnailUrl, '@imagePath/xenforo/widgets/page.png'}" alt="{$attachment.filename}" /> </a> </div>
And replace with this:
Code:<div class="thumbnail"> <xen:if is="{$attachment.thumbnailUrl} AND {$visitor.permissions.forum.viewAttachment}"> <a class="highslide" href="{xen:link attachments, $attachment}" onclick="return hs.expand(this)"> <img src="{xen:if $attachment.thumbnailUrl, $attachment.thumbnailUrl, '@imagePath/xenforo/widgets/page.png'}" alt="{$attachment.filename}" /> </a> <xen:else /> <a href="{xen:link attachments, $attachment}" target="_blank"> <img src="{xen:if $attachment.thumbnailUrl, $attachment.thumbnailUrl, '@imagePath/xenforo/widgets/page.png'}" alt="{$attachment.filename}" /> </a> </xen:if> </div>
Step 6 of 6: Go attach some pictures to a post and then click on one of the attachments. It should look like this:
View attachment 3625
Attached GIF, JPG, and PNG images in posts on a page get Highslide and non-image attachments open in a new window as happens by default.
Tested in IE and FF, and currently without known problems, but no guarantees. Please see http://www.highslide.com/tutorial for Highslide help.
This should be default
We use essential cookies to make this site work, and optional cookies to enhance your experience.