ANBSThumbImg + ANBSThumbLink

Creates thumb of an image with or without link to original
Use ANBSThumbLink to create thumb and link to original image
Use ANBSThumbImg to create thumb without link
Uses Thumbnail3.aspx and fancybox for larger image (both attached)
Latest fancybox3 can be found here.
Thumbnail3.aspx was found online, and then enhanced to meet my needs.


Public

Tested

My Own Work
Function ANBSThumbLink(Img, ToWidth)
 ' Creats a link to enlarge image
 ' That image is actually resized using thumbnail3.aspx
 'Needs: ANBSThumbImg and FancyBox
 ' <a href=""""><img src="/Assets/thumbnail3.aspx?h=200&f=Dir_Img/AlwahOld.jpg" class="img-thumbnail" /></a>
 FancyBox     = ""
 If ToWidth = "" Then ToWidth = "200"
 Rett      = ""
 Rett      = Rett & "<a href=""" & Img & """ data-fancybox=""fancybox"" "
 Rett      = Rett & ">"
 Rett      = Rett & ANBSThumbImg(Img, ToWidth)
 Rett      = Rett & "</a>"
 Rett      = Rett & ""
 ANBSThumbLink   = Rett
End Function
Function ANBSThumbImg(Img, ToWidth)
 ' That image is actually resized using thumbnail3.aspx
 'Needs: ThumbASPX
 ' <img src="/Assets/thumbnail3.aspx?h=200&f=Dir_Img/AlwahOld.jpg" class="img-thumbnail" />
 ThumbASPX    = Dir_Thumbnail3aspx ' full path and file for thumbnail3.aspx
 Rett      = ""
 Rett      = Rett & "<img src=""" & ThumbASPX & "?h=" & ToWidth & "&f=" & Img & """ class=""img-thumbnail"" "
 Rett      = Rett & "/>"
 ANBSThumbImg   = Rett
End Function

Img, ToWidth

Views 73 Downloads 12

Classic ASP Multimedia
ANmarAmdeen
658
Attachments
Revisions

v2.0