%
function doCode(str, oTag, cTag, roTag, rcTag)
tx = split(str, cTag)
t = ""
for i = 0 to ubound(tx)
if lcase(oTag) = "[a]" then
p = instr(1, tx(i), "[a]", 1)
if p <> 0 then
tmp = mid(tx(i), p)
url = mid(tmp, 4)
if lcase(left(url, 5)) = "http:" then
tmp1 = Replace(tmp, "[a]"&url, "" & url & "", 1, -1, 1)
else
tmp1 = Replace(tmp, "[a]"&url, "" & url & "" , 1, -1, 1)
end if
t =t & Replace(tx(i), tmp, tmp1)
else
t = t & tx(i)
end if
else
cnt = instr(1,tx(i), oTag,1)
select case cnt
case 0
t=t&tx(i) & " "
case else
t = t & Replace(tx(i), oTag, roTag,1,1,1)
t = t & " " & rcTag & " "
end select
end if
next
doCode = t
end function
function buscaSWF(str)
p =instr(1, str, "[swf]", 1) 'busca si esta el tag de swf
f =instr(1, str, "[/swf]", 1) 'marca el final
poffset = p + 5 'para que comienze bien la busqueda (despues que termina el tag
foffset = f - 1
nombre = ""
ancho = "275"
alto = "200"
fondo = "ffffff"
colTemp = ""
estado = 1
marca1= 0
marca2= 0
marca3= 0
for i = poffset to foffset
test = mid(str, i, 1)
if test = ":" then
if mid(str, i , 3) = "://" then
'o sea que son los 2 puntos de un http://www etc
else
Select case estado
case 1
marca1 = i
estado = 2
case 2
marca2 = i
estado = 3
case 3
marca3 = i
estado = 4
end Select
end if
end if
next
if marca1 > 0 then
nombre = mid(str, poffset, marca1 - poffset)
end if
if marca2 > 0 then
ancho = int(mid(str, marca1 + 1, marca2 - marca1 - 1))
end if
if marca3 > 0 then
alto = int(mid(str, marca2 + 1, marca3 - marca2 - 1))
colTemp = mid(str, marca3 + 1, foffset - marca3)
end if
if colTemp <> "" then
fondo = colTemp
end if
if ancho > 700 then
ancho = 700
end if
if alto > 500 then
alto = 500
end if
objeto = "
"
'response.write (str & " -- ")
'response.write (f - p)
if p > 0 then
borrar = mid(str, p, f - p + 6)
'response.write (str)
str = replace(str, borrar, objeto, 1, -1, 1)
end if
buscaSWF = str
end function
Function Smile(string)
String = replace(String, "[:)]", "")
String = replace(String, "[:P]", "
")
String = replace(String, "[:(]", "
")
String = replace(String, "[;)]", "
")
Smile = String
End function
Function ChkSt(str)
if str = "" then
str = " "
Else
if BadWordFiler = "true" then
bwords = split(BadWords, "|")
for i = 0 to ubound(bwords)
str= replace(str, bwords(i), string(len(bwords(i)),"*"), 1,-1,1)
next
End if
End If
' Do ASP Forum Code
str = doCode(str, "[b]", "[/b]", "", "")
str = doCode(str, "[img]", "[/img]", "
")
str = doCode(str, "[i]", "[/i]", "", "")
str = doCode(str, "[quote]", "[/quote]", "
cita:") str = doCode(str, "[a]", "[/a]", "", "") str = doCode(str, "[code]", "[/code]", "
", "
", "") str = buscaSWF(str) if smiles = "true" then str= smile(str) str = Replace(str, "'", "''") str = Replace(str, "|", "/") ChkSt = str End Function '----------------------------- Sub DoCount ' ### Updates the totals Table strSQl ="Update totals set totals.U_Count=totals.U_Count + 1" my_conn.Execute (strSQL) End Sub Sub ShowForm() %>