Ciao, avendo la stessa necessità ho scritto questo script ad hoc per l'occasione
per rendere la pagina più leggera devi inserire le copie a bassa risoluzione delle foto nella cartella "mini" all'interno di ogni cartella
codice:
<%
Dim intFotoxRiga
Dim strAlbum
Dim strPath
Dim objFSO, objFolder, objSottoCart, objCont
Dim Cartella, Foto
Dim strASPPage, intCont
strASPPage = "index.asp" 'questa pagina asp
intFotoxRiga = 5 ' numero di foto in una riga
%>
<h1>Fotogallery</h1>
<%
If Request.QueryString("album") > "" then
strAlbum = Request.QueryString("album")
elencoFoto()
Else
elencoAlbum()
End If
Sub elencoAlbum
strPath = Server.MapPath("./")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strPath)
Set objSottoCart = objFolder.Subfolders
intCont = 0
For each Cartella in objSottoCart
%>
<div style="float:left; width:<%= int(100/intFotoxRiga) %>%">
<%= Cartella.Name %>
</div>
<%
intCont = intCont+1
If intCont = intFotoxRiga then
%>
<div style="clear:left"><hr /></div>
<%
End If
Next
If intCont <> 0 then
%>
<div style="clear:left"><hr /></div>
<%
intCont=0
End If
End Sub
Sub elencoFoto
%>
<h3 align="center"><%= strAlbum %></h3>
<p align="center">Torna indietro</p>
<%
strPath = Server.MapPath("./" & strAlbum)
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(strPath)
Set objCont = objFolder.Files
intCont = 0
For each Foto in objCont
If Ucase(Right(Foto.Name,3)) = "JPG" then
%>
<div align="center" style="float:left; width:<%= int(100/intFotoxRiga) %>%">
<a href="<%= strAlbum & "/" & Foto.Name %>">
[img]<%= strAlbum & [/img]" alt="<%= Left(Foto.Name , Len(Foto.Name)-4) %>" />
<%= Left(Foto.Name , Len(Foto.Name)-4) %></a>
</div>
<%
intCont = intCont+1
End If
If intCont = intFotoxRiga then
%>
<div style="clear:left"><hr /></div>
<%
intCont=0
End If
Next
If intCont <> 0 then
%>
<div style="clear:left"><hr /></div>
<%
intCont=0
End If
%>
<p align="center">Torna indietro</p>
<%
End Sub
%>
spero che ti sia utile.
nella sub elenco album, per ogni album ho messo semplicemente in nome della cartella non formattato, ma puoi formattarlo a piacere, magari inserendo un'immagine presa dalla cartella. se hai bisogno di aiuto chiedi.
ciao