Script asp pour galerie photo...

Saskia - 21 août 2001 à 13:09
 Saskia - 27 août 2001 à 18:13
Bonour,

Je suis débutante en asp (j'arrive juste à insérer les lignes de code) mais pour les modifier... je ne comprend encore rien... Dès que j'aurai une minute je lirai ma bible asp... pour l'instant c'est urgent et j'ai besoin d'un expert !

J'ai téléchargé un script asp: "DisplayPics Version 1.0 by Brian Kirsten" (bkirsten@brainscanstudios.com - à l'adresse: http://www.brainscanstudios.com)(Je lui ai écrit perso mais pas de réponses !) Je voudrait mettre le nombre désiré de miniatures par ligne. Je ne trouve pas les paramètres dans le code pour en changer :( (présentation etc...)
Sur demande je vous affiche le code !
Merci d'avance de me filer un coup de pouce !
A bientôt. Saskia

4 réponses

FILE LE CODE POUR VOIR
0
Voilà ! :) Merci beaucoup, à +. Saskia

<%@ Language=VBScript %>
<%
' DisplayPics Version 1.0 by Brian Kirsten (bkirsten@brainscanstudios.com)
' last modified 01/12/01
' copyright Ó 2000 Brain Scan Studios, Inc. (http://www.brainscanstudios.com)
' source distributed under the gnu general public license.
' let me know if your site is using the code i will put a link up to your page!

%>
<HTML>
<HEAD>
</HEAD>

<center>
<%

if Request("TYPE") = "" then

rType = 1

else

rType = CInt(Request("TYPE"))

end if

if Request("img") = "" then

rImg = ""

else

rImg = Request("img")

end if

if rImg <> "" and rType = 2 then
bolListAll = False
Response.Write "[& Request.ServerVariables( Back to Images]

"
else
bolListAll = True
end if

Response.write returnImageName(Request("DIR"),rType,rImg,bolListAll)

%>
</center>

</HTML>

<%

Function returnImageName(sDir, intType, imgName, listAll)

Dim fso

Dim fol

Dim sFile

Dim objFiles

Dim sSize

If intType = 1 Then

sSize = "small"

Else

sSize = "big"

End If

Set fso = Server.CreateObject("Scripting.FileSystemObject")
strPath = Server.MapPath("images") & "" & sDir & "" & sSize & ""

Set fol = fso.GetFolder(strPath)

Set objFiles = fol.Files

intCount = 1

For Each Item In objFiles

sFile = Item

sRoot = rootName(sFile)

If imgName <> "" Then

If imgName = sRoot Then

If listAll = False Then

returnImageName = ""

Else

returnImageName = ""

End If

Exit Function

End If

Else

If listAll = False Then

Response.Write sDir & "" & flipME(sSize) & "" & sRoot

Else

Response.Write "[& Request.ServerVariables( ] "

if (intCount mod 6 ) + 1 = 6 then
Response.Write "

"
end if

End If

End If

intCount = intCount + 1

Next

Set objFiles = Nothing

Set fol = Nothing

Set fso = Nothing

End Function

Function flipME(strSize)

If strSize = "small" Then

flipME = "big"

Else

flipME = "small"

End If

End Function

Function rootName(sName)

Dim tStr

tStr = sName

Do

tStr = Mid(tStr, InStr(tStr, "") + 1)

Loop Until InStr(tStr, "") = 0

rootName = tStr

End Function

%>
0
Je suppose que c'est cette ligne:
if (intCount mod 6 ) + 1 = 6 then

qu'il faut modifier. J'ai regardé hyper vite, mais je pense que c'est ça, sinon, t'as un URL ou la page tourne?
0
Merci ! J'ai trouvé le truc ! A bienôt. Saskia
0
Rejoignez-nous