ubb| function ASP's UBB function (recommended)
function unhtml (content)
Unhtml=content
If content <> "" Then
Unhtml=replace (unhtml, "&", "&")
Unhtml=replace (unhtml, "<", "<")
Unhtml=replace (unhtml, ">", ">")
Unhtml=replace (UNHTML,CHR (34), "" ")
Unhtml=replace (UNHTML,CHR), "<br>"
Unhtml=replace (UNHTML,CHR (32), "")
' Unhtml=ubb (unhtml)
End If
End Function
function Ubb (content)
Dim Nowtime,i
Ubb=content
Nowtime=now ()
Ubb=convert (UBB, "code")
Ubb=convert (UBB, "html")
Ubb=convert (UBB, "url")
Ubb=convert (UBB, "color")
Ubb=convert (UBB, "font")
Ubb=convert (UBB, "size")
Ubb=convert (UBB, "quote")
Ubb=convert (UBB, "email")
Ubb=convert (UBB, "img")
Ubb=convert (UBB, "SWF")
Ubb=autourl (UBB)
Ubb=replace (UBB, "
"," <b> ", 1,-1,1)
Ubb=replace (UBB, ""," </b> ", 1,-1,1)
Ubb=replace (UBB, "
"," <i> ", 1,-1,1)
Ubb=replace (UBB, ""," </i> ", 1,-1,1)
Ubb=replace (UBB, "
"," <u> ", 1,-1,1)
Ubb=replace (UBB, ""," </u> ", 1,-1,1)
Ubb=replace (UBB, "[Blue]", "<font color= ' #000099 ' >", 1,-1,1)
Ubb=replace (UBB, "[/blue]", "</font>", 1,-1,1)
Ubb=replace (UBB, "[Red]", "<font color= ' #990000 ' >", 1,-1,1)
Ubb=replace (UBB, "[/red]", "</font>", 1,-1,1)
For I=1 to 28
Ubb=replace (Ubb, "{: Em" &i& "}", "</img> ", 1,6,1)
Ubb=replace (Ubb, "{: Em" &i& "}", "", 1,-1,1)
Next
Ubb=replace (UBB, "[" &CHR (176), "[", 1,-1,1)
Ubb=replace (UBB,CHR (176) & "]", "]", 1,-1,1)
Ubb=replace (UBB, "/" &CHR (176), "/", 1,-1,1)
' Ubb=replace (Ubb, "{; Em", "{: Em", 1,-1,1)
End Function
function Convert (UBB,COVT)
Dim Ctext,startubb,endubb,lcovt,text,codetext
Ctext=ubb
Startubb=1
Do while covt= "url" or covt= "color" or covt= "font" or covt= "size"
Startubb=instr (Startubb,ctext, "[" &CovT& "=", 1)
If Startubb=0 then Exit Do
Endubb=instr (Startubb,ctext, "]", 1)
If Endubb=0 then Exit Do
Lcovt=covt
Startubb=startubb+len (LCOVT) +2
Text=mid (Ctext,startubb,endubb-startubb)
Codetext=replace (Text, "[", "[" &CHR (176), 1,-1,1)
Codetext=replace (Codetext, "]", Chr (176) & "]", 1,-1,1)
' Codetext=replace (Codetext, "{: Em", "{; Em", 1,-1,1)
Codetext=replace (Codetext, "/", "/" &CHR (176), 1,-1,1)
Select Case Covt
Case "COLOR"
Ctext=replace (Ctext, " "," <font color= ' http://www.alixixi.com/program/a/"&text&" ' > ", 1,1,1)
Ctext=replace (Ctext, ""," </font> ", 1,1,1)
Case "Font"
Ctext=replace (Ctext, "[font=http://www.alixixi.com/program/a/" &text& "]", "<font face=" http:// www.alixixi.com/program/a/"&text&" ' > ", 1,1,1)
Ctext=replace (Ctext, "[/font]", "</font>", 1,1,1)
Case "Size"
If IsNumeric (text) Then
If Text>6 then text=6
If Text<1 then text=1
Ctext=replace (Ctext, " "," <font size= ' http://www.alixixi.com/program/a/"&text&" ' > ", 1,1,1)
Ctext=replace (Ctext, ""," </font> ", 1,1,1)
End If
Case "url"
Ctext=replace (Ctext, "", "<a href= '" &codetext& "' target=_blank>", 1,1,1)
Ctext=replace (Ctext, "", "</a>", 1,1,1)
Case "Email"
Ctext=replace (Ctext, "[" &CovT& "=http://www.alixixi.com/program/a/" &text& "]", "<a Href=mailto: http://www.alixixi.com/program/a/"&text&" > ", 1,1,1)
Ctext=replace (Ctext, "[/" &CovT& "]", "</a>", 1,1,1)
End Select
Loop
Startubb=1
Todo
Startubb=instr (Startubb,ctext, "[" &CovT&] ", 1)
If Startubb=0 then Exit Do
Endubb=instr (Startubb,ctext, "[/" &CovT&] ", 1)