catalyst2 community forums  

Go Back   catalyst2 community forums > New Users > How-To?

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 21-05-2003, 02:23 PM   #1 (permalink)
Junior Member
 
Join Date: Mar 2003
Posts: 4
Question Directory Browse

I would like to post some jpgs from a family event. I would like to be able for the user to do a directory browse. is that possible?
pacman is offline   Reply With Quote
Old 23-05-2003, 08:45 PM   #2 (permalink)
Registered User
 
odoketa's Avatar
 
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
odoketa is offline   Reply With Quote
Old 04-06-2003, 04:29 PM   #3 (permalink)
Registered User
 
Join Date: Jan 2003
Posts: 150
Is there something similar for listing files as well as pics?
furman is offline   Reply With Quote
Old 04-06-2003, 04:36 PM   #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>
pacman is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 05:47 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.