首页 > 网站 > 建站经验 > 正文

a-sp ubb代码转换成html代码

2019-11-02 15:23:35
字体:
来源:转载
供稿:网友

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&":","<img src='emot/em"&i&".gif'>",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>"

搞笑动态图片笑死人[www.62-6.com/1/dttp/]
,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

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表