ASP UBB code into HTML code
Function ubb2html (str, Showemot, showimg)
On ERROR RESUME NEXT
If not str<> "" Then Exit function
Tmpstr= "Unobwab"
Str=ubbstr (str, "url")
Str=ubbstr (str, "quote")
Str=ubbstr (str, "color")
Str=ubbstr (str, "size")
Str=ubbstr (str, "face")
If Showemot Then
For I=1 to 16
Str=replace (str, ": Em" &i& ":", " ', 1,6,1)
Str=replace (str, ": Em" &i& ":", "", 1,-1,1)
Next
End If
If Showimg Then
Str=ubbstr (STR, "IMG")
Str=ubbstr (str, "SWF")
Str=ubbstr (str, "dir")
Str=ubbstr (str, "RM")
Str=ubbstr (str, "MP")
Str=ubbstr (str, "QT")
End If
Str=ubbstr (str, "frame")
Str=replace (str, "[b]", "<b>", 1,-1,1)
Str=replace (str, "[/b]", "</b>", 1,-1,1)
Str=replace (str, "[u]", "<u>", 1,-1,1)
Str=replace (str, "[/U]", "</u>", 1,-1,1)
Str=replace (str, "[BR]", "<br>", 1,-1,1)
Str=replace (str, "[Center]", "<center>", 1,-1,1)
Str=replace (str, "[/center]", "</center>", 1,-1,1)
Str=replace (str, "[Fly]", "<marquee>", 1,-1,1)
Str=replace (str, "[/fly]", "</marquee>", 1,-1,1)
Str=replace (str, "[" &tmpstr, "[", 1,-1,1)
Str=replace (str,tmpstr& "]", "]", 1,-1,1)
Str=replace (str, "/" &tmpstr, "/", 1,-1,1)
Ubb2html=str
End Function