10/12/2002, 19:45
|
| | | Fecha de Ingreso: noviembre-2002 Ubicación: Fuengirola
Mensajes: 292
Antigüedad: 22 años Puntos: 1 | |
En este esta el error creo, linea 5:
Código:
<%Function RevFormatText(sIn)
Dim charPos, sOut, curChar, urlChar, urlString, imgChar, imgPos, imgString
sOut = ""
sIn = Replace(sIn, "<br>", vbcrlf)
sIn = Replace(sIn, "<", "<")
sIn = Replace(sIn, ">", ">")
sIn = Replace(sIn, "<img src=""images/pb_smiley_angry.gif"" align=""middle"" alt=""Moska"">", ">:(")
sIn = Replace(sIn, "<img src=""images/pb_smiley_shocked.gif"" align=""middle"" alt=""Pasmao"">", "8O")
sIn = Replace(sIn, "<img src=""images/pb_smiley_happy.gif"" align=""middle"" alt=""Felí"">", ":)")
sIn = Replace(sIn, "<img src=""images/pb_smiley_sad.gif"" align=""middle"" alt=""Pena"">", ":(")
sIn = Replace(sIn, "<img src=""images/pb_smiley_laugh.gif"" align=""middle"" alt=""Partio"">", ":D")
sIn = Replace(sIn, "<img src=""images/pb_smiley_razz.gif"" align=""middle"" alt=""Cachondo"">", ":p")
sIn = Replace(sIn, "<img src=""images/pb_smiley_wink.gif"" align=""middle"" alt=""OK"">", ";)")
sIn = Replace(sIn, "<b>", "")
sIn = Replace(sIn, "</b>", "")
sIn = Replace(sIn, "<i>", "")
sIn = Replace(sIn, "</i>", "")
sIn = Replace(sIn, "<u>", "")
sIn = Replace(sIn, "</u>", "")
sIn = Replace(sIn, "<blockquote><font face=""verdana,arial,helvetica"" size=""1"">quote</font><hr>", "
Cita:
")
sIn = Replace(sIn, "<hr></blockquote>", "
")
For charPos = 1 To Len(sIn)
curChar = Mid(sIn, charPos, 1)
if mid(sIn, charPos, 4) = "<img" then
sOut = sOut + "[img]"
charPos = charPos + 10
imgString = ""
imgChar = ""
imgPos = charPos
do until mid(sIn, imgPos, 2) = """>"
imgChar = mid(sIn, imgPos, 1)
imgString = imgString + imgChar
imgPos = imgPos + 1
if imgPos > len(sIn) then
sOut = sOut + imgString + "[/img]"
exit for
end if
loop
imgString = left(imgString, len(imgString))
sOut = sOut + imgString + "[/img]"
charPos = charpos + (imgPos - charPos + 5)
elseif (mid(sIn, charPos, 2) = "<a") then
do until mid(sIn, charPos, 2) = """>"
charPos = charPos + 1
loop
charPos = charPos + 2
urlString = ""
urlChar = ""
do until mid(sIn, charPos, 4) = "</a>"
urlChar = mid(sIn, charPos, 1)
urlString = urlString + urlChar
charPos = charPos + 1
if charPos > len(sIn) then
exit for
end if
loop
sOut = sOut + urlString
charPos = charpos + 3
else
sOut = sOut + curChar
end if
Next
RevFormatText = sOut
End Function%>
|