![]() |
|
|
#2 (permalink) |
|
Registered User
Join Date: Apr 2003
Location: Michigan, USA
Posts: 19
|
Photos
I really recommend Catalog Wizard if you've got lots of photos you want to show people. It's a piece of software that creates an index.html, thumbnails all the photos, and then creates a web page for each photo. It was also written by a guy in finland who is very responsive to his email, which I always like :-)
David |
|
|
|
|
|
#4 (permalink) |
|
Junior Member
Join Date: Mar 2003
Posts: 4
|
This is the code that I used to list all the jpgs
<%@LANGUAGE="VBSCRIPT"%> <% Option Explicit Dim strDocsPath, strDocsPhysicalPath Dim objFSO, objFolder, objFiles, objFile Dim strName, strFile, strType, lngSize ' NOTE: set the following line to the folder to display strDocsPath = "docs" ' map the folder to a physical path strDocsPhysicalPath = Server.MapPath(strDocsPath) strDocsPhysicalPath = "d:\domains\YOURDOMAIN.com" ' create a system file object Set objFSO = Server.CreateObject("Scripting.FileSystemObject") ' create an object for the folder Set objFolder = objFSO.GetFolder("d:\domains\YOURDOMAIN\wwwroot\Sp ringMVOR") %> <html> <head> <title>Table Of Contents</title> </head> <body> <h1 align="center"></h1> <h4>Please choose the image to view.</h4> <ul> <% ' create a files collection Set objFiles = objFolder.Files response.write objfiles.count ' step through the files collection For Each objFile in objFiles ' get a file's name strName = objFile.Name ' make it lowercase for the URL strFile = Lcase(strName) ' get the file's type strType = objFile.Type ' make the name a title for display strName = MakeTitle(strName) ' get the file size in KB lngSize = objFile.Size\1024 if strType ="JPEG Image" then ' output the filename and URL Response.Write "<li><a href=""" & "" & "" & strFile & """>" & strName & "</a><br>" ' output the file's size and type Response.Write "<em>(" & lngSize & "KB " & strType & ")</em></li>" & vbCrLf 'Response.Write "<em>(" & objFile.name& ")</em></li>" & vbCrLf end if Next ' this function drops the extension from a file Function MakeTitle(strTemp) If InStrRev(strTemp,".") Then strTemp = Left(strTemp,InStrRev(strTemp,".")-1) End If MakeTitle = strTemp End Function %> </ul> <p><p> </body> </html> |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|