PaulW
Member
Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
|
Never liked VB... Never liked ASP... Never used it until now!!
Okkkkk
I'm trying to make a gallery system for out schools website, I've got the underlying code (rather messy) which does the job to an extent, I need to do more to it and its taking a while!
But I need to do a thumbnail list so it displays say 4 across by 3 down (similiar to how the CS Gallery lists thumbnails), with an option to view all images in one page.
Code I got which currently lists the thumbnails is...
code: Set thumbdir = FSO.GetFolder(root & path & "thumbs") 'needed to call the thumbs!
Set dirfiles = thumbdir.Files
For each dirfile in dirfiles
For ext = 0 to ubound(ValidExt)-1
If instr(right(lcase(dirfile), 4), ValidExt(ext)) > 0 then
result = result & " <tr>" & vbcrlf
result = result & " <td align=""center""><a href=""" & webpath & "?p=" & replace(path, "\", "/") & "lo-res/" & dirfile.name & """><img src=""" & webpath & replace(path, "\", "/") & "thumbs/" & dirfile.name & """></a></td>" & vbcrlf & " <td nowrap><a href=""" & webpath & "?p=" & replace(path, "\", "/") & "lo-res/" & dirfile.name & """>" & dirfile.name & "</a></td>" & vbcrlf
result = result & " </tr>" & vbcrlf
End if
Next
Next
this just lists a 2 column spread, 1 with image, other with filename (just for reference atm)
But I'm trying to step the for each statement, but cant do inc, & unsure how arrays properly work in VB/ASP...
ahhhhh boooolocks!
[Edited on 27-01-2004 by PaulW]
|